Skip to content

Commit 9e48177

Browse files
authored
Merge pull request #918 from adamjstewart/tests/minimum
Test minimum and maximum supported dependencies
2 parents 41a6fe5 + 57e55aa commit 9e48177

File tree

11 files changed

+67
-45
lines changed

11 files changed

+67
-45
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 6 deletions
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

Lines changed: 16 additions & 10 deletions
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
@@ -32,18 +30,26 @@ jobs:
3230

3331
test:
3432
runs-on: ubuntu-latest
35-
needs: [style]
3633
steps:
3734
- uses: actions/checkout@v4
3835
- name: Set up Python ${{ matrix.python-version }}
3936
uses: actions/setup-python@v5
4037
with:
41-
python-version: 3.9
38+
python-version: "3.11"
4239
- 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
40+
run: python -m pip install -r requirements/required.txt -r requirements/test.txt
4741
- name: Test with pytest
48-
run: make test
42+
run: pytest
4943

44+
minimum:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.9"
52+
- name: Install dependencies
53+
run: python -m pip install -r requirements/minimum.old -r requirements/test.txt
54+
- name: Test with pytest
55+
run: pytest

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
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

docs/requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

pyproject.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,30 @@ classifiers = [
1717
'Programming Language :: Python :: Implementation :: PyPy',
1818
]
1919
dependencies = [
20-
'efficientnet-pytorch==0.7.1',
21-
'huggingface-hub>=0.24.6',
22-
'numpy',
23-
'pillow',
24-
'pretrainedmodels==0.7.4',
25-
'six',
26-
'timm==0.9.7',
27-
'torch',
28-
'torchvision>=0.5',
29-
'tqdm',
20+
'efficientnet-pytorch>=0.6.1',
21+
'huggingface-hub>=0.24',
22+
'numpy>=1.19.3',
23+
'pillow>=8',
24+
'pretrainedmodels>=0.7.1',
25+
'six>=1.5',
26+
'timm>=0.9',
27+
'torch>=1.8',
28+
'torchvision>=0.9',
29+
'tqdm>=4.42.1',
3030
]
3131
dynamic = ['version']
3232

3333
[project.optional-dependencies]
3434
docs = [
3535
'autodocsumm',
3636
'huggingface-hub',
37-
'six==1.15.0',
38-
'sphinx<7',
39-
'sphinx-book-theme==1.1.2',
37+
'six',
38+
'sphinx',
39+
'sphinx-book-theme',
4040
]
4141
test = [
4242
'pytest',
43-
'ruff==0.5.2',
43+
'ruff',
4444
]
4545

4646
[project.urls]

requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

requirements/docs.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
autodocsumm==0.2.13
2+
huggingface-hub==0.24.6
3+
six==1.16.0
4+
sphinx==8.0.2
5+
sphinx-book-theme==1.1.3

requirements/minimum.old

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
efficientnet-pytorch==0.6.1
2+
huggingface-hub==0.24.0
3+
numpy==1.19.3
4+
pillow==8.0.0
5+
pretrainedmodels==0.7.1
6+
six==1.5.0
7+
timm==0.9.0
8+
torch==1.8.0
9+
torchvision==0.9.0
10+
tqdm==4.42.1

requirements/required.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
efficientnet-pytorch==0.7.1
2+
huggingface_hub==0.24.6
3+
numpy==2.1.1
4+
pillow==10.4.0
5+
pretrainedmodels==0.7.4
6+
six==1.16.0
7+
timm==1.0.9
8+
torch==2.4.1
9+
torchvision==0.19.1
10+
tqdm==4.66.5

requirements/test.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pytest==8.3.3
2+
ruff==0.6.4

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)