I ran into a problem when trying to figure out how to specify dependencies for a python application which uses pyproject.toml
.
What is the best practice when it comes to installing applications? Couple of approaches I am considering:
- have
requirements.txt
with resolved and pinned dependencies, have dynamic dependencies inpyproject.toml
, which would reference this requirements file. - pin only top level dependencies in
pyproject.toml
, without any requirements file - have
requirements.txt
as in first case, which would again be referenced as dynamic dependencies inpyproject.toml
, but also have optional dev dependencies, which would contain unpinned top level dependencies
Things I am looking for is reproducibility, but also minimal manual work needed when developing the app. Third approach makes the most sense to me, as it would only require pip freeze
before pushing my new changes. I have used pyproject.toml
only for developing python libraries so far (well, this is actually the first app I am creating in python in general).
I have been playing around with poetry
, but would be more interested how to do it with minimal set up that is pip + pyproject.toml
.