Skip to content

Commit 012e498

Browse files
awoll-bdaiexploy-bot
authored andcommitted
Do not use version based on git (#87)
### What change is being made Switch entirely from dynamic to fixed versioning in `pyproject.toml`. ### Why this change is being made As this repository is synced, there is not a single source of truth for versioning based on git, leading eventually to failures from the pixi.lock. ### Tested Ensured that 0.1.0 is applied in the `pixi.lock`. GitOrigin-RevId: a2b322c117eee60e5993ff9a19f8f148c4cec062
1 parent a53eb31 commit 012e498

3 files changed

Lines changed: 19 additions & 31 deletions

File tree

pixi.lock

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ description = "EXport and dePLOY Reinforcement Learning policies."
44
name = "exploy"
55
requires-python = ">=3.11"
66

7-
# Version is determined dynamically from git tags.
8-
dynamic = ["version"]
7+
version = "0.1.0"
98

109
authors = [
1110
{ name = "Dario Bellicoso", email = "dbellicoso@rai-inst.com" },
@@ -74,17 +73,7 @@ Tracker = "https://github.com/bdaiinstitute/exploy/issues"
7473

7574
[build-system]
7675
build-backend = "hatchling.build"
77-
requires = ["hatchling", "hatch-vcs"]
78-
79-
[tool.hatch.version]
80-
source = "vcs"
81-
82-
[tool.hatch.version.raw-options]
83-
version_scheme = "only-version"
84-
local_scheme = "no-local-version"
85-
86-
[tool.hatch.build.hooks.vcs]
87-
version-file = "python/exploy/_version.py"
76+
requires = ["hatchling"]
8877

8978
[tool.hatch.build.targets.sdist]
9079
packages = ["python/exploy"]

python/exploy/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
2-
from ._version import __version__
2+
from importlib.metadata import PackageNotFoundError, version
33

4-
__all__ = [
5-
"__version__",
6-
]
4+
try:
5+
__version__ = version(__name__)
6+
except PackageNotFoundError:
7+
__version__ = "unknown"

0 commit comments

Comments
 (0)