Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pip-compile to generate full requirements #615

Closed
jonathan-s opened this issue Jan 28, 2024 · 3 comments · Fixed by #618
Closed

Using pip-compile to generate full requirements #615

jonathan-s opened this issue Jan 28, 2024 · 3 comments · Fixed by #618

Comments

@jonathan-s
Copy link
Contributor

Right now I'm not entirely sure what the status of the requirements.txt file actually is. It looks like we're trying to keep dependencies locked so that an update of a dependency won't inadvertently break the project.

Manually ensuring that each dependency is up to date can be a bit cumbersome especially if you commit to keeping track of transitive dependencies. I think a step in the right direction would be to use pip-compile, that way you'll only need to keep track of and update the top-most dependencies.

https://github.com/jazzband/pip-tools/

@sissbruecker
Copy link
Owner

Currently taking a look at pip-tools, being able to list app dependencies only, and having comments where transitive dependencies come from should make things easier. I guess dependabot should still be able to work with this setup, and will continue to suggest changes to the requirements files directly.

@sissbruecker
Copy link
Owner

Something like this: #618

@joshuadavidthomas
Copy link

joshuadavidthomas commented Jan 28, 2024

Yep, dependabot works just fine with a setup revolving around pip-tools. That's what I use on any Django project I work on. Example dependabot PR: joshuadavidthomas/joshthomas.dev#250.

I generally run the pip-compile command with --allow-unsafe --resolver=backtracking --strip-extras to account for deprecations as well as --generate-hashes to generate the hashes for the packages in the resulting requirements.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants