diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 9f9b39b..8d280bc 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: ebb6e1c +_commit: '4372075' _src_path: https://github.com/python-project-templates/base.git add_docs: true add_extension: cython diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7e15199..cbb2401 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ on: workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: diff --git a/Makefile b/Makefile index a7c24db..c11080f 100644 --- a/Makefile +++ b/Makefile @@ -18,16 +18,16 @@ lint-py: ## lint Python with ruff python -m ruff format --check python_template_cython lint-docs: ## lint documentation - python -m mdformat --check README.md docs/development.md - python -m codespell_lib README.md docs/development.md + python -m mdformat --check README.md docs/development.md $(wildcard docs/src) + python -m codespell_lib README.md docs/development.md $(wildcard docs/src) fix-py: ## autoformat Python code python -m ruff check --fix python_template_cython python -m ruff format python_template_cython fix-docs: ## autoformat documentation - python -m mdformat README.md docs/development.md - python -m codespell_lib --write README.md docs/development.md + python -m mdformat README.md docs/development.md $(wildcard docs/src) + python -m codespell_lib --write README.md docs/development.md $(wildcard docs/src) lint: lint-py lint-docs ## run all linters lints: lint @@ -40,7 +40,7 @@ check-dist: ## check python sdist and wheel with check-dist check-types: ## check Python types (advisory) ty check python_template_cython -checks: check-dist ## run distribution checks +checks: check-dist check-types ## run distribution checks check: checks test: ## run Python tests diff --git a/pyproject.toml b/pyproject.toml index 7ec87c9..0afeb21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ develop = [ "hatch-cython", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", @@ -79,7 +80,7 @@ replace = 'version = "{new_version}"' [tool.coverage.run] branch = true omit = [ - "python_template_cython/tests/integration/", + "python_template_cython/tests/integration/*", "python_template_cython/_compiled.py", ] diff --git a/python_template_cython/_native.pyi b/python_template_cython/_native.pyi new file mode 100644 index 0000000..44df0f3 --- /dev/null +++ b/python_template_cython/_native.pyi @@ -0,0 +1 @@ +def add(left: int, right: int) -> int: ...