diff --git a/msapy/__init__.py b/msapy/__init__.py index d05747b..3367cc1 100644 --- a/msapy/__init__.py +++ b/msapy/__init__.py @@ -1,12 +1,4 @@ from msapy import msa, utils, checks -import toml -import os -package_dir = os.path.abspath(os.path.dirname(__file__)) -pyproject_path = os.path.join(package_dir, "..", "pyproject.toml") - -try: - __version__ = toml.load(pyproject_path)["tool"]["poetry"]["version"] -except Exception as e: - __version__ = "unknown" - print(f"Warning: Could not load version from pyproject.toml: {e}") \ No newline at end of file +__all__ = ["msa", "utils", "checks"] +__version__ = "1.7.1" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b009ca5..2a7efb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "msapy" -version = "1.7" +version = "1.7.1" description = "Multi-perturbation Shapley value Analysis (MSA)" homepage = "https://github.com/kuffmode/msa" repository = "https://github.com/kuffmode/msa" diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000..2ced7da --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,5 @@ +import toml +import msapy + +def test_version(): + assert msapy.__version__ == toml.load("pyproject.toml")["tool"]["poetry"]["version"] \ No newline at end of file