-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate pip-tools for efficient package dependency management (#1598)
- Loading branch information
1 parent
4395ad4
commit 53e4c02
Showing
9 changed files
with
2,343 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Introduce pip-tools | ||
|
||
## What is it? | ||
Pip-tools is a command-line toolset for managing dependencies in Python projects. | ||
It streamlines the process of handling project dependencies by providing essential functionalities. | ||
|
||
## Why do we use it? | ||
|
||
### Dependency Management | ||
Pip-tools helps manage a project's dependencies by resolving and pinning specific versions. | ||
It ensures that everyone working on the project uses the same versions of dependencies, promoting consistency and reproducibility. | ||
|
||
### Simplified Workflow | ||
Pip-tools simplifies the workflow of managing dependencies by keeping the requirements.in file separate from the requirements.txt file. | ||
The requirements.in file contains high-level dependencies, while the requirements.txt file contains the pinned versions. This separation enables easy updating and maintenance of dependencies. | ||
|
||
## How do we use it? | ||
|
||
### For Virtual Environment: | ||
|
||
#### Install or Upgrade pip: | ||
```pip install --upgrade pip``` | ||
|
||
#### Install pip-tools: | ||
```pip install pip-tools``` | ||
|
||
#### Generate Pinned Versions: | ||
Add or update the package and its version specifier according to your needs in <requirements_file>.in file. | ||
|
||
```pip-compile --generate-hashes --resolver=backtracking -o <requirements_file>.txt <requirements_file>.in``` | ||
|
||
### For Docker | ||
Add or update the package and its version specifier according to your needs in <requirements_file>.in file. | ||
|
||
``` | ||
make compile-requirements | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-r requirements.txt | ||
beautifulsoup4 | ||
coverage | ||
django-test-plus>=1.4.0 | ||
factory-boy==3.2.* | ||
Faker | ||
pytest | ||
pytest-django | ||
selenium==4.9.1 | ||
wagtail-factories==4.0.* |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cairosvg==2.7.0 | ||
django-allauth~=0.44 | ||
django-comments-xtd==2.9.* | ||
django-compressor==2.4.* | ||
django-debug-toolbar==3.2.1 | ||
django-extensions==3.1.* | ||
django-filter==2.4.0 | ||
django-google-analytics-app==5.0.5 | ||
django-health-check==3.16.5 | ||
django-redis~=5.2.0 | ||
django-sass-processor==1.0.* | ||
django-translation-manager~=1.3.0 | ||
django-webpush==0.3.4 | ||
django==3.2.* | ||
djangorestframework-simplejwt==5.0.0 | ||
djangorestframework~=3.13.1 | ||
drf-yasg~=1.21.3 | ||
elasticsearch~=7.16 | ||
libsass==0.21.* | ||
lxml==4.8.* | ||
Markdown==3.3.7 | ||
psycopg2==2.8.* | ||
redis~=3.0 | ||
tqdm==4.62.* | ||
wagtail-cache~=1.2.1 | ||
wagtail-localize==1.3.3 | ||
wagtail-markdown==0.7.0 | ||
wagtail==2.15.* | ||
wagtailmedia==0.10.* | ||
wagtailmenus==3.1.3 | ||
wagtailsvg==0.0.14 | ||
whitenoise==5.2.* | ||
https://github.com/IDEMSInternational/wagtail-transfer/archive/408edb5d432ac72dc2727a1847e0f294b8d6efa6.zip#egg=wagtail-transfer |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
REQ_FILES=( | ||
"/app/requirements" | ||
"/app/requirements.dev" | ||
) | ||
|
||
for f in "${REQ_FILES[@]}"; do | ||
pip-compile --generate-hashes --resolver=backtracking -o ${f}.txt ${f}.in || exit 1; | ||
done |