Skip to content

Expose libvcell.__version__ for downstream consumers#18

Open
jcschaff wants to merge 1 commit into
mainfrom
add-version-attribute
Open

Expose libvcell.__version__ for downstream consumers#18
jcschaff wants to merge 1 commit into
mainfrom
add-version-attribute

Conversation

@jcschaff

Copy link
Copy Markdown
Member

Summary

Adds libvcell.__version__ so third-party projects (e.g. pyvcell and its upstream users) can read the installed version programmatically.

import libvcell
libvcell.__version__   # e.g. "0.0.16"
  • Resolved from installed package metadata via importlib.metadata.version (single-sourced from pyproject.toml, no duplication).
  • Falls back to "0.0.0" only when running from an uninstalled source tree (PackageNotFoundError).

Typing note

py.typed is already present and shipped in the wheels (verified in the published 0.0.15.4 artifact + its RECORD), so libvcell is already fully typed for downstream mypy --strict consumers. This PR is the remaining piece of that "make libvcell friendly to typed downstreams" work.

Verification

  • import libvcell works without the native lib loaded (lazy-loaded on first call).
  • mypy --strict passes on the changed module.

🤖 Generated with Claude Code

Adds libvcell.__version__ resolved from installed package metadata via
importlib.metadata, with a 0.0.0 fallback when running from an uninstalled
source tree. Helps third-party projects (e.g. pyvcell) that read the
version programmatically. py.typed is already shipped, so the package is
fully typed for downstream mypy --strict users.

Co-Authored-By: Claude Opus 4.8 (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