File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 runs-on : ubuntu-latest
2323 steps :
2424 - uses : actions/checkout@v6
25+ with :
26+ fetch-depth : 0
2527
2628 - uses : astral-sh/setup-uv@v7
2729 with :
4648 python-version : ["3.11", "3.12", "3.13"]
4749 steps :
4850 - uses : actions/checkout@v6
51+ with :
52+ fetch-depth : 0
4953
5054 - uses : astral-sh/setup-uv@v7
5155 with :
Original file line number Diff line number Diff line change 1919 steps :
2020 - name : ' Checkout GitHub Action'
2121 uses : actions/checkout@main
22+ with :
23+ fetch-depth : 0
2224
2325 - name : Install uv
2426 uses : astral-sh/setup-uv@v6
Original file line number Diff line number Diff line change 2020 - uses : actions/checkout@v6
2121 with :
2222 ref : ${{ github.event.inputs.tag || github.ref_name }}
23+ fetch-depth : 0
2324
2425 - uses : astral-sh/setup-uv@v7
2526 with :
3132 cache : npm
3233 cache-dependency-path : ui/package-lock.json
3334
34- - name : Set version from tag
35- run : uv version "${{ github.event.inputs.tag || github.ref_name }}" --package agentevals-cli
36-
3735 - name : Build core and bundled wheels
3836 run : make release
3937
5149 - uses : actions/checkout@v6
5250 with :
5351 ref : ${{ github.event.inputs.tag || github.ref_name }}
52+ fetch-depth : 0
5453
5554 - uses : astral-sh/setup-uv@v7
5655 with :
6564 # Same bundle as `make release` / `build-bundle`: wheel must include ui/dist in src/agentevals/_static
6665 # (see [tool.hatch.build] artifacts in pyproject.toml).
6766 - name : Release Python package (wheel + sdist with bundled UI)
68- env :
69- VERSION : ${{ github.event.inputs.tag || github.ref_name }}
7067 run : |
7168 uv sync --package agentevals-cli --all-extras
72- uv version "$VERSION" --package agentevals-cli
7369
7470 make build-ui
7571 rm -rf src/agentevals/_static
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" hatchling" ]
2+ requires = [" hatchling" , " hatch-vcs " ]
33build-backend = " hatchling.build"
44
55[project ]
66name = " agentevals-cli"
7- version = " 0.7.1 "
7+ dynamic = [ " version " ]
88description = " Standalone framework to evaluate agent correctness based on portable OpenTelemetry traces"
99readme = " README.md"
1010requires-python = " >=3.11"
@@ -40,6 +40,9 @@ postgres = [
4040[project .scripts ]
4141agentevals = " agentevals.cli:main"
4242
43+ [tool .hatch .version ]
44+ source = " vcs"
45+
4346[tool .hatch .build ]
4447artifacts = [" src/agentevals/_static/**" ]
4548
Original file line number Diff line number Diff line change 33from importlib .metadata import PackageNotFoundError , version
44
55try :
6- __version__ = version ("agentevals" )
6+ __version__ = version ("agentevals-cli " )
77except PackageNotFoundError :
88 __version__ = "0.0.0-dev"
99
Original file line number Diff line number Diff line change 1010import pytest
1111from click .testing import CliRunner
1212
13+ import agentevals
1314from agentevals import cli
1415from agentevals .runner import RunResult
1516
@@ -163,3 +164,22 @@ async def fake_run_evaluation(config):
163164 "custom_eval" ,
164165 "response_match_score" ,
165166 ]
167+
168+
169+ def test_version_resolves_from_installed_distribution ():
170+ assert agentevals .__version__ != "0.0.0-dev" , (
171+ "agentevals.__version__ fell back to the dev sentinel. Likely causes: "
172+ "(1) the dist name in pyproject.toml diverged from the lookup string "
173+ "in src/agentevals/__init__.py, or (2) hatch-vcs cannot resolve a "
174+ "version (missing git tags in the build environment?)."
175+ )
176+
177+
178+ def test_cli_version_flag_prints_real_version ():
179+ result = CliRunner ().invoke (cli .main , ["--version" ])
180+
181+ assert result .exit_code == 0 , result .output
182+ assert "0.0.0-dev" not in result .output , (
183+ f"`agentevals --version` printed the dev sentinel: { result .output !r} "
184+ )
185+ assert agentevals .__version__ in result .output
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export const Sidebar: React.FC = () => {
110110 } }
111111 />
112112 { state . version && (
113- < span > v{ state . version } </ span >
113+ < span style = { { fontSize : '0.5rem' } } > v{ state . version } </ span >
114114 ) }
115115 </ div >
116116 </ nav >
You can’t perform that action at this time.
0 commit comments