alan-turing-institute / python-project-template

15 stars 3 forks source link

Notes from first time use #32

Open jack89roberts opened 6 months ago

jack89roberts commented 6 months ago

I played with the template for the first time today just to get an idea for what it does/how it compares to the ARC one. Just written down everything that came up when I went through it, apologies it got so long!

There are a few tweaks that could be nice to add, but otherwise most my comments are just places where I might prefer different (generally less strict) choices for the default setup of various tools, but different people will have different views on that and I can see the argument for keeping the template quite opinionated/strict. It's nice how much it sets up!

Setting up the template

Setting up Hatch/installing the package [some not really about the template]

Using the template

phinate commented 6 months ago

This is incredible feedback. Thank you for being so thorough with documenting your experience!!

A quick note just before I go through this more methodically: I've never actually used hatch itself, just the hatchling backend (there are a couple of notes on this here: https://hatch.pypa.io/1.9/why/).

Will make some spin-off issues :)

phinate commented 6 months ago

Created #34, #35, #36, #37, #38 to track some of these points. I've yet to look into your hatch issues.

jack89roberts commented 5 months ago

It looks like hatch can do a lot in terms of Python version/environment management, I think it does everything you might use pyenv/venv/tox/nox/setuptools for in one tool (though I've never used tox/nox). I might try it on a project at some point though poetry / setuptools + venv are the current ARC favourites (& battle).

jack89roberts commented 5 months ago

I think the pytest defaults and the inclusion of flake8-errmsg in ruff are worth a chat at some point so I might make an issue about those too.

phinate commented 5 months ago

An update: I've thought about the hatch issues, and decided not to support it (or poetry) as a backend from now, mostly because you can do most of this setup with the tools directly via poetry new and hatch new. The good news is that the template is much easier to maintain as a result! Thanks for trying out hatch.