Skip to content

Makefile upgrades

James Vasile requested to merge pip-once into main

We are making several Makefile upgrades here. The primary one is running pip only once:

Our original makefile installed our dependencies on every make run, which is just slow enough to drive me around the bend. This set of targets uses make's in-built timestamping facilities to only run pip install when requirements.txt or requirements-dev.txt has changed.

There are many other ways we might do this. For example, it is possible there is a file in the venv I could use as my flag, but I couldn't identify one. Or we could check the venv with pipdeptree or something. But this way is simple and fast and only adds a few lines of make.

Beyond that, I added test and qa targets, switched to ruff formatting, and added .PHONY for targets that need them. Yes, that's a lot for one MR, but they're well-separated into 4 commits and reviewing them together is, I think, the most efficient approach.

Edited by James Vasile

Merge request reports

Loading