dependency management workflow#80
Conversation
|
ℹ️ No lockfile changes needed
|
|
ℹ️ No lockfile changes needed
|
There was a problem hiding this comment.
I have never done this, but the documentation. seems to suggest that depandabot supports pyproject.toml files and will also upate the requirements.txt
so not sure if you need this?
There was a problem hiding this comment.
Hi Tom, oh yes, it seems dependabot looks at both pyproject.toml and requirements.txt. In this case, would it be better to change requirements.txt -> requirements.lock so that dependabot only looks at pyproject.toml?
What I thought was specifying only direct dependencies that we use in Designer in pyproject.toml, and use pip-compile to generate requirements.txt file, which includes all direct and transitive dependencies with pinned version for full reproducibility.
My concern about dependabot updating the lock file (requirements.txt previously) was in situation like when dependabot first updates a transitive dependency in requirements.txt, and later we need to add a new direct dependency in pyproject.toml, which requires us to manually regenerate the updated requirements.txt using pip-compile. In this case, I believe we cannot guarantee that the transitive dependency updated by dependabot remains the same.
However, I’m not sure if this is a good practice for python dependency management workflow.
There was a problem hiding this comment.
For this project I don't think it will be a problem. When you run pip-compile later, with new direct dependencies you would expect it to pin the newest versions of your dependencies.
I think it is a good workflow to get started.
There was a problem hiding this comment.
I see, then I will make sure that dependabot only updates (direct) dependencies specified in pyproject.toml by changing requirements.txt to requirements.lock. So the workflow would be:
- dependabot updates dependencies in pyproject.toml: then, the github action runs
pip-compileto regenerate requirements.lock (github action runs only when pyproject.toml changes) - we manually update dependencies or add new dependencies in pyproject.toml: then, we also have to manually regenerate requirements.lock file with
pip-compileand commit them
|
ℹ️ No lockfile changes needed
|
pyproject.tomlwithpip-compilegenerating pinnedrequirements.locklockfilerequirements.lockwhen Dependabot modifiespyproject.toml-c requirements.lockfor reproducible builds when installing additional dependencies for e2e testingsetup.py- Reduced to only handling C++ extension; all metadata/dependencies moved topyproject.tomlREADME.md