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
2 changes: 1 addition & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -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: cpp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ lint-cpp: ## run cpp linter
clang-format --dry-run -Werror -i -style=file `find ./cpp -name "*.*pp"`

lint-docs: ## lint docs with mdformat and codespell
python -m mdformat --check README.md docs/wiki/
python -m codespell_lib README.md docs/wiki/
python -m mdformat --check README.md $(wildcard docs/src) docs/wiki/
python -m codespell_lib README.md $(wildcard docs/src) docs/wiki/

lint: lint-cpp lint-py ## run project linters

Expand All @@ -47,8 +47,8 @@ fix-cpp: ## fix cpp formatting
clang-format -i -style=file `find ./cpp -name "*.*pp"`

fix-docs: ## autoformat docs with mdformat and codespell
python -m mdformat README.md docs/wiki/
python -m codespell_lib --write README.md docs/wiki/
python -m mdformat README.md $(wildcard docs/src) docs/wiki/
python -m codespell_lib --write README.md $(wildcard docs/src) docs/wiki/

fix: fix-cpp fix-py fix-docs ## run project autoformatters

Expand All @@ -66,7 +66,7 @@ check-dist: ## check python sdist and wheel with check-dist
check-types: ## check python types with ty
ty check --python $$(which python)

checks: check-dist
checks: check-dist check-types

# alias
check: checks
Expand Down
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ develop = [
"hatch-cpp>=0.5.0",
"hatchling",
"mdformat",
"mdformat-frontmatter",
"mdformat-tables>=1",
"pybind11",
"pytest",
Expand Down Expand Up @@ -101,7 +102,7 @@ test-requires = ["pytest"]
[tool.coverage.run]
branch = true
omit = [
"python_template_cpp/tests/integration/",
"python_template_cpp/tests/integration/*",
]

[tool.coverage.report]
Expand All @@ -113,13 +114,6 @@ exclude_also = [
ignore_errors = true
fail_under = 50

[tool.hatch.build]
artifacts = [
"python_template_cpp/*.dll",
"python_template_cpp/*.dylib",
"python_template_cpp/*.so",
]

[tool.hatch.build.sources]
src = "/"

Expand All @@ -130,6 +124,7 @@ libraries = [
]

[tool.hatch.build.targets.sdist]
exclude = ["*.dll", "*.dylib", "*.so", "*.pyd"]
packages = [
"python_template_cpp",
"cpp",
Expand All @@ -141,6 +136,11 @@ packages = [


[tool.hatch.build.targets.wheel]
artifacts = [
"python_template_cpp/*.dll",
"python_template_cpp/*.dylib",
"python_template_cpp/*.so",
]
packages = [
"python_template_cpp",
]
Expand Down
1 change: 1 addition & 0 deletions python_template_cpp/extension.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
def add(i: int, j: int) -> int: ...
Loading