Skip to content

Commit

Permalink
Remove pure-python exporter (#543)
Browse files Browse the repository at this point in the history
This exporter generated a single-file standalone python script that could
simulate the exported model without requiring PySB itself (or Perl or BNG).
This exporter is very difficult to keep updated, and these days it's much
easier to get a working PySB environment with all of its dependencies.
  • Loading branch information
jmuhlich committed May 17, 2021
1 parent 016fb96 commit b5b7d40
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 271 deletions.
5 changes: 0 additions & 5 deletions doc/modules/export/python.rst

This file was deleted.

3 changes: 0 additions & 3 deletions pysb/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
- ``kappa``
- ``potterswheel``
- ``sbml``
- ``python``
- ``pysb_flat``
- ``mathematica``
- ``matlab``
Expand Down Expand Up @@ -70,7 +69,6 @@
bngl
bng_net
kappa
python
pysb_flat
stochkit
json
Expand Down Expand Up @@ -130,7 +128,6 @@ def export(self):
'kappa': 'KappaExporter',
'potterswheel': 'PottersWheelExporter',
'sbml': 'SbmlExporter',
'python': 'PythonExporter',
'pysb_flat': 'PysbFlatExporter',
'mathematica': 'MathematicaExporter',
'matlab': 'MatlabExporter',
Expand Down
259 changes: 0 additions & 259 deletions pysb/export/python.py

This file was deleted.

5 changes: 1 addition & 4 deletions pysb/tests/test_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ def check_convert(model, format):
raise

if exported_file is not None:
if format == 'python':
# linspace arguments picked to avoid VODE warning
exec(exported_file + 'Model().simulate(tspan=numpy.linspace(0,1,501))\n', {'numpy': np})
elif format == 'pysb_flat':
if format == 'pysb_flat':
exec(exported_file, {'__name__': model.name})
elif format == 'sbml':
# Skip the simulation comparison if roadrunner not available
Expand Down

0 comments on commit b5b7d40

Please sign in to comment.