Agreed. Maybe we can start with some common practices and/or heuristics. For example in my projects:
- I do this by adding a
source-includeskey in the[tools.pdm]section of mypyproject.tomlfile. I include my top leveldocs/,test/directories, and top-leveltox.iniandconftest.pyfiles. - I don’t use a
testextra, but have atestingkey in my[tool.pdm.dev-dependencies]section of mypyproject.tomlfile. $ tox- this is the one implicit part you’d have to heuristically detect.
So pretty much, if you see a tox.ini file, just run tox and that will do everything necessary. I guess nox would have a similar heuristic. I really like this set up.
The only minor glitch is that both tox and pdm have to be installed for everything to work. Installing pdm isn’t a problem though because I include that in the deps key for each of my tox environments. The tricky bit here is that you can either have tox drive pdm, or pdm drive tox. I’ve experimented with both and prefer the former. So if you get one of my sdists, all you need to do is run tox and it should all Just work.