Skip to content

Update CI, release checks and project metadata - #115

Merged
jankoslavic merged 3 commits into
mainfrom
ci-housekeeping
Sep 25, 2026
Merged

jankoslavic merged 3 commits into
mainfrom
ci-housekeeping

Conversation

@jankoslavic

@jankoslavic jankoslavic commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Housekeeping after the 2.5.7 release (whose first publish failed because the pinned gh-action-pypi-publish@v1.13.0 did not accept Metadata-Version 2.5).

Testing workflow

  • Runs on pull_request as well as push, so PRs from forks are tested.
  • Python matrix 3.11–3.14 (matches requires-python = ">=3.11").
  • actions/checkout@v7, actions/setup-python@v7.
  • Installs the package (pip install .) instead of requirements.txt.

Release workflow

  • Fails early if the tag vX.Y.Z does not match the version in pyproject.toml.
  • Runs the tests and twine check before publishing.
  • Uses pypa/gh-action-pypi-publish@release/v1 (latest v1) instead of a pinned version.
  • Publishes with PyPI trusted publishing (id-token: write, no API token); the trusted publisher is registered on PyPI (owner ladisk, repo pyuff, workflow release-and-publish-to-pypi.yml, no environment). The PYPI_API_TOKEN secret is no longer used and can be deleted after the first successful release.
  • The release process is unchanged: gh release create vX.Y.Z --target main --generate-notes.

Project metadata

  • The version is set only in pyproject.toml; pyuff.__version__ is read from the installed package metadata (importlib.metadata), with "unknown" when pyuff is imported from a source tree without being installed. Editable installs report the version they were installed with, so reinstall (pip install -e .) after a version bump.
  • Classifiers list Python 3.11–3.14 (previously only 3.10).
  • Read the Docs builds on Ubuntu 24.04 with Python 3.13.
  • Removed the unused setup.py, requirements.txt and requirements.dev.txt; pyproject.toml is the single source (dev dependencies are in the dev extra: pip install -e .[dev]).

Checked locally: tests on Python 3.11 and 3.12, build + twine check, flake8 syntax check, the tag/version check (passes for v2.5.7, fails for v2.5.8), and pyuff.__version__ from an installed wheel (2.5.7) and from an uninstalled source tree (unknown).

- Testing: run on pull requests too, test Python 3.11-3.14, current
  checkout/setup-python actions, install the package instead of requirements.txt.
- Release: check that the tag matches pyproject.toml and pyuff/__init__.py,
  run the tests and twine check before publishing, follow
  pypa/gh-action-pypi-publish@release/v1.
- Classifiers list Python 3.11-3.14 (requires-python >=3.11).
- Read the Docs builds on Ubuntu 24.04 with Python 3.13.
- Remove setup.py, requirements.txt and requirements.dev.txt; pyproject.toml
  is the single source (dev dependencies are in the "dev" extra).
pyuff.__version__ is read from the installed package metadata; the release
workflow checks the tag against pyproject.toml only.
@jankoslavic
jankoslavic merged commit 750c191 into main Sep 25, 2026
8 checks passed
@jankoslavic
jankoslavic deleted the ci-housekeeping branch September 25, 2026 05:42
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