Skip to content

Commit

Permalink
Merge pull request #352 from sbmlteam/development
Browse files Browse the repository at this point in the history
Pull from develop
  • Loading branch information
luciansmith authored Sep 27, 2023
2 parents f16490f + fee56c9 commit 362ed55
Show file tree
Hide file tree
Showing 109 changed files with 2,080 additions and 436 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ set (LIBSBML_FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/FindLIBSBML.

# Whether to compile examples
option(WITH_EXAMPLES "Compile the libSBML example programs." OFF)
option(WITH_CHECK "Enable testing of libSBML." OFF)

# Which language bindings should be built
option(WITH_CSHARP "Generate the C# language interface for libSBML." OFF)
Expand Down
2 changes: 2 additions & 0 deletions CMakeModules/FindBZ2.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include(CheckLibraryExists)

string(TOUPPER ${PROJECT_NAME} _UPPER_PROJECT_NAME)
set(_PROJECT_DEPENDENCY_DIR ${_UPPER_PROJECT_NAME}_DEPENDENCY_DIR)

Expand Down
1 change: 1 addition & 0 deletions CMakeModules/FindLIBXML.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include(CheckLibraryExists)
include(CheckCSourceCompiles)

string(TOUPPER ${PROJECT_NAME} _UPPER_PROJECT_NAME)
set(_PROJECT_DEPENDENCY_DIR ${_UPPER_PROJECT_NAME}_DEPENDENCY_DIR)
Expand Down
37 changes: 36 additions & 1 deletion NEWS.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
 libSBML NEWS -- History of user-visible changes

====================================================================
5.20.0
5.20.2
====================================================================

This is mostly a bug fix release enhancing stability when validating
and converting models.

* New features / improvements

- Access to error logs from the C API

- Attributes of the ModelHistory can now be accessed from
const objects.

- The FBC V3 package has been updated to reflect the latest
specification. There are now optional attributes `fbc:reaction2`
on the FluxObjective and `fbc:variable2` on the
UserDefinedConstraintComponent.

* Bug fixes

- A bug converting / validating models with the 'comp' package
has been fixed.

- A crash when inferring units has been resolved.

- A fix to the CMake Build system ensures that check for dependencies
is more robust. Thanks to first time contributor @adelhpour

- The type of the FBC V3 `coefficient` attribute on the
UserDefinedConstraintComponent has been corrected, it was mistakenly
a double before, now it has been corrected to be a SIdRef as
described in the specification.


====================================================================
5.20.0 (2023-04-03)
====================================================================

Given the length of time since our last release the list of changes
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.20.0
5.20.2
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for libSBML 5.20.0.
# Generated by GNU Autoconf 2.71 for libSBML 5.20.2.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -766,8 +766,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libSBML'
PACKAGE_TARNAME='libsbml'
PACKAGE_VERSION='5.20.0'
PACKAGE_STRING='libSBML 5.20.0'
PACKAGE_VERSION='5.20.2'
PACKAGE_STRING='libSBML 5.20.2'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL='http://sbml.org/Software/libSBML'

Expand Down Expand Up @@ -1662,7 +1662,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libSBML 5.20.0 to adapt to many kinds of systems.
\`configure' configures libSBML 5.20.2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1728,7 +1728,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libSBML 5.20.0:";;
short | recursive ) echo "Configuration of libSBML 5.20.2:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1885,7 +1885,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libSBML configure 5.20.0
libSBML configure 5.20.2
generated by GNU Autoconf 2.71

Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2484,7 +2484,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libSBML $as_me 5.20.0, which was
It was created by libSBML $as_me 5.20.2, which was
generated by GNU Autoconf 2.71. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3469,7 +3469,7 @@ ac_config_headers="$ac_config_headers src/sbml/common/libsbml-package.h"
ac_config_headers="$ac_config_headers src/sbml/common/libsbml-namespace.h"


LIBSBML_VERSION_NUMERIC=52000
LIBSBML_VERSION_NUMERIC=52002



Expand Down Expand Up @@ -28902,7 +28902,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libSBML $as_me 5.20.0, which was
This file was extended by libSBML $as_me 5.20.2, which was
generated by GNU Autoconf 2.71. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -28967,7 +28967,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
libSBML config.status 5.20.0
libSBML config.status 5.20.2
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"

Expand Down
4 changes: 3 additions & 1 deletion dev/packages/deviser-fbc_v3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
<attribute name="id" required="false" type="SId" abstract="false"/>
<attribute name="name" required="false" type="string" abstract="false"/>
<attribute name="reaction" required="true" type="SIdRef" element="Reaction" abstract="false"/>
<attribute name="reaction2" required="false" type="SIdRef" element="Reaction" abstract="false"/>
<attribute name="coefficient" required="true" type="double" abstract="false"/>
<attribute name="variableType" required="true" type="enum" element="FbcVariableType" abstract="false"/>
</attributes>
Expand Down Expand Up @@ -226,8 +227,9 @@
<attributes>
<attribute name="id" required="false" type="SId" abstract="false"/>
<attribute name="name" required="false" type="string" abstract="false"/>
<attribute name="coefficient" required="true" type="double" abstract="false"/>
<attribute name="coefficient" required="true" type="SIdRef" element="Parameter" abstract="false"/>
<attribute name="variable" required="true" type="SIdRef" element="Reaction,Parameter" abstract="false"/>
<attribute name="variable2" required="false" type="SIdRef" element="Reaction,Parameter" abstract="false"/>
<attribute name="variableType" required="true" type="enum" element="FbcVariableType" abstract="false"/>
</attributes>
</element>
Expand Down
7 changes: 4 additions & 3 deletions src/bindings/matlab/getDefaultValues.m
Original file line number Diff line number Diff line change
Expand Up @@ -3330,14 +3330,15 @@
'', ...
'', ...
'', ...
'', ...
0/0, ...
int32(0), ...
'', ...
int32(3), ...
int32(version), ...
int32(3), ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3565,8 +3566,8 @@
int32(-1), ...
'', ...
'', ...
0/0, ...
int32(0), ...
'', ...
'', ...
'', ...
'', ...
int32(3), ...
Expand Down
5 changes: 3 additions & 2 deletions src/bindings/matlab/getStructureEnum.m
Original file line number Diff line number Diff line change
Expand Up @@ -3005,14 +3005,15 @@
{'fbc_id', 'id', 'fbc', 1, 20}, ...
{'fbc_name', 'name', 'fbc', 1, 20}, ...
{'fbc_reaction', 'reaction', 'fbc', 1, 20}, ...
{'fbc_reaction2', 'reaction2', 'fbc', 1, 20}, ...
{'fbc_coefficient', 'coefficient', 'fbc', 1, 20}, ...
{'isSetfbc_coefficient', 'coefficient', 'fbc', 0, 7}, ...
{'fbc_variableType', 'variableType', 'fbc', 1, 20}, ...
{'level', '', '', 0, 0}, ...
{'version', '', '', 0, 0}, ...
{'fbc_version', 'version', 'fbc', 1, 20}, ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3241,8 +3242,8 @@
{'fbc_id', 'id', 'fbc', 1, 20}, ...
{'fbc_name', 'name', 'fbc', 1, 20}, ...
{'fbc_coefficient', 'coefficient', 'fbc', 1, 20}, ...
{'isSetfbc_coefficient', 'coefficient', 'fbc', 0, 7}, ...
{'fbc_variable', 'variable', 'fbc', 1, 20}, ...
{'fbc_variable2', 'variable2', 'fbc', 1, 20}, ...
{'fbc_variableType', 'variableType', 'fbc', 1, 20}, ...
{'level', '', '', 0, 0}, ...
{'version', '', '', 0, 0}, ...
Expand Down
5 changes: 3 additions & 2 deletions src/bindings/matlab/getStructureFieldnames.m
Original file line number Diff line number Diff line change
Expand Up @@ -3382,14 +3382,15 @@
'fbc_id', ...
'fbc_name', ...
'fbc_reaction', ...
'fbc_reaction2', ...
'fbc_coefficient', ...
'isSetfbc_coefficient', ...
'fbc_variableType', ...
'level', ...
'version', ...
'fbc_version', ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3618,8 +3619,8 @@
'fbc_id', ...
'fbc_name', ...
'fbc_coefficient', ...
'isSetfbc_coefficient', ...
'fbc_variable', ...
'fbc_variable2', ...
'fbc_variableType', ...
'level', ...
'version', ...
Expand Down
7 changes: 4 additions & 3 deletions src/bindings/matlab/getValueType.m
Original file line number Diff line number Diff line change
Expand Up @@ -3333,14 +3333,15 @@
'char', ...
'char', ...
'char', ...
'char', ...
'double', ...
'bool', ...
'char', ...
'uint', ...
'uint', ...
'uint', ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3568,8 +3569,8 @@
'int', ...
'char', ...
'char', ...
'double', ...
'bool', ...
'char', ...
'char', ...
'char', ...
'char', ...
'uint', ...
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/matlab/test/test-data/fbcV3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<fbc:listOfUserDefinedConstraints>
<fbc:userDefinedConstraint sboTerm="SBO:0000001" fbc:id="uc2" fbc:lowerBound="uc2lb" fbc:upperBound="uc2ub">
<fbc:listOfUserDefinedConstraintComponents>
<fbc:userDefinedConstraintComponent metaid="_udc1" sboTerm="SBO:0000001" fbc:id="dd" fbc:name="string" fbc:coefficient="2" fbc:variable="R2" fbc:variableType="linear"/>
<fbc:userDefinedConstraintComponent metaid="_udc1" sboTerm="SBO:0000001" fbc:id="dd" fbc:name="string" fbc:coefficient="uc2ub" fbc:variable="R2" fbc:variableType="linear"/>
</fbc:listOfUserDefinedConstraintComponents>
</fbc:userDefinedConstraint>
</fbc:listOfUserDefinedConstraints>
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/matlab/test/testReadFromFileFbc2.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).typecode, 'SBML_FBC_FLUXOBJECTIVE'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).fbc_reaction, 'R1'));
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).fbc_coefficient == 1);
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).isSetfbc_coefficient == 1);


Totalfail = Totalfail + fail_unless( strcmp(m.fbc_activeObjective, 'c'));

Expand Down
6 changes: 3 additions & 3 deletions src/bindings/matlab/test/testReadFromFileFbc3.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).typecode, 'SBML_FBC_FLUXOBJECTIVE'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).fbc_reaction, 'R1'));
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).fbc_coefficient == 1);
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).isSetfbc_coefficient == 1);


Totalfail = Totalfail + fail_unless( strcmp(m.fbc_activeObjective, 'c'));

Expand All @@ -77,8 +77,8 @@

Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).typecode, 'SBML_FBC_USERDEFINEDCONSTRAINTCOMPONENT'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_id, 'dd'));
Totalfail = Totalfail + fail_unless( m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_coefficient == 2);
Totalfail = Totalfail + fail_unless( m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).isSetfbc_coefficient == 1);

Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_coefficient, 'uc2ub'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_variable, 'R2'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_variableType, 'linear'));

Expand Down
4 changes: 2 additions & 2 deletions src/sbml/AlgebraicRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ AlgebraicRule_create(unsigned int level, unsigned int version)
AlgebraicRule* obj = new AlgebraicRule(level,version);
return obj;
}
catch (SBMLConstructorException)
catch (SBMLConstructorException &)
{
return NULL;
}
Expand All @@ -387,7 +387,7 @@ AlgebraicRule_createWithNS (SBMLNamespaces_t* sbmlns)
AlgebraicRule* obj = new AlgebraicRule(sbmlns);
return obj;
}
catch (SBMLConstructorException)
catch (SBMLConstructorException &)
{
return NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions src/sbml/AssignmentRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ AssignmentRule_create(unsigned int level, unsigned int version)
AssignmentRule* obj = new AssignmentRule(level,version);
return obj;
}
catch (SBMLConstructorException)
catch (SBMLConstructorException &)
{
return NULL;
}
Expand All @@ -466,7 +466,7 @@ AssignmentRule_createWithNS (SBMLNamespaces_t* sbmlns)
AssignmentRule* obj = new AssignmentRule(sbmlns);
return obj;
}
catch (SBMLConstructorException)
catch (SBMLConstructorException &)
{
return NULL;
}
Expand Down
6 changes: 3 additions & 3 deletions src/sbml/Compartment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ ListOfCompartments::createObject (XMLInputStream& stream)
{
object = new Compartment(getSBMLNamespaces());
}
catch (SBMLConstructorException*)
catch (SBMLConstructorException &)
{
object = new Compartment(SBMLDocument::getDefaultLevel(),
SBMLDocument::getDefaultVersion());
Expand Down Expand Up @@ -2029,7 +2029,7 @@ Compartment_create (unsigned int level, unsigned int version)
Compartment* obj = new Compartment(level,version);
return obj;
}
catch (SBMLConstructorException)
catch (SBMLConstructorException &)
{
return NULL;
}
Expand All @@ -2045,7 +2045,7 @@ Compartment_createWithNS (SBMLNamespaces_t* sbmlns)
Compartment* obj = new Compartment(sbmlns);
return obj;
}
catch (SBMLConstructorException)
catch (SBMLConstructorException &)
{
return NULL;
}
Expand Down
Loading

0 comments on commit 362ed55

Please sign in to comment.