Skip to content

Commit

Permalink
[requirements] Migrate to a hierarchical requirements structure for e…
Browse files Browse the repository at this point in the history
…ase of use in formatting and test workflows
  • Loading branch information
drcpu-github committed Mar 15, 2024
1 parent 44f2660 commit b82b998
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements/formatting.txt
- name: Run code checks
run: |
make lint-check
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cbor flask==2.3.2 flask_smorest==0.42.0 marshmallow Pillow psycopg[pool] pylibmc pytest toml
pip install -r requirements/api.txt
pip install -r requirements/tests.txt
- name: Run pytest
run: |
python -m pytest
22 changes: 0 additions & 22 deletions requirements.txt

This file was deleted.

6 changes: 6 additions & 0 deletions requirements/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Flask==2.3.2
flask_smorest==0.42.0
gevent==23.7.0
gunicorn==21.2.0
marshmallow==3.20.1
psycopg-pool==3.1.8
13 changes: 13 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cbor==1.0.0
matplotlib==3.5.3
numpy==1.24.4
Pillow==10.0.0
prometheus_client==0.15.0
psutil==5.8.0
psycopg==3.1.12
pylibmc==1.6.1
toml==0.10.2

-r requirements/api.txt # pytest dependencies
-r requirements/formatting.txt # includes all formatting packages
-r requirements/tests.txt # pytest dependencies
6 changes: 6 additions & 0 deletions requirements/formatting.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
black==24.2.0
flake8==7.0.0
flake8-bugbear==24.2.6
flake8-implicit-str-concat==0.4.0
isort==5.13.2
pre-commit==3.3.3
1 change: 1 addition & 0 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==7.4.0

0 comments on commit b82b998

Please sign in to comment.