đ TIL build-and-inspect-python-package GitHub Action workflow plus some bonus Nox + Tox
May 10, 2024
TIL: via @joshthomas via @treyhunner via @hynek about the hynek/build-and-inspect-python-package GitHub Action.
This workflow makes it possible for GitHub Actions to read your Python version classifiers to build a matrix or, as Trey put it, âRemove so much junkâ which is a pretty good example.
As a bonus, check out Hynekâs video on NOX vs TOX â WHAT are they for & HOW do you CHOOSE? đ
https://www.youtube.com/watch?v=ImBvrDvK-1U
Both Nox and Tox are great tools that automate testing in multiple Python environments.
I prefer Nox because it uses Python to write configs, which fits my brain better. I used Tox for over a decade, and there are some tox.ini files that I dread updating because I can only remember how I got here after a few hours of tinkering. Thatâs not Toxâs fault. I think thatâs just a limitation of ini files and the frustration that comes from being unable to use Python when you have a complex matrix to try and sort out.
I recommend trying them out and using the best tool for your brain. There is no wrong path here.
PS: Thank you, Josh, for bringing this to my attention.