Tooling for Snailz
I built a synthetic data generator last year to use in a “software design for data scientists” tutorial that I never finished writing. Over the last week I rewrote it as a way of exploring some new tools:
-
The command-line interface to Claude. I’m disgusted by the amorality of the AI industry, but am now convinced that the coding tools are here to stay: writing tests and refactoring code with Claude’s help was much faster than doing it by hand.
-
uv
for managing the packages and virtual environment and for running commands. It’s the first time I’ve used it as itself rather than runninguv pip whatever
; never going back. -
ruff
andpyright
for checking the code.ruff
is a joy, but checking type annotations withpyright
cost me a couple of hours. It’s not the tool’s fault, though: figuring out how to annotate the last 5% of the code led to me writing my first protocol and then throwing up my hands and replacing it withAny
. -
pydantic
for storing and validating records, including the data thatsnailz
generates and the parameters used in generation. I started withdataclasses
, but switched as soon as I found myself1 adding methods thatpydantic
already had. -
doit
to run commands instead of Make. I’m more comfortable with the latter, but I recognize that writing Makefiles is a dying art. -
mkdocs
for documentation instead of Sphinx orpdoc
2. I findmkdocs
easier to work with than Sphinx, andpdoc
doesn’t support “extra” Markdown pages as well asmkdocs
. (If the folks at Astral are looking for new product ideas, a better documentation generator would have at least one paying customer the day it launched…) -
pytest
,pyfakefs
, andfaker
for testing andclick
for building the command-line interface instead ofargparse
.