Read __version__ from metadata; fix stale master/PSLmodels references - #312
Open
vahid-ahmadi wants to merge 1 commit into
Open
Read __version__ from metadata; fix stale master/PSLmodels references#312vahid-ahmadi wants to merge 1 commit into
vahid-ahmadi wants to merge 1 commit into
Conversation
microdf/__init__.py hardcoded __version__ = "0.1.0" while pyproject.toml said 1.3.1, so anything introspecting the installed package got the wrong answer. Read it from importlib.metadata instead — the automated version bump only touches pyproject.toml, so a hardcoded string will always drift. Also: the Codecov badge pointed at branch/master (default is main, so it tracked nothing), ROADMAP.md linked PSLmodels/microdf issues (the repo moved to the PolicyEngine org in #226), and CLAUDE.md told contributors to branch from master. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #306
Changes
__version__was wrong.microdf/__init__.pyhardcoded0.1.0whilepyproject.tomlsaid1.3.1. Now read fromimportlib.metadata.version("microdf-python"), so it can't drift again — the automated version bump only touchespyproject.toml. Falls back to"unknown"when the package isn't installed (running straight from a source tree).branch/master; the default branch ismain, so it was tracking nothing.ROADMAP.mdlinkedPSLmodels/microdfissues — the repo moved to the PolicyEngine org in Transfer to PolicyEngine GitHub organization #226.CLAUDE.mdtold contributors to branch frommaster.Verification
python -c "import microdf; print(microdf.__version__)"->1.3.1mdf.__version__ == importlib.metadata.version("microdf-python"), so the two can't diverge silently againmake test— 63 passed on pandas 3.0.5 and pandas 2.3.3The README change here is only the badge URL — the ruff 0.16 reformatting of the usage block is #307, kept separate to avoid a conflict.