Skip to content

Commit 7035872

Browse files
authored
Merge pull request #29 from aai-institute/cleanup
Dependency cleanup
2 parents aab4679 + 38f27f5 commit 7035872

7 files changed

+360
-74
lines changed

.github/workflows/test-and-lint.yaml

+14-14
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
python-version: 3.11
2626
cache: pip
2727
cache-dependency-path: |
28-
requirements.txt
28+
requirements-dev.txt
2929
pyproject.toml
3030
- name: Install dependencies
3131
run: |
32-
pip install -r requirements.txt
32+
pip install -r requirements-dev.txt
3333
pip install -e . --no-deps
3434
- name: Cache pre-commit tools
3535
uses: actions/cache@v4
@@ -38,7 +38,7 @@ jobs:
3838
${{ env.MYPY_CACHE_DIR }}
3939
${{ env.RUFF_CACHE_DIR }}
4040
${{ env.PRE_COMMIT_HOME }}
41-
key: ${{ hashFiles('requirements.txt', '.pre-commit-config.yaml') }}-linter-cache
41+
key: ${{ hashFiles('requirements-dev.txt', '.pre-commit-config.yaml') }}-linter-cache
4242
- name: Run pre-commit checks
4343
run: pre-commit run --all-files --verbose --show-diff-on-failure
4444
test:
@@ -47,15 +47,15 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
matrix:
50-
os: [ ubuntu-latest ]
50+
os: [ubuntu-latest]
5151
steps:
52-
- uses: actions/checkout@v4
53-
- name: Set up oldest supported Python on ${{ matrix.os }}
54-
uses: actions/setup-python@v5
55-
with:
56-
python-version: '3.10'
57-
- name: Run tests on oldest supported Python
58-
run: |
59-
python -m pip install -r requirements.txt
60-
python -m pip install .
61-
pytest
52+
- uses: actions/checkout@v4
53+
- name: Set up oldest supported Python on ${{ matrix.os }}
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: "3.10"
57+
- name: Run tests on oldest supported Python
58+
run: |
59+
pip install -r requirements-dev.txt
60+
pip install -e . --no-deps
61+
pytest

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ repos:
1212
- id: end-of-file-fixer
1313
- id: mixed-line-ending
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.4.1
15+
rev: v0.5.1
1616
hooks:
1717
- id: ruff
18-
args: [--fix, --exit-non-zero-on-fix]
18+
args: [--fix]
1919
- id: ruff-format
2020
- repo: https://github.com/pre-commit/mirrors-mypy
21-
rev: v1.10.0
21+
rev: v1.10.1
2222
hooks:
2323
# See https://github.com/pre-commit/mirrors-mypy/blob/main/.pre-commit-hooks.yaml
2424
- id: mypy

example_mnist_tf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
image=ImageOptions(
1111
spec=Path("example-docker.yaml"), name="localhost:5000/tf-example"
1212
),
13-
resources=ResourceOptions(memory="1Gi", cpu="2", gpu=1 if USE_GPU else None),
13+
resources=ResourceOptions(memory="2Gi", cpu="2", gpu=1 if USE_GPU else None),
1414
)
1515
)
1616
def mnist_train() -> None:

pyproject.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ description = ""
88
version = "0.1.0"
99
readme = "README.md"
1010
requires-python = ">=3.10"
11-
# TODO: Ray >=2.11 is missing Linux aarch64 wheels, replace when available (blocks Mac ARM64)
12-
dependencies = ["docker", "kubernetes", "ray[train,default]==2.10.0", "tensorflow"]
11+
dependencies = [
12+
"docker",
13+
"kubernetes",
14+
"ray[train,default]==2.32.0",
15+
"tensorflow",
16+
]
1317

1418
[project.scripts]
1519
jobs_execute = "jobs.execute:execute"
1620
jobby = "jobs.cli:main"
1721

1822
[project.optional-dependencies]
19-
dev = ["black", "ruff", "ruff-lsp", "pytest", "pre-commit"]
23+
dev = ["ruff", "pytest", "pre-commit"]
2024

2125
[tool.ruff]
2226
src = ["src"]

0 commit comments

Comments
 (0)