Skip to content

refactor(version): centralize Pacta version using package metadata#38

Merged
akhundMurad merged 2 commits intopacta-dev:mainfrom
PraaneshSelvaraj:refactor/centralize-version-source
Feb 9, 2026
Merged

refactor(version): centralize Pacta version using package metadata#38
akhundMurad merged 2 commits intopacta-dev:mainfrom
PraaneshSelvaraj:refactor/centralize-version-source

Conversation

@PraaneshSelvaraj
Copy link
Copy Markdown
Contributor

This change centralizes how Pacta’s version is handled by using package metadata as the single source of truth, instead of keeping hard-coded version strings in source files and tests.

The version is now defined only in pyproject.toml and read dynamically at runtime using importlib.metadata. This helps avoid duplication and keeps the CLI output, reporting, and tests in sync automatically.

A default fallback version (0.0.0-dev) is used when package metadata may not be available. Happy to adjust this if you’d prefer a different fallback value.

Fixes: #31

Copy link
Copy Markdown
Member

@akhundMurad akhundMurad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you need to run make format first

@PraaneshSelvaraj
Copy link
Copy Markdown
Contributor Author

Thanks, Ran make format and pushed the updated changes.

@akhundMurad akhundMurad merged commit f2d35c4 into pacta-dev:main Feb 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Centralize Pacta version definition

2 participants