The publish workflow uploads a wheel that no job has installed: install it and run a small fit on Linux and macOS before the PyPI upload

Open
#1,027 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, python
Domain
ci-cd, testing

Research direction

Read .github/workflows/publish.yml, .github/actions/setup-pybnf/action.yml, pyproject.toml, and issue #1022 to identify supported Python versions and how release artifacts are built. Add a post-build job for Linux and macOS that installs the wheel from dist/ in a fresh environment, installs BioNetGen, runs the tutorial fit from outside the checkout, and saves pip freeze output. Done means the PyPI upload depends on these checks and the fit’s values match the tutorial’s source data.

Written by the indexing model from the issue text.

Description

enhancement

.github/workflows/publish.yml builds the sdist and wheel, runs twine check --strict, and uploads both to PyPI when a GitHub Release is published. twine check only validates the package metadata. Nothing in the workflow installs the wheel it is about to upload, and nothing requires the tests to have passed on the commit being released.

The per-PR tests do not close this gap. The setup action, .github/actions/setup-pybnf/action.yml, installs a hand-written list of dependencies and then installs PyBNF from the source tree with --no-deps. tests/test_packaging_metadata.py keeps that list in step with pyproject.toml, but no job ever lets pip work out PyBNF's dependencies the way pip install pybnf does for a user. All CI also runs on Ubuntu. The package lists macOS as supported, and no job installs or runs PyBNF there.

A PyPI upload cannot be undone. A version can be yanked but never replaced, so the last check before the upload should be made on the files being uploaded.

Suggested change: add a job to publish.yml that runs after build, and make the pypi job depend on it.

  1. Run it on ubuntu-latest and macos-latest, each with every Python version the package lists (see the Python 3.14 issue, #1022).
  2. In a fresh virtual environment, install the wheel from dist/ with a plain pip install, so the dependencies are resolved from the wheel's own metadata.
  3. Install BioNetGen, then run one small tutorial fit end to end with pybnf -c, for example examples/tutorial/01_logistic_growth/logistic_growth_trf.conf, and check the fitted values against the values the data were made from. Run it from a directory outside the checkout. Otherwise Python imports the source tree, not the installed wheel.
  4. Save the output of pip freeze from each run as a workflow artifact. That records the exact dependency versions each release was checked against, which gives a reproducible record without committing a lock file for a library.

It would also be worth running the recovery tier (#1026) on the release commit as part of the same job, or making it a required step in the release checklist.

Dominant language
Python
Stars
25
Forks
25
Avg merge
4h 5m
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/PyBNF

All issues in lanl/PyBNF

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.