yt-project / unyt

Handle, manipulate, and convert data with units in Python
https://unyt.readthedocs.io
BSD 3-Clause "New" or "Revised" License
364 stars 48 forks source link

TST: minimize build time in tox runs #426

Closed neutrinoceros closed 11 months ago

neutrinoceros commented 1 year ago

Just learned that tox 4 allows universal wheels to be built once and reused across multiple envs, reducing the build time to a minimum. https://tox.wiki/en/latest/upgrading.html#universal-wheels

neutrinoceros commented 1 year ago

This seems to save about 40% overhead on the Python 3.8 job in CI, but that's it, because it's the only job with multiple tasks to run. Probably still worth it.

Also fixed an issue with testenv:end where coverage was run without toml support and crashed.

neutrinoceros commented 1 year ago

Apparently setup-python now supports setting multiple python versions in a single job https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#specifying-multiple-pythonpypy-version Switching to draft while I attempt to leverage this here

neutrinoceros commented 1 year ago

Didn't work on first try, I'll remove this from the PR and postpone this to a follow up one

jzuhone commented 1 year ago

Is this still worth it, considering we're probably going to drop Python 3.8 soon?

neutrinoceros commented 1 year ago

I think so. The workload currently carried by Python 3.8 will eschew to 3.9 and we'll also add 3.12 when enough of our test dependencies support it, so I don't think this cycle is going to change much in itself.