Skip to content

feat: export evaluatorq.__version__ - #187

Merged
Baukebrenninkmeijer merged 1 commit into
mainfrom
Baukebrenninkmeijer/package-version-attr
Sep 2, 2026
Merged

feat: export evaluatorq.__version__#187
Baukebrenninkmeijer merged 1 commit into
mainfrom
Baukebrenninkmeijer/package-version-attr

Conversation

@Baukebrenninkmeijer

Copy link
Copy Markdown
Collaborator

import evaluatorq; print(evaluatorq.__version__) works now. It reads installed package metadata (the version is tag-driven via hatch-vcs, so metadata is the only place the real number lives), and falls back to 0.0.0.dev0 when the package is imported from a source checkout that was never installed.

eq --version now prints that same attribute instead of calling importlib.metadata.version('evaluatorq') itself, so the CLI and the library cannot drift apart.

__version__ is added to __all__. No build-config change, no generated _version.py.

🤖 Generated with Claude Code

`import evaluatorq; print(evaluatorq.__version__)` now works. The value comes from installed package metadata (the version is tag-driven via hatch-vcs), falling back to `0.0.0.dev0` when the package is imported from a source checkout that was never installed.

`eq --version` now reads the same attribute instead of calling `importlib.metadata.version` a second time, so the CLI and the library can never disagree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/evaluatorq
  __init__.py 30-31
  cli.py
Project Total  

This report was generated by python-coverage-comment-action

@Baukebrenninkmeijer
Baukebrenninkmeijer merged commit 5196258 into main Sep 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant