Skip to content

build: modernize packaging and release workflow#211

Merged
cheind merged 5 commits into
cheind:developfrom
mikel-brostrom:build/modernize-python-packaging
Jul 13, 2026
Merged

build: modernize packaging and release workflow#211
cheind merged 5 commits into
cheind:developfrom
mikel-brostrom:build/modernize-python-packaging

Conversation

@mikel-brostrom

@mikel-brostrom mikel-brostrom commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace legacy setup.py packaging with declarative pyproject.toml metadata and setuptools 77+
  • support Python 3.8 through 3.14 in package metadata and CI
  • consolidate runtime and development dependencies into pyproject.toml
  • replace Flake8 with Ruff and keep all lint configuration in pyproject.toml
  • migrate the OR-Tools assignment backend from removed pywrapgraph APIs to SimpleLinearSumAssignment
  • add tag-driven PyPI Trusted Publishing with artifact validation and a protected release environment
  • move package-data declarations into setuptools configuration
  • remove obsolete requirements, Conda, Pylint, precommit, manifest, setup, and shell-example files
  • update installation, development, and release documentation

Why

The previous packaging and release process depended on manually parsed setup.py metadata, end-of-life Python and tool versions, and references to AppVeyor and Travis configurations that no longer exist. It had no current PyPI publishing workflow and retained several unreferenced legacy files.

The existing OR-Tools integration also relied on ortools.graph.pywrapgraph, which has been removed from supported OR-Tools releases.

This change establishes one canonical package configuration, tests the complete supported Python range, updates the optional assignment backend, and publishes immutable artifacts through short-lived OIDC credentials.

Impact

  • end users continue to install with pip install motmetrics
  • the published universal wheel declares Python 3.8 through 3.14 support
  • contributors create an environment with uv venv and install the dev group with uv pip install --group dev
  • CI runs Ruff and pytest on Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14
  • current OR-Tools releases work without retaining the removed legacy API
  • maintainers publish by pushing a signed vX.Y.Z tag after merging a reviewed release PR
  • PyPI owners must register publish-to-pypi.yml and the protected pypi GitHub environment as a Trusted Publisher before the first automated release

Testing

  • GitHub Actions Python 3.8–3.14 matrix: all 7 jobs passed
  • Ruff blocking checks: passed on every supported Python version
  • pytest: passed on every supported Python version
  • Python 3.8 + OR-Tools 9.11: 34 LAP tests passed
  • Python 3.14 + OR-Tools 9.15: 34 LAP tests passed
  • full Python 3.14 suite with OR-Tools: 63 tests passed
  • python -m build produced the source distribution and py3-none-any wheel
  • python -m twine check passed for both artifacts
  • wheel smoke import reported version 1.4.0
  • package datasets, XML/MAT fixtures, text files, and image asset were confirmed in the built wheel
  • workflow YAML parsed successfully
  • git diff --check passed

Successful matrix run: https://github.com/cheind/py-motmetrics/actions/runs/29200906225

@mikel-brostrom mikel-brostrom marked this pull request as ready for review July 12, 2026 17:03
@mikel-brostrom

Copy link
Copy Markdown
Contributor Author

All these updates are much needed in order to publish an up-to-date version of this package, now that HOTA matches the trackeval results

@cheind

cheind commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Hey, thanks again - you may want to add your name to the list of authors if you care!

@cheind cheind merged commit 753f9bd into cheind:develop Jul 13, 2026
7 checks passed
@mikel-brostrom

Copy link
Copy Markdown
Contributor Author

Glad to contribute to such a great package! I would love to be listed as author of this ❤️. Specially for the HOTA pypi release 🚀

@cheind

cheind commented Jul 14, 2026

Copy link
Copy Markdown
Owner

yah, just open another pull request with your author details - I will merge in the coming days when I have a bit of spare time.

thanks again!

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.

2 participants