Skip to content

Commit 6ee7406

Browse files
committed
Use PEP 735 dependency groups while linting in CI
1 parent d4363a5 commit 6ee7406

File tree

1 file changed

+14
-57
lines changed

1 file changed

+14
-57
lines changed

.github/workflows/lint.yaml

Lines changed: 14 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -15,72 +15,29 @@ on:
1515
- '!contrib/**'
1616

1717
jobs:
18-
pylint:
18+
lint:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: ["3.10"]
23-
name: Pylint
24-
steps:
25-
- name: checkout git
26-
uses: actions/checkout@v4
27-
with:
28-
fetch-depth: 0
29-
- name: Setup conda
30-
uses: s-weigand/setup-conda@v1
31-
with:
32-
update-conda: true
33-
python-version: ${{ matrix.python-version }}
34-
conda-channels: anaconda, conda-forge
35-
- name: run pylint
36-
run: |
37-
sudo apt-get remove python3-openssl
38-
pip install --upgrade -e '.[test]'
39-
pip install pylint>3.2
40-
pylint -j 2 --reports no datacube
41-
22+
python-version: ["3.12"]
23+
lint-command:
24+
- "pylint --j 2 --reports no datacube"
25+
- "--group types mypy datacube"
26+
- "pycodestyle tests integration_tests examples --max-line-length 120"
4227

43-
mypy:
44-
runs-on: ubuntu-latest
45-
strategy:
46-
matrix:
47-
python-version: ["3.10"]
48-
name: MyPy
28+
name: Code Lint
4929
steps:
5030
- name: checkout git
5131
uses: actions/checkout@v4
5232
with:
5333
fetch-depth: 0
54-
- name: Setup conda
55-
uses: s-weigand/setup-conda@v1
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v2
5636
with:
57-
update-conda: true
58-
python-version: ${{ matrix.python-version }}
59-
conda-channels: anaconda, conda-forge
60-
- name: run mypy
37+
version: 0.5.5
38+
enable-cache: 'true'
39+
cache-suffix: ${{ matrix.python-version }}
40+
- name: Run ${{ matrix.lint-command }}
6141
run: |
62-
sudo apt-get remove python3-openssl
63-
pip install --upgrade -e '.[types]'
64-
mypy datacube
65-
42+
uv run ${{ matrix.lint-command }}
6643
67-
pycodestyle:
68-
name: pycodestyle
69-
runs-on: ubuntu-latest
70-
strategy:
71-
matrix:
72-
python-version: ["3.10"]
73-
steps:
74-
- name: Checkout
75-
uses: actions/checkout@v4
76-
- name: Setup conda
77-
uses: s-weigand/setup-conda@v1
78-
with:
79-
update-conda: true
80-
python-version: ${{ matrix.python-version }}
81-
conda-channels: anaconda, conda-forge
82-
- name: Run pycodestyle
83-
run: |
84-
sudo apt-get remove python3-openssl
85-
pip install --upgrade -e '.[test]'
86-
pycodestyle tests integration_tests examples --max-line-length 120

0 commit comments

Comments
 (0)