diff --git a/.versionrc.js b/.versionrc.js index f8efc19..d0d8ca2 100644 --- a/.versionrc.js +++ b/.versionrc.js @@ -1,5 +1,5 @@ const tracker = { - filename: 'starling_sim/version.py', + filename: 'starling_sim/__init__.py', updater: '.versionrc.python.updater.js' } diff --git a/setup.py b/setup.py index d6c603e..42e4e81 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ import setuptools import os -from starling_sim.version import __version__ +from starling_sim import __version__ # short description of the project DESC = "Agent-based framework for mobility simulation" diff --git a/starling_sim/__init__.py b/starling_sim/__init__.py index 7f4799d..ede4807 100644 --- a/starling_sim/__init__.py +++ b/starling_sim/__init__.py @@ -1,3 +1,6 @@ """ -This package contains modules related to the simulation run +This package contains the different modules of Starling. """ + +#: Starling version +__version__ = "0.10.0" diff --git a/starling_sim/run.py b/starling_sim/run.py index aa78518..c6ce8d7 100644 --- a/starling_sim/run.py +++ b/starling_sim/run.py @@ -8,7 +8,7 @@ from starling_sim.utils.simulation_logging import DEFAULT_LOGGER_LEVEL, setup_logging from starling_sim.utils.test_models import launch_tests from starling_sim.utils import paths -from starling_sim.version import __version__ +from starling_sim import __version__ def run_main(): diff --git a/starling_sim/simulation_scenario.py b/starling_sim/simulation_scenario.py index 14616b8..4ac16c7 100644 --- a/starling_sim/simulation_scenario.py +++ b/starling_sim/simulation_scenario.py @@ -7,10 +7,10 @@ import json from copy import deepcopy -from starling_sim.utils.utils import json_load, validate_against_schema, get_git_revision_hash +from starling_sim.utils.utils import json_load, validate_against_schema from starling_sim.utils import paths -from starling_sim.version import __version__ from starling_sim.utils.config import config +from starling_sim import __version__ class SimulationScenario: @@ -157,9 +157,6 @@ def init_run_summary(self): # get starling version summary["starling_version"] = __version__ - # get current commit - summary["commit"] = get_git_revision_hash() - # copy scenario parameters summary["parameters"] = self.copy_parameters() diff --git a/starling_sim/utils/utils.py b/starling_sim/utils/utils.py index 9c64804..bc827ff 100644 --- a/starling_sim/utils/utils.py +++ b/starling_sim/utils/utils.py @@ -1064,16 +1064,6 @@ def create_if_not_exists(folder): return False -# git - - -def get_git_revision_hash() -> str: - """ - Get current git commit hash - """ - return subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip() - - # console log diff --git a/starling_sim/version.py b/starling_sim/version.py deleted file mode 100644 index b67b92c..0000000 --- a/starling_sim/version.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Starling version""" - -__version__ = "0.10.0"