-
Notifications
You must be signed in to change notification settings - Fork 101
Add dynamic versioning #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ional for workflow_dispatch
enable last tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces dynamic versioning to the DoubleML package using setuptools-scm, which automatically determines version numbers from Git tags instead of requiring manual version updates in the codebase. The changes improve the deployment workflow by adding verification steps for both TestPyPI and PyPI releases.
Key changes:
- Migrates from hardcoded version strings to setuptools-scm for automatic version management from Git tags
- Adds comprehensive version fallback logic with test coverage
- Enhances CI/CD with verification steps after publishing to TestPyPI and PyPI
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Configures setuptools-scm for dynamic versioning and updates build dependencies |
| doubleml/init.py | Implements version import logic with fallback chain (_version.py → importlib.metadata → "0.0.0+unknown") |
| doubleml/tests/test_init.py | Adds comprehensive tests for version retrieval and fallback scenarios |
| doc/conf.py | Updates documentation to use dynamic version from doubleml.version |
| .gitignore | Excludes auto-generated _version.py file |
| .github/workflows/pytest.yml | Sets fetch-depth: 0 to enable setuptools-scm version detection |
| .github/workflows/deploy_pkg.yml | Adds workflow_dispatch trigger, verification jobs for TestPyPI/PyPI, and proper fetch-depth configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes:
The main changes include switching to setuptools-scm for automatic version management, updating the deployment and verification steps in GitHub Actions, and ensuring documentation and package metadata reflect the new versioning approach.