-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated biosimulators library with test
- Loading branch information
1 parent
e0d6d8c
commit 84eca2f
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
import json | ||
from tempfile import mkdtemp as temp_dir | ||
from smoldyn.biosimulators.combine import exec_sedml_docs_in_combine_archive as exec_archive | ||
|
||
|
||
def test_simularium(): | ||
archive_path = '/Users/alex/Desktop/uchc_work/repos/Smoldyn/examples/S99_more/Min/Min1.omex' | ||
output_dir = '/Users/alex/Desktop/uchc_work' | ||
|
||
exec_archive(archive_path, output_dir) | ||
files = [f for f in os.listdir(output_dir)] | ||
print(f'THE FILES:\n{files}\n') | ||
for f in files: | ||
if 'simularium' in f: | ||
with open(os.path.join(output_dir, f), 'r') as fp: | ||
data = json.load(fp) | ||
print(f'THE SIMULARIUM:\n{data}') | ||
|
||
|
||
|
||
|
||
|
||
if __name__ == '__main__': | ||
test_simularium() |