diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 73ae80fa..9cec9a94 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,11 +5,14 @@ updates: schedule: interval: "daily" - package-ecosystem: "pip" - directory: "/" + directory: "/requirements" schedule: interval: "daily" - # Allow up to 2 open pull requests at a time - open-pull-requests-limit: 2 - allow: - - dependency-name: "timm" - dependency-type: "all" + groups: + torch: + patterns: + - "torch" + - "torchvision" + ignore: + - dependency-name: "setuptools" + update-types: ["version-update:semver-patch"] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6eb83c10..0da4c4eb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,9 +21,7 @@ jobs: with: python-version: "3.11" - name: Install dependencies - run: | - python -m pip install --upgrade pip uv - python -m uv pip install ruff==0.5.2 + run: python -m pip install -r requirements/test.txt # Update output format to enable automatic inline annotations. - name: Run Ruff Linter run: ruff check --output-format=github @@ -32,18 +30,26 @@ jobs: test: runs-on: ubuntu-latest - needs: [style] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: "3.11" - name: Install dependencies - run: | - python -m pip install --upgrade pip uv - python -m uv pip install torch==2.3.1+cpu torchvision==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - make install_dev + run: python -m pip install -r requirements/required.txt -r requirements/test.txt - name: Test with pytest - run: make test + run: pytest + minimum: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "3.9" + - name: Install dependencies + run: python -m pip install -r requirements/minimum.old -r requirements/test.txt + - name: Test with pytest + run: pytest diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 81346fa5..59940a12 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -19,4 +19,4 @@ sphinx: # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - - requirements: docs/requirements.txt \ No newline at end of file + - requirements: requirements/docs.txt diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 7e5b1eff..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -sphinx<7 -sphinx-book-theme==1.1.2 -six==1.15.0 -autodocsumm -huggingface_hub \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a87f8cc7..3df76c0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,16 +17,16 @@ classifiers = [ 'Programming Language :: Python :: Implementation :: PyPy', ] dependencies = [ - 'efficientnet-pytorch==0.7.1', - 'huggingface-hub>=0.24.6', - 'numpy', - 'pillow', - 'pretrainedmodels==0.7.4', - 'six', - 'timm==0.9.7', - 'torch', - 'torchvision>=0.5', - 'tqdm', + 'efficientnet-pytorch>=0.6.1', + 'huggingface-hub>=0.24', + 'numpy>=1.19.3', + 'pillow>=8', + 'pretrainedmodels>=0.7.1', + 'six>=1.5', + 'timm>=0.9', + 'torch>=1.8', + 'torchvision>=0.9', + 'tqdm>=4.42.1', ] dynamic = ['version'] @@ -34,13 +34,13 @@ dynamic = ['version'] docs = [ 'autodocsumm', 'huggingface-hub', - 'six==1.15.0', - 'sphinx<7', - 'sphinx-book-theme==1.1.2', + 'six', + 'sphinx', + 'sphinx-book-theme', ] test = [ 'pytest', - 'ruff==0.5.2', + 'ruff', ] [project.urls] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index aa700f60..00000000 --- a/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -torchvision>=0.5.0 -pretrainedmodels==0.7.4 -efficientnet-pytorch==0.7.1 -timm==0.9.7 -huggingface_hub>=0.24.6 - -tqdm -pillow -six diff --git a/requirements/docs.txt b/requirements/docs.txt new file mode 100644 index 00000000..50fc866e --- /dev/null +++ b/requirements/docs.txt @@ -0,0 +1,5 @@ +autodocsumm==0.2.13 +huggingface-hub==0.24.6 +six==1.16.0 +sphinx==8.0.2 +sphinx-book-theme==1.1.3 diff --git a/requirements/minimum.old b/requirements/minimum.old new file mode 100644 index 00000000..ee655eb0 --- /dev/null +++ b/requirements/minimum.old @@ -0,0 +1,10 @@ +efficientnet-pytorch==0.6.1 +huggingface-hub==0.24.0 +numpy==1.19.3 +pillow==8.0.0 +pretrainedmodels==0.7.1 +six==1.5.0 +timm==0.9.0 +torch==1.8.0 +torchvision==0.9.0 +tqdm==4.42.1 diff --git a/requirements/required.txt b/requirements/required.txt new file mode 100644 index 00000000..1fb2ba74 --- /dev/null +++ b/requirements/required.txt @@ -0,0 +1,10 @@ +efficientnet-pytorch==0.7.1 +huggingface_hub==0.24.6 +numpy==2.1.1 +pillow==10.4.0 +pretrainedmodels==0.7.4 +six==1.16.0 +timm==1.0.9 +torch==2.4.1 +torchvision==0.19.1 +tqdm==4.66.5 diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 00000000..5c105705 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,2 @@ +pytest==8.3.3 +ruff==0.6.4 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b