Manage dependencies using pip-tools

Add instructions to CONTRIBUTING.md & create requirements.in
This commit is contained in:
Santiago L 2022-09-26 12:24:14 +02:00
parent df73cd5657
commit a85e7c90e1
3 changed files with 287 additions and 41 deletions

View File

@ -30,3 +30,29 @@ pre-commit install
Do this: `device_detail.html` Do this: `device_detail.html`
Don't do this: `DeviceDetail.html`, `Device-detail.html` Don't do this: `DeviceDetail.html`, `Device-detail.html`
## Adding a new dependency to the project
This project tracks its packages using pip-tools, it could be installed by running:
```
pip install pip-tools
```
Whenever you need to install a new package using pip install <package-name>:
1. Put the package name into `requirements.in` instead.
```
# requirements.in
...
new_package
```
2. Compile the requirements
```
pip-compile requirements.in --output-file=requirements.txt
```
3. Then install upgraded dependencies:
```
pip install -U -r requirements.txt
```

37
requirements.in Normal file
View File

@ -0,0 +1,37 @@
alembic==1.4.2
atomicwrites==1.4.0
click-spinner==0.1.8
colorama==0.3.9
colour==0.1.5
ereuse-utils[naming,test,session,cli]==0.4.0b50
Flask-Cors==3.0.10
Flask-Login==0.5.0
Flask-WTF==1.0.0
flask-weasyprint==0.4
hashids==1.2.0
more-itertools==8.12.0
passlib==1.7.1
phonenumbers==8.9.11
psycopg2-binary==2.8.3
pyjwt==2.4.0
python-decouple==3.3
python-dotenv==0.14.0
python-stdnum==1.9
pyyaml==5.4
requests==2.27.1
requests-mock==1.5.2
requests-toolbelt==0.9.1
sortedcontainers==2.1.0
sqlalchemy-citext==1.3.post0
sqlalchemy-utils==0.33.11
teal==0.2.0a40
tqdm==4.32.2
pint==0.9
py-dmidecode==0.1.0
pandas==1.3.5
numpy==1.22.0 # pandas dependency
odfpy==1.4.1 # pandas dependency
xlrd==2.0.1 # pandas dependency
openpyxl==3.0.10 # pandas dependency
et_xmlfile==1.1.0 # pandas dependency

View File

@ -1,53 +1,236 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile --output-file=requirements.txt requirements.in
#
alembic==1.4.2 alembic==1.4.2
# via -r requirements.in
anytree==2.4.3 anytree==2.4.3
apispec==0.39.0 # via teal
apispec[yaml]==5.2.2
# via
# apispec-webframeworks
# teal
apispec-webframeworks==0.5.2
# via teal
atomicwrites==1.4.0
# via -r requirements.in
boltons==18.0.1 boltons==18.0.1
# via
# ereuse-utils
# teal
cairocffi==1.4.0
# via
# cairosvg
# weasyprint
cairosvg==2.5.2
# via weasyprint
certifi==2022.9.24
# via requests
cffi==1.15.1
# via
# cairocffi
# weasyprint
charset-normalizer==2.0.12
# via requests
click==6.7 click==6.7
# via
# ereuse-utils
# flask
click-spinner==0.1.8 click-spinner==0.1.8
# via
# -r requirements.in
# teal
colorama==0.3.9 colorama==0.3.9
# via
# -r requirements.in
# ereuse-utils
colour==0.1.5 colour==0.1.5
ereuse-utils[naming,test,session,cli]==0.4.0b50 # via
Flask==1.0.2 # -r requirements.in
Flask-Cors==3.0.10 # sqlalchemy-utils
Flask-Login==0.5.0 cssselect2==0.7.0
Flask-SQLAlchemy==2.3.2 # via
Flask-WTF==1.0.0 # cairosvg
# weasyprint
defusedxml==0.7.1
# via
# cairosvg
# odfpy
ereuse-utils[cli,naming,session,test]==0.4.0b50
# via
# -r requirements.in
# teal
et-xmlfile==1.1.0
# via
# -r requirements.in
# openpyxl
flask==1.0.2
# via
# ereuse-utils
# flask-cors
# flask-login
# flask-sqlalchemy
# flask-weasyprint
# flask-wtf
# teal
flask-cors==3.0.10
# via
# -r requirements.in
# teal
flask-login==0.5.0
# via -r requirements.in
flask-sqlalchemy==2.5.1
# via teal
flask-weasyprint==0.4
# via -r requirements.in
flask-wtf==1.0.0
# via -r requirements.in
hashids==1.2.0 hashids==1.2.0
# via -r requirements.in
html5lib==1.1
# via weasyprint
idna==3.4
# via requests
inflection==0.3.1 inflection==0.3.1
# via ereuse-utils
itsdangerous==2.0.1 itsdangerous==2.0.1
# lock Jinja2 version because it's the latest compatible with Flask 1.0.X # via
# see related info on https://github.com/pallets/jinja/issues/1628 # flask
Jinja2==3.0.3 # flask-wtf
marshmallow==3.0.0b11 jinja2==3.0.3
# via flask
mako==1.2.3
# via alembic
markupsafe==2.1.1
# via
# jinja2
# mako
# wtforms
marshmallow==3.18.0
# via
# marshmallow-enum
# teal
# webargs
marshmallow-enum==1.4.1 marshmallow-enum==1.4.1
passlib==1.7.1 # via teal
phonenumbers==8.9.11 more-itertools==8.12.0
pytest==3.7.2 # via -r requirements.in
pytest-runner==4.2 numpy==1.22.0
python-dateutil==2.7.3 # via
python-stdnum==1.9 # -r requirements.in
PyYAML==5.4 # pandas
requests[security]==2.27.1 odfpy==1.4.1
requests-mock==1.5.2 # via -r requirements.in
SQLAlchemy==1.3.24 openpyxl==3.0.10
SQLAlchemy-Utils==0.33.11 # via -r requirements.in
teal==0.2.0a38 packaging==21.3
webargs==5.5.3 # via marshmallow
Werkzeug==0.15.5
sqlalchemy-citext==1.3.post0
flask-weasyprint==0.5
weasyprint==44
psycopg2-binary==2.8.3
sortedcontainers==2.1.0
tqdm==4.32.2
python-decouple==3.3
python-dotenv==0.14.0
pyjwt==2.4.0
pint==0.9
py-dmidecode==0.1.0
pandas==1.3.5 pandas==1.3.5
numpy==1.22.0 # pandas dependency # via -r requirements.in
odfpy==1.4.1 # pandas dependency passlib==1.7.1
xlrd==2.0.1 # pandas dependency # via
openpyxl==3.0.10 # pandas dependency # -r requirements.in
et_xmlfile==1.1.0 # pandas dependency # sqlalchemy-utils
phonenumbers==8.9.11
# via
# -r requirements.in
# sqlalchemy-utils
pillow==9.2.0
# via cairosvg
pint==0.9
# via -r requirements.in
psycopg2-binary==2.8.3
# via -r requirements.in
py-dmidecode==0.1.0
# via -r requirements.in
pycparser==2.21
# via cffi
pyjwt==2.4.0
# via -r requirements.in
pyparsing==3.0.9
# via packaging
pyphen==0.13.0
# via weasyprint
python-dateutil==2.7.3
# via
# alembic
# pandas
python-decouple==3.3
# via -r requirements.in
python-dotenv==0.14.0
# via -r requirements.in
python-editor==1.0.4
# via alembic
python-stdnum==1.9
# via -r requirements.in
pytz==2022.2.1
# via pandas
pyyaml==5.4
# via
# -r requirements.in
# apispec
requests==2.27.1
# via
# -r requirements.in
# requests-mock
# requests-toolbelt
requests-mock==1.5.2
# via -r requirements.in
requests-toolbelt==0.9.1
# via
# -r requirements.in
# ereuse-utils
six==1.16.0
# via
# anytree
# flask-cors
# html5lib
# python-dateutil
# requests-mock
# sqlalchemy-utils
sortedcontainers==2.1.0
# via -r requirements.in
sqlalchemy==1.3.24
# via
# alembic
# flask-sqlalchemy
# sqlalchemy-citext
# sqlalchemy-utils
sqlalchemy-citext==1.3.post0
# via -r requirements.in
sqlalchemy-utils[color,password,phone]==0.33.11
# via
# -r requirements.in
# teal
teal==0.2.0a40
# via -r requirements.in
tinycss2==1.1.1
# via
# cairosvg
# cssselect2
# weasyprint
tqdm==4.32.2
# via
# -r requirements.in
# ereuse-utils
urllib3==1.26.12
# via requests
weasyprint==44
# via flask-weasyprint
webargs==5.5.3
# via teal
webencodings==0.5.1
# via
# cssselect2
# html5lib
# tinycss2
werkzeug==2.0.3
# via
# flask
# teal
wtforms==3.0.1
# via flask-wtf
xlrd==2.0.1
# via -r requirements.in