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
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on:
pull_request:
types: [opened, edited, synchronize, labeled, unlabeled, ready_for_review, reopened]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.2"
- name: Static code check
run: uv run poe ci_checker
- name: Check docs build
working-directory: ./docs
run: |
uv sync --group docs
make html
- name: Check PR title style
uses: actions/github-script@v7
with:
script: |
const title = context.payload.pull_request.title;
const labels = context.payload.pull_request.labels.map(l => l.name);
if (labels.includes('dev')) {
console.log('Skipping PR title check due to dev label.');
return;
}
const regex = /^(feat|fix|refactor|doc|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
if (!regex.test(title)) {
core.setFailed(
`PR title "${title}" does not match the expected conventional commit format`
);
}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
echo "::error ::Tag doesn't match project version"
exit 1
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: "0.5.20"
version: "0.8.2"
- name: Build package
run: uv build
- name: Publish package to PyPI
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXBUILD ?= uv run sphinx-build
SOURCEDIR = source
BUILDDIR = build

Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ dependencies = [
"anyio>=4.8.0",
]

[project.optional-dependencies]
[dependency-groups]
dev = ["mypy>=1.14.1", "poethepoet>=0.36.0", "ruff>=0.9.1"]
docs = [
"enum-tools[sphinx]>=0.12.0",
"furo>=2024.8.6",
Expand All @@ -21,9 +22,6 @@ docs = [
"sphinx-autodoc-typehints>=3.0.0",
]

[dependency-groups]
dev = ["mypy>=1.14.1", "poethepoet>=0.36.0", "ruff>=0.9.1"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Expand All @@ -49,4 +47,7 @@ extend-select = ["I"]
linter = "uv run ruff check --fix"
formatter = "uv run ruff format"
type_checker = "uv run mypy"
ci_linter = "uv run ruff check"
ci_formatter = "uv run ruff format --check"
checker = ["linter", "formatter", "type_checker"]
ci_checker = ["ci_linter", "ci_formatter", "type_checker"]
27 changes: 13 additions & 14 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.