From 14425fb961e3425155712ab90bb4587772e8aab3 Mon Sep 17 00:00:00 2001 From: alexPatrie Date: Thu, 1 Feb 2024 13:55:42 -0500 Subject: [PATCH 1/3] chore: added files to gitignore for alex dev --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3eb97453..5e2d0e73 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ log .coverage htmlcov/ +.idea/ +build-install.sh From 54f9195791d94293b019084fb59ca6b1fe977c10 Mon Sep 17 00:00:00 2001 From: alexPatrie Date: Thu, 1 Feb 2024 13:56:23 -0500 Subject: [PATCH 2/3] feat: added biosimularium as dep and integrated in exec function --- source/python/setup.py.in | 1 + .../python/smoldyn/biosimulators/combine.py | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/source/python/setup.py.in b/source/python/setup.py.in index dd792a63..2060067d 100644 --- a/source/python/setup.py.in +++ b/source/python/setup.py.in @@ -63,6 +63,7 @@ setuptools.setup( "biosimulators-utils[logging]>=0.1.124", "numpy", "pandas", + "biosimulators-simularium>=0.5.24" ], "biosimulators-dev": [ "flake8", diff --git a/source/python/smoldyn/biosimulators/combine.py b/source/python/smoldyn/biosimulators/combine.py index 9a9fbd88..d3aa9964 100644 --- a/source/python/smoldyn/biosimulators/combine.py +++ b/source/python/smoldyn/biosimulators/combine.py @@ -25,6 +25,7 @@ Symbol) from biosimulators_utils.sedml.exec import exec_sed_doc as base_exec_sed_doc from biosimulators_utils.utils.core import validate_str_value, parse_value, raise_errors_warnings +from biosimulators_simularium.exec import execute as exec_biosimularium from smoldyn import smoldyn import functools import os @@ -32,6 +33,7 @@ import pandas import re import tempfile +import zipfile import types # noqa: F401 __all__ = ['exec_sedml_docs_in_combine_archive', 'exec_sed_task', 'exec_sed_doc', 'preprocess_sed_task'] @@ -57,9 +59,27 @@ def exec_sedml_docs_in_combine_archive(archive_filename, out_dir, config=None): * :obj:`SedDocumentResults`: results * :obj:`CombineArchiveLog`: log ''' - return exec_sedml_docs_in_archive(exec_sed_doc, archive_filename, out_dir, - apply_xml_model_changes=False, - config=config) + + print('GENERATING A SIMULARIUM FILE ------------- ') + # extract contents from archive + temp_archive_root = tempfile.mkdtemp() + with zipfile.ZipFile(archive_filename, 'r') as ref: + ref.extractall(temp_archive_root) + + # process simularium file generation + exec_biosimularium( + working_dir=temp_archive_root, + output_dir=out_dir, + use_json=True + ) + + print('RUNNING A SEDML SIMULATION ------------------ ') + # process sed result + results, log = exec_sedml_docs_in_archive(exec_sed_doc, archive_filename, out_dir, + apply_xml_model_changes=False, + config=config) + + return results, log def exec_sed_doc(doc, working_dir, base_out_path, rel_out_path=None, From 687fb8e9fb1cbf2ec3918d845583d6f30b497423 Mon Sep 17 00:00:00 2001 From: alexPatrie Date: Thu, 1 Feb 2024 14:41:38 -0500 Subject: [PATCH 3/3] feat: added Min1.omex in examples --- examples/S99_more/Min/Min1.omex | Bin 0 -> 3913 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 examples/S99_more/Min/Min1.omex diff --git a/examples/S99_more/Min/Min1.omex b/examples/S99_more/Min/Min1.omex new file mode 100644 index 0000000000000000000000000000000000000000..cd12beb3d5e60c38d37547d737166d5c4bfd3b97 GIT binary patch literal 3913 zcmZ{nbx;)C`p0+a2I+d2kS;0dMtbR5K#*EOx&)+g>5ipDKv)owk`N>WL|Q^RmZeKr z=?;Iq^Sg8JeVw`IoS8Fc&iVZFoSDx&Up*~MEJ^?d01t2*E)S93u_+nE0staw2=-b^+)X$HqZZ72=2mPvwwws9ath0w4 zS=M!gX1ZQF#)G0ixho$%$9I31rxWqaxNDnzWn3lq2-dNw+o%e za(n|+#Mz>0`E))NBbv&|;Sfd5(xSo&2;-(NVP*bA4VY0ApjadC)`4O^+32Sn2J_t{ z)#2!_P;%xKZZ#~!iz|5QC4hN#d><$?Fw)@G=0BRT^6C+pwmMX71_&4;RS4)y;pR|p z9Vp)_9Oot_$U$h^`L(Ll9Jc@J@f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