Skip to content

Commit

Permalink
Add version information
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Aug 26, 2022
1 parent bfb3834 commit 33d413c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ style = "semver"
dirty = true

[tool.poetry-dynamic-versioning.substitution]
files = ["src/pineko/__init__.py"]
files = ["src/pineko/version.py"]

[tool.pytest.ini_options]
testpaths = ['tests/']
Expand Down
2 changes: 0 additions & 2 deletions src/pineko/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@

from .cli import command
from .comparator import compare

__version__ = "0.0.0"
4 changes: 3 additions & 1 deletion src/pineko/evolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import rich.panel
import yaml

from . import check, comparator
from . import check, comparator, version


def write_operator_card_from_file(pineappl_path, default_card_path, card_path, xif):
Expand Down Expand Up @@ -142,6 +142,8 @@ def evolve_grid(
)
rich.print(f"Optimizing for {assumptions}")
fktable.optimize(assumptions)
fktable.set_key_value("eko_version", operators["eko_version"])
fktable.set_key_value("pineko_version", version.__version__)
# write
fktable.write_lz4(str(fktable_path))
# compare before/after
Expand Down
3 changes: 3 additions & 0 deletions src/pineko/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
"""Version information."""
__version__ = "0.0.0"

0 comments on commit 33d413c

Please sign in to comment.