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

オープン
#1,027 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, python
領域
ci-cd, testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
25
フォーク
25
平均マージ
4時間 5分
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lanl/PyBNF のほかの issue

lanl/PyBNF の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。