Daily Dev Notes 2024/09/19

After a bit of a hiatus and time off due to appendicitis and just being busy in general, I'm back with a Dev Notes post!

I've jumped on the uv bandwagon and have fully incorporated it into my dev workflows. It's a bit of a rapidly changing beast, with updates from Astral coming on a near-daily schedule - often with lots of new functionality.

As a result, I took this opportunity to modernise my workflow with some other new tools - new to me, at least. I've also fully jumped on board the just train and am loving it. In the past, I've just used the README file to include instructions about how to bootstrap a project, or run the tests, or run other commands. But now these are all self-documented in the justfile.

The third new tool (again - new to me) I've incorporated is tox. This has been around for years, but I've never really had a need for it since I haven't published packages that required testing across multiple versions of Python (and Django). It allows you to create test matrixes of versions, and it will set up separate virtual environments for each combination of versions and then run the test suite. This took a bit of fiddling to get working, since I wanted to use uv to manage the dependencies and this isn't documented well. I don't think I've got it optimal yet, but it appears to be working.

I'm wondering if nox might be a better solution. It appears to be newer than tox and is all defined in Python. It also has early integration with uv which shows that it's keen to keep up with modern tooling. Will save that for another day...

On a related note, this video of a talk from glyph highlights the futility of chasing the "perfect Python project" - something I've been a bit guilty of with DJ Press. https://www.youtube.com/watch?v=kcfERM6fcgU