Skip to content

Commit 1edd853

Browse files
committed
😵‍💫 Testing a few CI things. Removing mypy.ini and ruff.toml for the pyproject.toml, added markdown linting in ci, added ruff format check also.
1 parent 5b714cc commit 1edd853

File tree

4 files changed

+43
-27
lines changed

4 files changed

+43
-27
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,38 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
lint-and-typecheck:
10+
lint-typecheck:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Check out code
14+
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Set up Python
18-
uses: actions/setup-python@v5
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v3
19+
20+
- name: Cache uv environments
21+
uses: actions/cache@v3
1922
with:
20-
python-version: "3.14"
23+
path: ~/.cache/uv
24+
key: uv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
25+
restore-keys: |
26+
uv-${{ runner.os }}-
2127
22-
- name: Install tools
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install ruff mypy
28+
- name: Install tools with uv
29+
run: uv tool install ruff mypy
2630

27-
- name: Run ruff
31+
- name: Ruff lint
2832
run: ruff check .
2933

30-
- name: Run mypy
34+
- name: Ruff format check
35+
run: ruff format --check .
36+
37+
- name: Mypy type checking
3138
run: mypy .
39+
40+
- name: Markdown lint
41+
uses: DavidAnson/markdownlint-cli2-action@v15
42+
with:
43+
globs: |
44+
**/*.md

mypy.ini

Lines changed: 0 additions & 8 deletions
This file was deleted.

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,22 @@ description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.14"
77
dependencies = []
8+
9+
[tool.ruff]
10+
line-length = 88
11+
target-version = "py314"
12+
13+
[tool.ruff.lint]
14+
select = ["E", "F", "W"]
15+
ignore = []
16+
17+
[tool.mypy]
18+
python_version = "3.14"
19+
ignore_missing_imports = true
20+
pretty = true
21+
22+
# stricter mypy rules for utils
23+
[mypy-utils.*]
24+
disallow_untyped_defs = true
25+
disallow_incomplete_defs = true
26+
warn_unused_ignores = true

ruff.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)