Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull from develop #352

Merged
merged 42 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5e188fe
Merge pull request #322 from sbmlteam/fix-comp-flattening
skeating May 5, 2023
fd4d5cf
Fixed writer crash with null doc
skeating May 9, 2023
6f14553
missing space in error message
skeating May 10, 2023
d52d8f3
validate needs to call plugins
skeating May 15, 2023
a479b25
fix unsafe return
skeating May 15, 2023
e2b6fd0
make null catch supersafe which hopefully pleases macos
skeating May 16, 2023
380618f
Make the copy safe
skeating May 16, 2023
30456b0
Replace catching exceptions with &
skeating May 16, 2023
359d67d
replace exception &e with &
skeating May 24, 2023
c0fb352
put back &e in places where we use it
skeating May 24, 2023
b53ac85
Merge pull request #326 from sbmlteam/small-fixes
skeating May 25, 2023
c30da11
bump version
skeating May 25, 2023
83208d0
CheckLibraryExists is included Update FindBZ2.cmake
adelhpour May 26, 2023
49ce5b4
CheckCSourceComplies is included in FindLIBXML.cmake
adelhpour May 26, 2023
66a171a
catch an undefined fd used by another fd
skeating Jun 8, 2023
a6c13d8
#338: dont dereference NULL
fbergmann Jun 23, 2023
9a80581
- test the commented version as well
fbergmann Jun 23, 2023
40bf463
reestablish document after model clone
skeating Jul 14, 2023
2619993
extra tests for document
skeating Jul 17, 2023
ec73e20
fixed the bug with Unit Inference
skeating Jul 17, 2023
9250d60
ensure we have a document and model
fbergmann Jul 24, 2023
8ab7e91
Merge pull request #335 from sbmlteam/conversion_errors
skeating Aug 19, 2023
19484f0
Update CompFlatteningConverter.cpp
fbergmann Aug 21, 2023
1cd69a4
Merge pull request #343 from sbmlteam/issue-341
skeating Aug 22, 2023
eef3093
add a C api for SBMLErrorLog
skeating Aug 19, 2023
6ac320b
don't use Bool in strict C
skeating Aug 21, 2023
6e069c0
revert my attempts to static cast
skeating Aug 24, 2023
a1a5bd9
prepare for 5.20.2 release
fbergmann Sep 5, 2023
40ced6e
Make various 'get' functions const for annotations.
luciansmith Sep 6, 2023
7325eda
Merge pull request #345 from sbmlteam/update-version
skeating Sep 11, 2023
760d015
update news for upcoming release.
fbergmann Sep 12, 2023
bee0af7
- return integral value rather than ptr-type
fbergmann Sep 12, 2023
b3eb9c3
Update Fbc V3 package
fbergmann Sep 15, 2023
9816eb7
- update matlab test file
fbergmann Sep 15, 2023
5a54f15
- updated matlab test file
fbergmann Sep 15, 2023
876212b
- fix validation of coefficient
fbergmann Sep 15, 2023
c2e1656
- fix another test file
fbergmann Sep 15, 2023
45ab62e
- the default should not be nan for a string
fbergmann Sep 15, 2023
7013ab7
- change value type
fbergmann Sep 15, 2023
aee04c3
adding validation
skeating Sep 19, 2023
9faec63
Merge pull request #350 from sbmlteam/fbcV3-update
skeating Sep 19, 2023
fee56c9
Added MATLAB binding for the new FBC variables
skeating Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading