From 65a72c1c354dc5ed7fc323738d2b70bcc54c5053 Mon Sep 17 00:00:00 2001 From: Jonathan Karr Date: Fri, 13 Aug 2021 17:52:49 -0400 Subject: [PATCH] feat: added method to get the version of AMICI --- biosimulators_amici/__init__.py | 11 +++++++++++ biosimulators_amici/__main__.py | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/biosimulators_amici/__init__.py b/biosimulators_amici/__init__.py index e023337..6e085d1 100644 --- a/biosimulators_amici/__init__.py +++ b/biosimulators_amici/__init__.py @@ -1,4 +1,15 @@ +import amici + from ._version import __version__ # noqa: F401 # :obj:`str`: version # from .core import exec_sedml_docs_in_combine_archive # noqa: F401 + + +def get_simulator_version(): + """ Get the version of AMICI + + Returns: + :obj:`str`: version + """ + return amici.__version__ diff --git a/biosimulators_amici/__main__.py b/biosimulators_amici/__main__.py index 25346b4..c12ff81 100644 --- a/biosimulators_amici/__main__.py +++ b/biosimulators_amici/__main__.py @@ -6,13 +6,13 @@ :License: MIT """ +from . import get_simulator_version from ._version import __version__ from .core import exec_sedml_docs_in_combine_archive from biosimulators_utils.simulator.cli import build_cli -import amici App = build_cli('biosimulators-amici', __version__, - 'AMICI', amici.__version__, 'https://github.com/AMICI-dev/AMICI', + 'AMICI', get_simulator_version(), 'https://github.com/AMICI-dev/AMICI', exec_sedml_docs_in_combine_archive)