Skip to content
Open
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/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest'

- name: Fetch BNGL test corpus
run: uv run --no-project python -P tests/v1/fetch_bngl_corpus.py
run: uv run --no-project python -P tests/models/fetch_bngl_corpus.py

- name: Unit tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ venv.bak/
_untracked
doc/_static/README.rst

# BNGL corpus fixtures are fetched on demand (tests/v1/fetch_bngl_corpus.py)
tests/v1/bngl_corpus/*.bngl
# BNGL corpus fixtures are fetched on demand (tests/models/fetch_bngl_corpus.py)
tests/models/bngl_corpus/*.bngl

# CI resolves the latest dependency versions
uv.lock
6 changes: 6 additions & 0 deletions changelog.d/+v1-pysb-bngl-models.deprecation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PySB and BNGL models are only supported with PEtab v2.
`petab.v1.models.pysb_model`, `petab.v1.models.bngl_model`, and loading
PySB or BNGL models via `petab.v1` are deprecated and will be removed in a
future release; use `petab.v2.models.pysb_model` and
`petab.v2.models.bngl_model` instead
([#622](https://github.com/PEtab-dev/libpetab-python/pull/622))
2 changes: 1 addition & 1 deletion doc/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ have been downloaded via:

.. code-block:: bash

uv run --no-project python -P tests/v1/fetch_bngl_corpus.py
uv run --no-project python -P tests/models/fetch_bngl_corpus.py

Style guide
-----------
Expand Down
34 changes: 34 additions & 0 deletions petab/_models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Model types supported by PEtab, shared by :mod:`petab.v1` and
:mod:`petab.v2`.

Use :mod:`petab.v1.models` or :mod:`petab.v2.models` instead of importing
from here.
"""

#: SBML model type as used in a PEtab v2 yaml file as `language`.
MODEL_TYPE_SBML = "sbml"
#: PySB model type as used in a PEtab v2 yaml file as `language`.
MODEL_TYPE_PYSB = "pysb"
#: BNGL model type as used in a PEtab v2 yaml file as `language`.
MODEL_TYPE_BNGL = "bngl"

known_model_types = {
MODEL_TYPE_SBML,
MODEL_TYPE_PYSB,
MODEL_TYPE_BNGL,
}

# The model modules use helpers from `petab.v1`, whose initialization
# imports `petab.v1.models` and thus this package; initialize `petab.v1`
# first to avoid a circular import.
import petab.v1 # noqa: E402, F401

from .model import Model # noqa: E402

__all__ = [
"MODEL_TYPE_BNGL",
"MODEL_TYPE_PYSB",
"MODEL_TYPE_SBML",
"Model",
"known_model_types",
]
Loading
Loading