Skip to content

Commit

Permalink
Use requirements files in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Sep 4, 2024
1 parent 3a9889c commit a5bae6e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
15 changes: 9 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
12 changes: 3 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,10 +38,6 @@ jobs:
with:
python-version: 3.9
- 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
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements/docs.txt
5 changes: 2 additions & 3 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ FROM anibali/pytorch:1.5.0-nocuda

WORKDIR /tmp/smp/

COPY ./requirements.txt /tmp/smp/requirements.txt
RUN pip install -r requirements.txt
RUN pip install pytest mock
COPY ./requirements/required.txt /tmp/smp/requirements.txt
RUN pip install -r requirements/required.txt -r requirements/test.txt

COPY . /tmp/smp/
RUN pip install .

0 comments on commit a5bae6e

Please sign in to comment.