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

fix simularium file generation #140

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.7.15', '3.8.12', '3.9.7', '3.10.4', '3.11.0' ]
# python-version: [ '3.7', '3.8', '3.9', '3.10' ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.7.15', '3.8.12', '3.9.7', '3.10.4', '3.11.0' ]
# python-version: [ '3.7', '3.8', '3.9', '3.10' ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion source/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ setuptools.setup(
"biosimulators-utils[logging]>=0.1.124",
"numpy",
"pandas",
"biosimulators-simularium>=0.5.29"
"biosimulators-simularium>=0.6.3"
],
"biosimulators-dev": [
"flake8",
Expand Down
37 changes: 21 additions & 16 deletions source/python/smoldyn/biosimulators/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,32 @@ def exec_sedml_docs_in_combine_archive(archive_filename, out_dir, config=None):
* :obj:`SedDocumentResults`: results
* :obj:`CombineArchiveLog`: log
'''

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
print('RUNNING A SEDML SIMULATION ------------------ ')
results, log = exec_sedml_docs_in_archive(exec_sed_doc, archive_filename, out_dir,
apply_xml_model_changes=False,
config=config)

return results, log
# generate a simularium file
try:
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
)
except Exception as e:
if config.LOG:
log.exception = e
else:
print(str(e))
return results, log


def exec_sed_doc(doc, working_dir, base_out_path, rel_out_path=None,
Expand Down
Loading