Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve version and commit trace #68

Merged
merged 3 commits into from
Sep 8, 2022
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
2 changes: 1 addition & 1 deletion .versionrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const tracker = {
filename: 'starling_sim/version.py',
filename: 'starling_sim/__init__.py',
updater: '.versionrc.python.updater.js'
}

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion starling_sim/__init__.py
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion starling_sim/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
7 changes: 2 additions & 5 deletions starling_sim/simulation_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()

Expand Down
10 changes: 0 additions & 10 deletions starling_sim/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 0 additions & 3 deletions starling_sim/version.py

This file was deleted.