Re:Structuring Your Project
by buschkowitz on Sunday December 08, 2019 @06:20AM
(#21735370)
I find myself coming back to this guide whenever I set up a new project: https://sourcery.ai/blog/python-best-practices/
[ Parent
| on HN ]
Re:Structuring Your Project
by calpaterson on Sunday December 08, 2019 @06:46AM
(#21735449)
A general ignore_missing_imports=True in mypy.ini is very bad advice. This will hide lots of real errors. It's surprisingly easy to set up mypy such that it will silently not check types in many files.
Additionally I can't be the only person who utterly despises pipenv. It is confusing for most people who don't know python packaging internals, phenonomially slow for everyone else and besides discourages building proper distributables (or:wheels).
What do you do instead of pipenv?
Re:Structuring Your Project
by calpaterson on Sunday December 08, 2019 @01:32PM
(#21737317)
Pipenvs attempts to replace all other tooling to the answer is: all other tooling. Specifically, setuptools via either setup.py or setup.cfg. pbr, virtualenvs, tox, pip-tools, pip, etc are all useful. Anything that does not take 5-10 minutes to recompute dependencies basically!
Re:Structuring Your Project
by buschkowitz on Monday December 09, 2019 @05:12AM
(#21741532)
That is a big weakness, I agree. But the mental tax of having to remember how to use >5 cli tools vs one is definitely pro pipenv for me.