Skip to content

Defer BioNetGen app setup in library imports#108

Open
wshlavacek wants to merge 1 commit into
RuleWorld:mainfrom
wshlavacek:defer-import-time-bng-setup
Open

Defer BioNetGen app setup in library imports#108
wshlavacek wants to merge 1 commit into
RuleWorld:mainfrom
wshlavacek:defer-import-time-bng-setup

Conversation

@wshlavacek

Copy link
Copy Markdown
Contributor

Summary

  • remove module-level BioNetGen().setup() from modelapi, network, and C simulator imports
  • resolve the default BNG path lazily when BNGFile is constructed without an explicit BNGPATH
  • pass explicit BNGPATH / suppress options through bngmodel -> BNGParser -> BNGFile
  • add regression coverage that importing library modules does not call Cement App.setup()

Tests

  • uvx black --check bionetgen/modelapi/bngfile.py bionetgen/modelapi/bngparser.py bionetgen/modelapi/model.py bionetgen/network/network.py bionetgen/network/networkparser.py bionetgen/simulator/csimulator.py tests/test_deferred_app_setup.py tests/test_csimulator_errors.py tests/test_modelapi_export_errors.py
  • .venv/bin/python -m pytest tests/test_deferred_app_setup.py tests/test_csimulator_errors.py tests/test_modelapi_export_errors.py tests/test_main_accessors.py -q

Local full-suite note

  • .venv/bin/python -m pytest -q currently reaches unrelated local environment failures for missing libsbml, missing/undiscovered BNG2.pl, and visualization output checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant