I’ve written before about Python Packaging and pre-commit which I’m a big fan of. Today I discovered a really useful tool for checking your packaging configuration and pre-commit configuration from the Scientific Python Development Guide.
Photo by Neil Shephard.
This development guide is really well written and has Tutorials and Topical Guides that cover package development, style guides, type checking and tests amongst other things.
Of particular use is the Repo-Review - Scientific Python Development Guide which will automatically check a GitHub hosted repository against the Scientific Python development guidelines and make recommendations where improvements can be made to the package configuration and pre-commit configuration.
Having tested it against AFM-SPM/TopoStats main branch there are a lot of useful and simple recommendations made.
More pre-commit hooks is only a good thing in my view, they don’t take that long to run
against most reasonably sized repositories, particularly if ruff is used in favour of more
traditional tools such as flake8
and isort
.
There are a few pre-commit hooks that I wasn’t aware of and will be adding to my projects such as..,
pyproject.toml
.If you are involved in Python package development of any sort give your repository a review and see what recommendations are suggested. You may not agree with all of the recommendations but the vast majority of tools are highly configurable so you can disable the checks you don’t want applied. It won’t do any harm.
For queries relating to collaborating with the RSE team on projects: rse@sheffield.ac.uk
Information and access to JADE II and Bede.
Join our mailing list so as to be notified when we advertise talks and workshops by subscribing to this Google Group.
Queries regarding free research computing support/guidance should be raised via our Code clinic or directed to the University IT helpdesk.