Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Code Check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
code-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
enable-cache: true

- name: Install dependencies
run: uv sync --locked --group lint

- name: Check imports with ruff
run: uv run ruff check --select I --exit-non-zero-on-fix .

- name: Check formatting with ruff
run: uv run ruff format --check .

- name: Clean notebooks
run: uv run nb-clean check --remove-empty-cells --remove-all-notebook-metadata --preserve-cell-outputs examples/*.ipynb
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ ssl = ["certifi>=2025.7.14"]

[dependency-groups]
dev = [
{ include-group = "lint" },
{ include-group = "docs" },
{ include-group = "test" },
"pre-commit>=4.2.0",
"ruff>=0.12.5",
"nb-clean>=4.0.1",
"ipykernel>=6.30.0",
]
lint = ["ruff>=0.12.5", "nb-clean>=4.0.1"]
docs = ["furo>=2025.7.19", "myst-parser>=3.0.1", "sphinx>=7.4.7"]
test = ["pytest>=8.4.1", "pytest-rerunfailures>=15.1"]

Expand Down
Loading
Loading