Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

* `geckopy.__version__` is the installed version of geckopy.
* `cma` is a required dependency of geckopy and the extra `evotune` is removed. `import geckopy` imports `cma`.
* `enzyme_usage` reports `measured_protein`, `demanded_protein` and `demand_ratio`, the usage of the enzymes with a measured concentration divided by their measured concentrations, and the same restricted to enzymes with a usage above 1e-7 mg/gDCW (`measured_protein_active`, `demand_ratio_active`). `report_enzyme_usage` carries `demand_ratio` and `demand_ratio_active`. GECKO's `getEnzymeUsage` and `reportEnzymeUsage` give the same values.
* geckopy is licensed under the GNU General Public License v3 (GPL-3.0), as RAVEN and raven-toolbox. `LICENSE`, the `license` field and the classifier of `pyproject.toml`, and the README state it. Releases up to 4.0.0b2 were published under the MIT licence.
Expand Down
7 changes: 7 additions & 0 deletions src/geckopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
live in raven-toolbox, see ``raven_toolbox.io.ec_data``)
- **Per-enzyme proxy**: ``Enzyme`` (lazy view via ``model.enzymes``)
"""
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("geckopy")
except PackageNotFoundError: # running from a source tree without an install
__version__ = "0.0.0+unknown"

# Adapter
from geckopy.adapter import ModelAdapter, ModelParameters

Expand Down
8 changes: 8 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""geckopy.__version__ is the installed version of the package."""
from importlib.metadata import version

import geckopy


def test_version_is_the_installed_version():
assert geckopy.__version__ == version("geckopy")
Loading