Skip to content

Conversation

@fmueller
Copy link
Owner

Motivation

  • The scribae version output duplicated the tagged version when git describe already included a v-prefixed tag, producing strings like v0.1.0-v0.1.0-13-gcfeefb2-dirty instead of the expected v0.1.0-13-gcfeefb2-dirty.

Description

  • Change _resolve_version in src/scribae/__init__.py to detect and strip a leading v{resolved}- prefix from the git description, and to return the resolved package version when the git description equals the tag prefix exactly.
  • Add a regression test tests/unit/version_test.py to assert that _resolve_version() produces 0.1.0-13-gcfeefb2-dirty when the git suffix is v0.1.0-13-gcfeefb2-dirty and the package version is 0.1.0.

Testing

  • Ran the test suite with uv run pytest and all tests passed (160 passed).
  • Ran linting with uv run ruff check . and it completed with no issues.
  • Ran static type checks with uv run mypy which reported failures due to absent torch type stubs in the environment (these are unrelated to the version change and stem from the optional translation dependency).

Codex Task

@fmueller fmueller merged commit 1ef79a7 into main Jan 24, 2026
3 checks passed
@fmueller fmueller deleted the codex/fix-version-command-output-formatting branch January 24, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants