Skip to content

Commit a5bae6e

Browse files
committed
Use requirements files in CI
1 parent 3a9889c commit a5bae6e

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

.github/dependabot.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ updates:
55
schedule:
66
interval: "daily"
77
- package-ecosystem: "pip"
8-
directory: "/"
8+
directory: "/requirements"
99
schedule:
1010
interval: "daily"
11-
# Allow up to 2 open pull requests at a time
12-
open-pull-requests-limit: 2
13-
allow:
14-
- dependency-name: "timm"
15-
dependency-type: "all"
11+
groups:
12+
torch:
13+
patterns:
14+
- "torch"
15+
- "torchvision"
16+
ignore:
17+
- dependency-name: "setuptools"
18+
update-types: ["version-update:semver-patch"]

.github/workflows/tests.yml

+3-9
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ jobs:
2121
with:
2222
python-version: "3.11"
2323
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip uv
26-
python -m uv pip install ruff==0.5.2
24+
run: python -m pip install -r requirements/test.txt
2725
# Update output format to enable automatic inline annotations.
2826
- name: Run Ruff Linter
2927
run: ruff check --output-format=github
@@ -40,10 +38,6 @@ jobs:
4038
with:
4139
python-version: 3.9
4240
- name: Install dependencies
43-
run: |
44-
python -m pip install --upgrade pip uv
45-
python -m uv pip install torch==2.3.1+cpu torchvision==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
46-
make install_dev
41+
run: python -m pip install -r requirements/required.txt -r requirements/test.txt
4742
- name: Test with pytest
48-
run: make test
49-
43+
run: pytest

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ sphinx:
1919
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
2020
python:
2121
install:
22-
- requirements: docs/requirements.txt
22+
- requirements: requirements/docs.txt

docker/Dockerfile.dev

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ FROM anibali/pytorch:1.5.0-nocuda
22

33
WORKDIR /tmp/smp/
44

5-
COPY ./requirements.txt /tmp/smp/requirements.txt
6-
RUN pip install -r requirements.txt
7-
RUN pip install pytest mock
5+
COPY ./requirements/required.txt /tmp/smp/requirements.txt
6+
RUN pip install -r requirements/required.txt -r requirements/test.txt
87

98
COPY . /tmp/smp/
109
RUN pip install .

0 commit comments

Comments
 (0)