Skip to content

Set up PyPI publishing - #77

Merged
galjos merged 1 commit into
mainfrom
pypi-release
Jul 6, 2026
Merged

Set up PyPI publishing#77
galjos merged 1 commit into
mainfrom
pypi-release

Conversation

@galjos

@galjos galjos commented Jul 6, 2026

Copy link
Copy Markdown
Member

Sets up publishing to PyPI (the release step gated on the now-empty issue tracker).

What changed

  • pyproject.toml
    • Packaging bug fix: packages.find now includes only ThermoScreening*. The previous exclude-list let docs/, examples/, and benchmarks/ leak into the wheel as top-level namespace packages (they'd pollute users' site-packages). The wheel now contains only ThermoScreening/.
    • Added [project.urls] (Homepage/Repository/Issues), keywords, and Intended Audience :: Science/Research + Topic :: Scientific/Engineering :: Chemistry + Development Status :: 3 - Alpha classifiers for a proper PyPI page.
  • .github/workflows/publish.yml — builds sdist+wheel and publishes on a GitHub Release via PyPI Trusted Publishing (OIDC) — no API token/secret. The release tag becomes the version via setuptools_scm.

Verified locally: python -m build → clean sdist + wheel (only ThermoScreening/), twine check PASSED for both.

To actually publish (your steps — I can't do these; they need PyPI access)

  1. On pypi.org → the thermoscreening project → add a Trusted Publisher (or a "pending publisher" for the first upload): owner MolarVerse, repo ThermoScreening, workflow publish.yml.
  2. Create a GitHub Release tagged v0.1.0 — that triggers the workflow, which builds and publishes.

thermoscreening is available on PyPI. Note: pip install thermoscreening gets the Python package; the compiled backends still come from conda (environment.yml) — documented in the README/docs.

- pyproject: ship only the ThermoScreening package (the previous exclude-list
  leaked docs/examples/benchmarks into the wheel as top-level dirs); add project
  URLs, keywords, and Science/Research + Chemistry classifiers.
- .github/workflows/publish.yml: build sdist+wheel and publish on a GitHub
  Release via PyPI Trusted Publishing (OIDC, no API token). The release tag
  becomes the version through setuptools_scm.
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.80%. Comparing base (4e58987) to head (488a7c9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #77   +/-   ##
=======================================
  Coverage   96.80%   96.80%           
=======================================
  Files          25       25           
  Lines        1629     1629           
=======================================
  Hits         1577     1577           
  Misses         52       52           
Flag Coverage Δ
unittests 96.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@galjos
galjos merged commit 7b0db50 into main Jul 6, 2026
4 checks passed
@galjos
galjos deleted the pypi-release branch July 6, 2026 13:06
galjos added a commit that referenced this pull request Jul 6, 2026
Follow-up to the PyPI setup (#77): keep the release trigger manual
(deliberate cadence + version control) but remove the note-writing toil.

- **`.github/release.yml`** — configures GitHub's auto-generated release
notes: merged PRs are grouped by label (Features / Fixes / Documentation
/ Dependencies), unlabelled PRs fall under **Other Changes** (catch-all
is last, as GitHub requires), and bot PRs are excluded. So `gh release
create vX.Y.Z --generate-notes` produces clean categorised notes.
- **`RELEASING.md`** — the one-command release flow (tag a GitHub
Release → `publish.yml` builds + publishes to PyPI via Trusted
Publishing), `setuptools_scm` versioning (dev versions are PyPI-rejected
— a safety net), the trusted-publisher config values, and a pointer to
the conda-forge prerequisite.

Deliberately **not** adopting semantic-release/release-please — that
would impose conventional commits and remove control over
version/timing, which isn't the right default for an alpha scientific
package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant