Repository navigation
Add a PyPI release workflow and a tested quick start - #8
Draft
juaristi22 wants to merge 1 commit into
Draft
juaristi22 wants to merge 1 commit into
juaristi22 wants to merge 1 commit into
Conversation
popdgp is not on PyPI yet, so nothing can depend on a released version. - .github/workflows/release.yml: on a published GitHub Release, check that the tag is the package version, run the tests, build, run the quick start against the built wheel, and upload to PyPI by trusted publishing (pypi environment, no stored token). Run by hand, it builds and checks without publishing. - CI's build job also runs the quick start against the built wheel, so a distribution that does not import with its declared dependencies fails before a release. - README: install and quick-start sections. The quick start is examples/quickstart.py. - tests/test_packaging.py: the version string matches the installed metadata, the README shows the example verbatim, and the example runs. - CONTRIBUTING.md: how to release, and the one-time PyPI setup. No change to the package's code or version (0.1.0). Co-Authored-By: Claude Fable 5.2 <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.
Summary
popdgp is not on PyPI, so nothing can depend on a released version of it. This adds what a first release needs: a release workflow, a check that the built wheel works, and install instructions with a tested example. The package's code and version (0.1.0) are unchanged.
The first consumer is the imputation paper, which is to depend on a pinned popdgp in place of its own copy of the harness (item 3 of PolicyEngine/imputation-paper#1).
What changes
.github/workflows/release.yml. When a GitHub Release is published, the workflow checks that the tag is the package version (0.1.0orv0.1.0), runs the tests, builds, runs the quick start against the built wheel, and uploads to PyPI. Run by hand, it builds and checks without publishing..github/workflows/ci.yml. The build job also runs the quick start against the built wheel, so a distribution that does not import with its declared dependencies fails before a release.README.md. Install and quick-start sections. The quick start isexamples/quickstart.py.tests/test_packaging.py. The version string matches the installed metadata, the README shows the example verbatim, and the example runs.CONTRIBUTING.md. A Releasing section with the steps and the one-time PyPI setup.To publish 0.1.0 after this merges
PolicyEngine, repositorypopdgp, workflowrelease.yml, environmentpypi. This also reserves the name, which is free today.0.1.0. The workflow uploads.For the maintainer to decide
PYPIis also visible to this repository; using it would remove step 1 above. Say if you prefer it.main, from towncrier fragments. This repository has no changelog, and I did not add that machinery.pypienvironment. GitHub creates it on first use without protection rules. Limiting it tomainneeds a repository admin.Not in this PR
Checks
uv run pytest: 32 passed, 0 skipped.uv run ruff check .anduv run ruff format --check .pass.uv buildanduvx twine check dist/*pass. The wheel holds the four package modules and the licence.🤖 Generated with Claude Code