Skip to content

Commit

Permalink
Use PEP 735 dependency groups while linting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
omad committed Dec 1, 2024
1 parent d4363a5 commit 6ee7406
Showing 1 changed file with 14 additions and 57 deletions.
71 changes: 14 additions & 57 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,29 @@ on:
- '!contrib/**'

jobs:
pylint:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
name: Pylint
steps:
- name: checkout git
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: run pylint
run: |
sudo apt-get remove python3-openssl
pip install --upgrade -e '.[test]'
pip install pylint>3.2
pylint -j 2 --reports no datacube
python-version: ["3.12"]
lint-command:
- "pylint --j 2 --reports no datacube"
- "--group types mypy datacube"
- "pycodestyle tests integration_tests examples --max-line-length 120"

mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
name: MyPy
name: Code Lint
steps:
- name: checkout git
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup conda
uses: s-weigand/setup-conda@v1
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: run mypy
version: 0.5.5
enable-cache: 'true'
cache-suffix: ${{ matrix.python-version }}
- name: Run ${{ matrix.lint-command }}
run: |
sudo apt-get remove python3-openssl
pip install --upgrade -e '.[types]'
mypy datacube
uv run ${{ matrix.lint-command }}
pycodestyle:
name: pycodestyle
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: Run pycodestyle
run: |
sudo apt-get remove python3-openssl
pip install --upgrade -e '.[test]'
pycodestyle tests integration_tests examples --max-line-length 120

0 comments on commit 6ee7406

Please sign in to comment.