Skip to content

Read the package version from installed metadata - #200

Open
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix-version-metadata
Open

vahid-ahmadi wants to merge 1 commit into
mainfrom
fix-version-metadata

Conversation

@vahid-ahmadi

Copy link
Copy Markdown

microimpute/__init__.py hardcoded __version__ = "1.1.2" while pyproject.toml declared 3.1.1 — two major versions apart, because .github/bump_version.py only rewrites pyproject.toml.

Reading from importlib.metadata gives one source of truth, so the two cannot drift again:

>>> import microimpute; microimpute.__version__
'3.1.1'

Falls back to "unknown" when running from a source tree with no install.

Worth fixing ahead of the JOSS submission in the paper PR: a reviewer checks that the archived release version matches the software, and microimpute.__version__ was reporting the wrong one.

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
microimpute-dashboard Ready Ready Preview Sep 14, 2026 5:30pm UTC

__init__.py carried a hardcoded 1.1.2 while pyproject.toml was at 3.1.1, two
major versions apart, because the version bump script only updates
pyproject.toml. Reading from importlib.metadata means there is one source of
truth and the two cannot drift again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant