Skip to content

Migrate packaging from setup.py to pyproject.toml - #82

Merged
CozySocksAlways merged 7 commits into
masterfrom
enh/pyproject
Sep 2, 2026
Merged

CozySocksAlways merged 7 commits into
masterfrom
enh/pyproject

Conversation

@CozySocksAlways

@CozySocksAlways CozySocksAlways commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace setup.py with pyproject.toml with setuptools backend
  • Keep requirements/*.txt as the single source of truth for dependencies, so added to toml file as a dynamic field
  • Explicit package package discovery with the packages field
  • Documented the packaging decisions as ADRs in doc/adr/adr.md

Summary

  • Replace setup.py with pyproject.toml, using the setuptools build backend
  • Keep requirements/*.txt as the single source of truth for dependencies, wired in as dynamic fields
  • Explicit package discovery via the packages field
  • Pin setuptools >= 69.0, < 75.4 (not the newer >=77.0) to keep this a patch release: setuptools 77.0 requires Python >=3.9, which would break installs on the still-supported Python 3.8 (see ADR 3)
  • Use the pre-PEP 639 license = {file = "LICENSE.txt"} table form instead of an SPDX license string + license-files, since PEP 639 support only lands in setuptools 77.0
  • Added packaging decisions as ADRs in doc/adr/

Notes

  • The setuptools upper bound and license format are both patch-release temporary fix to keep Python 3.8 support; ADR 2 records reverting to the modern form once the minimum Python version is bumped in a future minor release.

Comment thread pyproject.toml Resolved
Comment thread setup.py Resolved

@kohlerca kohlerca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me.

@CozySocksAlways
CozySocksAlways merged commit dcb79d7 into master Sep 2, 2026
7 checks passed
@CozySocksAlways CozySocksAlways mentioned this pull request Sep 3, 2026
1 task done
CozySocksAlways added a commit that referenced this pull request Sep 15, 2026
* Fix deprecated plt.cm.get_cmap in plot_patterns (#81)

* Replaced depricated plt.cm.get_cmap api

* Switched to newer API for getting colormap

* Apply suggestions from code review

Co-authored-by: Michael Denker <m.denker@fz-juelich.de>

* Bumbed matplotlib min version to allign with api change

---------

Co-authored-by: Michael Denker <m.denker@fz-juelich.de>

* Migrate packaging from setup.py to pyproject.toml (#82)

* Swapped out setup.py with pyproject.toml

* Adding a architectural decision record file

* Splitup into multiple adrs

* upper limit on setuptooks for python 3.8 support; ADR changes

* remove newer licence field from pyproject.toml since older setuptools doesn't understand it

* Added statement to exclude adrs from packaging

* Reinstated licence classifier as per PR review

* refactorted and updated CI workflow file

* Switched to major version only for github actions; major.minor version is not supported

* Updated pip install commands to have necessary packages to run unit tests

* Fix for silent failure in unitary event analysis doc build, swapped out np.stack with list comprehension in doc strings example

---------

Co-authored-by: Michael Denker <m.denker@fz-juelich.de>
@CozySocksAlways
CozySocksAlways deleted the enh/pyproject branch October 30, 2026 14:10
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