Excellent blog!
How to create a Python package in 2022
31–40 of 153 posts
Re: How to create a Python package in 2022
#32Very well written , thanks!!
Re: How to create a Python package in 2022
#33You can use pyproject.toml for the tox configuration too: [tool.tox] legacy_tox_ini = """ """
Re: How to create a Python package in 2022
#34This is almost exactly how I set up python projects; it’s reassuring to see it set out in one place. I started using tox-poetry-installer[1] to make tox pick up pinned versions from the lock file and reuse the private package index credentials from poetry. [1] https://github.com/enpaul/tox-poetry-installer
Re: How to create a Python package in 2022
#35Lot of good info and saved away! However, it drinks the code coverage cool-aid that started like 30 years ago when code coverage tools emerged. Management types said "high test code coverage == high quality"; lets bean count that!! A great way to achieve high code coverage is to have less than robust code that does not check for crazy error cases that are really hard to reproduce in test cases. Code coverage is a too…
Re: How to create a Python package in 2022
#36Excellent and very informative post, thank you very much !
Re: How to create a Python package in 2022
#37We've been fine-ish with classic setup.py/setup.cfg + gha for publishing to pypi. But as we do OSS data science (gpu graph ai + viz), where conda is typical nowadays... ... Have to admit: We recently ended up contracting conda packaging out because it was nowhere near clear enough to make sense for our core team to untangle. Would love to see a similar tutorial on a github flow packaging & publishing to conda. Still…
Re: How to create a Python package in 2022
#38Re: How to create a Python package in 2022
#39Re: How to create a Python package in 2022
#40I really dislike the Python convention of plonking source code effectively in the root directory. It means literally any random thing in there can get picked up if you put your package in the PYTHONPATH. Is there a reason the Python world did not standardise on putting source code in a "src" directory like every other language?
I got src directories in the Elixir dependencies written in Erlang, in about 12% of the node_modules used by a React project and in the few C extensions I'm using for Ruby.
May I conclude that src is uncommon at least in scripting languages? (Elixir is compiled.) Maybe the reason is that there is only source code and there is no need for a separate directory for a build / dist.