-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve dependencies management #22
base: main
Are you sure you want to change the base?
Changes from all commits
afc8105
b0646d8
23dc13f
ac47ca9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ This is my educational project within IT KPI Python mentorship program by @webkn | |
|
||
2. Install requirements: | ||
```console | ||
$ pip install -r requirements/base.in -c requirements/base.txt | ||
$ pip install -r requirements/base.txt -r requirements/dev.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may depend on the context how they are used. I'd argue that Warehouse treats them rather simplistically. Warehouse installs from the files with the entire tree resolved and passes A more complicated problem would be visible in projects having multiple environments that are platform-dependent. When you use When you do With multiple envs, you need multiple constraint files per each OS+arch+Python combo. But you also need to track your direct deps which you do separately. With that, you'll have pairs of two files (in+txt) for each env you identify within a project. The Some time ago I was trying to record the misconceptions people tend to have around lockfiles: jazzband/pip-tools#1326 (comment). |
||
``` | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# This file is autogenerated by pip-compile with Python 3.12 | ||
# by the following command: | ||
# | ||
# pip-compile --constraint=dev.txt base.in | ||
# pip-compile requirements/base.in | ||
# | ||
asgiref == 3.7.2 | ||
asgiref==3.7.2 | ||
# via django | ||
django == 3.2.20 | ||
# via -r base.in | ||
pytz == 2023.3 | ||
django==3.2.20 | ||
# via -r requirements/base.in | ||
pytz==2023.3 | ||
# via django | ||
sqlparse == 0.4.4 | ||
sqlparse==0.4.4 | ||
# via django |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
-r base.txt | ||
-c base.txt | ||
|
||
pylint |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,24 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# This file is autogenerated by pip-compile with Python 3.12 | ||
# by the following command: | ||
# | ||
# pip-compile --constraint=base.in dev.in | ||
# pip-compile requirements/dev.in | ||
# | ||
asgiref == 3.7.2 | ||
# via | ||
# -r base.txt | ||
# django | ||
astroid == 2.15.6 | ||
astroid==2.15.6 | ||
# via pylint | ||
dill == 0.3.7 | ||
dill==0.3.7 | ||
# via pylint | ||
django == 3.2.20 | ||
# via | ||
# -c base.in | ||
# -r base.txt | ||
isort == 5.12.0 | ||
isort==5.12.0 | ||
# via pylint | ||
lazy-object-proxy == 1.9.0 | ||
lazy-object-proxy==1.9.0 | ||
# via astroid | ||
mccabe == 0.7.0 | ||
mccabe==0.7.0 | ||
# via pylint | ||
platformdirs == 3.10.0 | ||
platformdirs==3.10.0 | ||
# via pylint | ||
pylint == 2.17.5 | ||
# via -r dev.in | ||
pytz == 2023.3 | ||
# via | ||
# -r base.txt | ||
# django | ||
sqlparse == 0.4.4 | ||
# via | ||
# -r base.txt | ||
# django | ||
tomlkit == 0.12.1 | ||
pylint==2.17.5 | ||
# via -r requirements/dev.in | ||
tomlkit==0.12.1 | ||
# via pylint | ||
wrapt == 1.15.0 | ||
wrapt==1.15.0 | ||
# via astroid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per other comments, such implementation is unidiomatic. Use explicit
-c
and-r
for the proper environment, without referencing other unrelated dependency groups.