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

Add layout render #107

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
065f4fe
First bit of including Adel's SBMLNetwork.
luciansmith Jun 24, 2024
cbad899
Let the user set stuff.
luciansmith Jun 28, 2024
854b909
Most individual layout/render information now encodable in Antimony.
luciansmith Jul 15, 2024
7e70b52
Add generic species/compartment/reaction layout info.
luciansmith Jul 17, 2024
3dc6a67
Fix error messages for group layout information.
luciansmith Jul 17, 2024
43014b5
Update to latest libSBMLNetwork.
luciansmith Aug 9, 2024
5030cff
Fix setting layout width/height.
luciansmith Aug 9, 2024
3b9ad99
Add error checking for alignment.
luciansmith Aug 9, 2024
107a161
Add Antimony export.
luciansmith Aug 12, 2024
e8bc6fc
Round-trip everything.
luciansmith Aug 15, 2024
6351762
Fix where we find libraries and include dirs.
luciansmith Aug 16, 2024
9534c0f
Update libroadrunner-deps version.
luciansmith Aug 16, 2024
fe04c52
Merge branch 'develop' into add-layout-render
luciansmith Aug 16, 2024
30bc619
Fix import name.
luciansmith Aug 16, 2024
6f0610e
Merge branch 'add-layout-render' of https://github.com/sys-bio/antimo…
luciansmith Aug 16, 2024
114faf9
Other name for sbmlnetwork library.
luciansmith Aug 16, 2024
ca64adc
Error messages have changed.
luciansmith Aug 16, 2024
009fe54
Try adding full name of library.
luciansmith Aug 16, 2024
f9caa43
Add the DL library if defined.
luciansmith Aug 16, 2024
39717e6
Remove now-unused types; fix missing case statements.
luciansmith Aug 16, 2024
f5a3764
Add more missing cases; add comments.
luciansmith Aug 16, 2024
5939ef5
Typo.
luciansmith Aug 16, 2024
11fe865
Remove sprintf.
luciansmith Aug 17, 2024
b6ab79d
Fix python warning.
luciansmith Aug 17, 2024
74f357b
Fix more warnings.
luciansmith Aug 17, 2024
cfc1d27
Write 'size' instead of height/width.
luciansmith Aug 20, 2024
4ddadfa
A variety of fixes and updates:
luciansmith Aug 23, 2024
fa9ea45
Clean up output; get 'group defaults'.
luciansmith Aug 24, 2024
0c35796
Update version number to 3.0
luciansmith Aug 24, 2024
c6b2a22
Get SBMLNetwork update.
luciansmith Aug 24, 2024
83518ce
Update tests to v3.0.0
luciansmith Aug 24, 2024
e14b5d6
Several fixes:
luciansmith Aug 26, 2024
46f8bee
Update to latest SBMLNetwork.
luciansmith Aug 27, 2024
5ed2aac
Better NaN protection; latest SBMLNetwork.
luciansmith Aug 29, 2024
f8bfae0
Update SBMLNetwork.
luciansmith Sep 1, 2024
51ba934
Fix memory leaks; handle empty styles.
luciansmith Sep 11, 2024
da5519c
Fix another memory leak.
luciansmith Sep 12, 2024
8f1a1f1
Free the user data that SBMLNetwork creates.
luciansmith Sep 16, 2024
35bb780
Update libsbml and SBMLNetwork.
luciansmith Sep 17, 2024
6076607
Update to get SBMLNetwork color bug fix.
luciansmith Sep 17, 2024
f48bf90
Explicitly call setX, etc. with 'false'.
luciansmith Sep 18, 2024
64cd944
Adapt to new SBMLNetwork layout/align functions.
luciansmith Sep 24, 2024
2492862
Forgot to commit module.cpp...
luciansmith Sep 24, 2024
1364e37
More layout updates:
luciansmith Oct 1, 2024
139552b
Add actual layout/render test source.
luciansmith Oct 1, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
libroadrunner_deps_owner: [ "sys-bio" ]
libroadrunner_deps_repo: [ "libroadrunner-deps" ]
libroadrunner_deps_name: [ "libroadrunner-deps" ]
libroadrunner_deps_release_version: [ "v2.1.2" ]
libroadrunner_deps_release_version: [ "v2.2.7" ]
python_version: [ "3.12" ]

runs-on: ${{ matrix.platform.os_name }}
Expand Down
36 changes: 31 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ project(libantimony)
#
# Set up version information.
#
SET(LIBANTIMONY_VERSION_MAJOR 2)
SET(LIBANTIMONY_VERSION_MINOR 15)
SET(LIBANTIMONY_VERSION_MAJOR 3)
SET(LIBANTIMONY_VERSION_MINOR 0)
SET(LIBANTIMONY_VERSION_PATCH ".0")
SET(LIBANTIMONY_VERSION_RELEASE "")

Expand Down Expand Up @@ -255,7 +255,7 @@ endif(WITH_CELLML)

if(WITH_LIBSBML_EXPAT)
find_library(EXPAT_LIBRARY
NAMES libexpat.lib libexpat.so libexpat.dylib libexpat expat.lib expat.so expat.dylib expat
NAMES libexpat.lib libexpat.so libexpat.dylib libexpat expat.lib expat.so expat.dylib expat libexpatdMD libexpatMD
PATHS /usr/lib /usr/local/lib
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dependencies/lib
Expand Down Expand Up @@ -338,6 +338,30 @@ if(WITH_LIBSBML_COMPRESSION)
set(LIBANTIMONY_LIBS ${LIBANTIMONY_LIBS} ${BZIP_LIBRARY} )
endif()

if(WITH_SBML)
find_library(SBMLNETWORK_LIBRARY
NAMES libsbmlnetwork-static.lib sbmlnetwork-static.lib libsbmlnetwork-static sbmlnetwork-static libsbmlnetwork-staticmdd libsbmlnetwork-staticmd libsbmlnetwork-staticd libsbmlnetwork-staticd.a
PATHS /usr/lib /usr/local/lib
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dependencies/lib
${LIBSBML_INCLUDE_DIR}/../lib
)
set(LIBANTIMONY_LIBS ${LIBANTIMONY_LIBS} ${SBMLNETWORK_LIBRARY} )

find_path(SBMLNETWORK_INCLUDE_DIR
NAMES libsbmlnetwork_common.h
PATHS /usr/include /usr/local/include ${LIBSBML_INSTALL_DIR}/include
DOC "The directory containing the SBMLNetwork include files."
)

INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${SBMLNETWORK_INCLUDE_DIR} )
# SBMLNETWORK uses stuff from the 'dl' library on some platforms. CMake defines CMAKE_DL_LIBS if so.
set(LIBANTIMONY_LIBS ${LIBANTIMONY_LIBS} ${CMAKE_DL_LIBS} )

endif()

message(STATUS "Antimony libs: ${LIBANTIMONY_LIBS}")

###############################################################################
#
# If WITH_SWIG is selected, we need to find swig
Expand Down Expand Up @@ -534,9 +558,9 @@ file(GLOB LIBANTIMONY_SOURCES
${ANTIMONY_SRC_DIR}cellmlx.cpp
${ANTIMONY_SRC_DIR}constraint.cpp
${ANTIMONY_SRC_DIR}dnastrand.cpp
${ANTIMONY_SRC_DIR}uncertWrapper.cpp
${ANTIMONY_SRC_DIR}event.cpp
${ANTIMONY_SRC_DIR}formula.cpp
${ANTIMONY_SRC_DIR}layoutWrapper.cpp
${ANTIMONY_SRC_DIR}module.cpp
${ANTIMONY_SRC_DIR}reactantlist.cpp
${ANTIMONY_SRC_DIR}reaction.cpp
Expand All @@ -548,6 +572,7 @@ file(GLOB LIBANTIMONY_SOURCES
${ANTIMONY_SRC_DIR}unitdef.cpp
${ANTIMONY_SRC_DIR}unitelement.cpp
${ANTIMONY_SRC_DIR}userfunction.cpp
${ANTIMONY_SRC_DIR}uncertWrapper.cpp
${ANTIMONY_SRC_DIR}unitdef.cpp
${ANTIMONY_SRC_DIR}unitelement.cpp
${ANTIMONY_SRC_DIR}variable.cpp
Expand All @@ -570,10 +595,10 @@ file(GLOB LIBANTIMONY_HEADERS
${ANTIMONY_SRC_DIR}cellmlx.h
${ANTIMONY_SRC_DIR}constraint.h
${ANTIMONY_SRC_DIR}dnastrand.h
${ANTIMONY_SRC_DIR}uncertWrapper.h
${ANTIMONY_SRC_DIR}enums.h
${ANTIMONY_SRC_DIR}event.h
${ANTIMONY_SRC_DIR}formula.h
${ANTIMONY_SRC_DIR}layoutWrapper.h
${ANTIMONY_SRC_DIR}libutil.h
${ANTIMONY_SRC_DIR}module.h
${ANTIMONY_SRC_DIR}reactantlist.h
Expand All @@ -583,6 +608,7 @@ file(GLOB LIBANTIMONY_HEADERS
${ANTIMONY_SRC_DIR}sboTermWrapper.h
${ANTIMONY_SRC_DIR}stringx.h
${ANTIMONY_SRC_DIR}typex.h
${ANTIMONY_SRC_DIR}uncertWrapper.h
${ANTIMONY_SRC_DIR}unitdef.h
${ANTIMONY_SRC_DIR}unitelement.h
${ANTIMONY_SRC_DIR}userfunction.h
Expand Down
6 changes: 3 additions & 3 deletions src/annotated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ string Annotated::GetCreatorStringFor(const string& id) const
{
string ret = "";
ModelHistory* mh = const_cast<ModelHistory*>(&m_history);
for (size_t v = 0; v < mh->getNumCreators(); v++) {
for (unsigned int v = 0; v < mh->getNumCreators(); v++) {
string left = id + " creator" + to_string(v+1) + ".";
ModelCreator* mc = mh->getCreator(v);
if (mc->isSetName()) {
Expand Down Expand Up @@ -318,7 +318,7 @@ void Annotated::AppendNotes(const std::vector<std::string>& resources)
}
}

bool Annotated::addCreatorInfo(int creator_number, const string& creator_substr, const vector<string>& resources)
bool Annotated::addCreatorInfo(unsigned int creator_number, const string& creator_substr, const vector<string>& resources)
{
ModelCreator* creator = NULL;
if (creator_number <= m_history.getNumCreators()) {
Expand Down Expand Up @@ -518,7 +518,7 @@ void Annotated::PopulateCVTerms(SBase* sbmlobj)
if (sbmlobj->isSetCreatedDate()) {
SetCreated(sbmlobj->getCreatedDate());
}
for (size_t i = 0; i < sbmlobj->getNumModifiedDates(); i++) {
for (unsigned int i = 0; i < sbmlobj->getNumModifiedDates(); i++) {
AppendModified(sbmlobj->getModifiedDate(i));
}
if (sbmlobj->isSetModelHistory()) {
Expand Down
2 changes: 1 addition & 1 deletion src/annotated.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::vector<std::string> ResourcesToVector(const libsbml::CVTerm* t) const;
void AppendBiolQualifiers(const libsbml::BiolQualifierType_t qual, const std::vector<std::string>& resources);
// appends notes (just strings)
void AppendNotes(const std::vector<std::string>& resources);
bool addCreatorInfo(int creator_number, const std::string& creator_substr, const std::vector<std::string>& resources);
bool addCreatorInfo(unsigned int creator_number, const std::string& creator_substr, const std::vector<std::string>& resources);
void SetCreated(libsbml::Date* date);
bool SetCreated(const std::string& date);
bool SetCreated(const std::string& qual, const std::string& date);
Expand Down
Loading
Loading