Skip to content

Read __version__ from metadata; fix stale master/PSLmodels references - #312

Open
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix/version-and-stale-refs
Open

Read __version__ from metadata; fix stale master/PSLmodels references#312
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix/version-and-stale-refs

Conversation

@vahid-ahmadi

Copy link
Copy Markdown

Closes #306

Changes

  1. __version__ was wrong. microdf/__init__.py hardcoded 0.1.0 while pyproject.toml said 1.3.1. Now read from importlib.metadata.version("microdf-python"), so it can't drift again — the automated version bump only touches pyproject.toml. Falls back to "unknown" when the package isn't installed (running straight from a source tree).
  2. Codecov badge pointed at branch/master; the default branch is main, so it was tracking nothing.
  3. ROADMAP.md linked PSLmodels/microdf issues — the repo moved to the PolicyEngine org in Transfer to PolicyEngine GitHub organization #226.
  4. CLAUDE.md told contributors to branch from master.

Verification

  • python -c "import microdf; print(microdf.__version__)" -> 1.3.1
  • New test asserts mdf.__version__ == importlib.metadata.version("microdf-python"), so the two can't diverge silently again
  • make test — 63 passed on pandas 3.0.5 and pandas 2.3.3

The 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.

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>
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.

__version__ says 0.1.0 (pyproject says 1.3.1), plus stale master/PSLmodels references

1 participant