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

Abierto
#1,027 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions, python
Área
ci-cd, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
25
Forks
25
Merge medio
4 h 5 min
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lanl/PyBNF

Todos los issues de lanl/PyBNF

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.