-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.69 KB
/
Copy pathpythonlint.yml
File metadata and controls
48 lines (47 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Linting"
on: [push]
jobs:
pylint:
name: Python Code Quality and Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]
linter-env: ["linting", "type_check", "spell_check"]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (linting)
if: matrix.linter-env == 'linting'
run: uv sync --group linting --group init_bo4e
- name: Install Dependencies (type_check)
if: matrix.linter-env == 'type_check'
run: uv sync --group type_check --group init_bo4e
- name: Install Dependencies (spell_check)
if: matrix.linter-env == 'spell_check'
run: uv sync --group spell_check
- name: Generate BO4E models
if: matrix.linter-env == 'linting' || matrix.linter-env == 'type_check'
run: |
mkdir -p bo4e_schemas
cd bo4e_schemas
uv run bost -t v202401.0.1 -o ./
uv run bo4e-generator -i ./ -o ../src/borm/models -ot sql_model
- name: Run ruff check
if: matrix.linter-env == 'linting'
run: |
uv run ruff check src/borm tests
- name: Run mypy
if: matrix.linter-env == 'type_check'
run: |
uv run mypy --show-error-codes tests
uv run mypy --show-error-codes src/borm
- name: Run codespell
if: matrix.linter-env == 'spell_check'
run: |
uv run codespell --ignore-words=domain-specific-terms.txt src/
uv run codespell --ignore-words=domain-specific-terms.txt README.md