You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It makes sense to have requirements.txt be a lockfile, but trying to modify the version numbers of top-level dependencies can be a nightmare.
The proposed idea is to add a new file, requirements.in, that contains all top-level dependencies. These constraints can target a range or a specific version. We can then use pip-compile (from the pip-tools package, installable via pip install pip-tools) to generate a requirements.txt file:
Adding or updating version constraints in requirements.in should then result in pip-compile being run which can be enforced by adding an additional git hook on pre-commit.
The text was updated successfully, but these errors were encountered:
It makes sense to have
requirements.txt
be a lockfile, but trying to modify the version numbers of top-level dependencies can be a nightmare.The proposed idea is to add a new file,
requirements.in
, that contains all top-level dependencies. These constraints can target a range or a specific version. We can then usepip-compile
(from thepip-tools
package, installable viapip install pip-tools
) to generate arequirements.txt
file:The lockfile can then be updated to the newest versions (as allowed by
requirements.in
) by running:Adding or updating version constraints in
requirements.in
should then result inpip-compile
being run which can be enforced by adding an additional git hook on pre-commit.The text was updated successfully, but these errors were encountered: