Skip to content

Commit 41b14ab

Browse files
committed
Run the type check in checks, lint docs/src with add_docs, omit integration tests by glob
checks now runs check-types alongside check-dist in every python variant. With add_docs, lint-docs and fix-docs cover docs/src/ (the source directory the gitignore already assumes with docs/src/_build/). The coverage omit entry is a glob: a bare directory path matches no file, so the integration tests were never omitted. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
1 parent 5ff720b commit 41b14ab

16 files changed

Lines changed: 52 additions & 44 deletions

‎python/cpp/Makefile.jinja‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ lint-cpp: ## run cpp linter
3030
clang-format --dry-run -Werror -i -style=file `find ./cpp -name "*.*pp"`
3131

3232
lint-docs: ## lint docs with mdformat and codespell
33-
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}
34-
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}
33+
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
34+
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
3535

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

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

4949
fix-docs: ## autoformat docs with mdformat and codespell
50-
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}
51-
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}
50+
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
51+
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
5252

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

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

69-
checks: check-dist
69+
checks: check-dist check-types
7070

7171
# alias
7272
check: checks

‎python/cpp/pyproject.toml.jinja‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ test-requires = ["pytest"]
109109
[tool.coverage.run]
110110
branch = true
111111
omit = [
112-
"{{ module }}/tests/integration/",
112+
# a glob: a bare directory path matches no file
113+
"{{ module }}/tests/integration/*",
113114
]
114115

115116
[tool.coverage.report]

‎python/cppjswasm/Makefile.jinja‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ lint-cpp: ## run C++ linter
5858
make -C cpp lint
5959

6060
lint-docs: ## lint docs with mdformat and codespell
61-
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}
62-
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}
61+
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
62+
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
6363

6464
lint: lint-cpp lint-js lint-py lint-docs ## run project linters
6565

@@ -78,8 +78,8 @@ fix-cpp: ## fix C++ formatting
7878
make -C cpp fix
7979

8080
fix-docs: ## autoformat docs with mdformat and codespell
81-
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}
82-
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}
81+
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
82+
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
8383

8484
fix: fix-cpp fix-js fix-py fix-docs ## run project autoformatters
8585

@@ -97,7 +97,7 @@ check-dist: ## check python sdist and wheel with check-dist
9797
check-types: ## check python types with ty
9898
ty check --python $$(which python)
9999

100-
checks: check-dist
100+
checks: check-dist check-types
101101

102102
# alias
103103
check: checks

‎python/cppjswasm/pyproject.toml.jinja‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ test-requires = ["pytest"]
121121
[tool.coverage.run]
122122
branch = true
123123
omit = [
124-
"{{ module }}/tests/integration/",
124+
# a glob: a bare directory path matches no file
125+
"{{ module }}/tests/integration/*",
125126
]
126127

127128
[tool.coverage.report]

‎python/cython/Makefile.jinja‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ check-dist: ## check python sdist and wheel with check-dist
4040
check-types: ## check Python types (advisory)
4141
ty check {{ module }}
4242

43-
checks: check-dist ## run distribution checks
43+
checks: check-dist check-types ## run distribution checks
4444
check: checks
4545

4646
test: ## run Python tests

‎python/cython/pyproject.toml.jinja‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ replace = 'version = "{new_version}"'
8686
[tool.coverage.run]
8787
branch = true
8888
omit = [
89-
"{{ module }}/tests/integration/",
89+
# a glob: a bare directory path matches no file
90+
"{{ module }}/tests/integration/*",
9091
"{{ module }}/_compiled.py",
9192
]
9293

‎python/js/Makefile.jinja‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ lint-js: ## run js linter
4343
cd js; pnpm lint
4444

4545
lint-docs: ## lint docs with mdformat and codespell
46-
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}
47-
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}
46+
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
47+
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
4848

4949
lint: lint-js lint-py lint-docs ## run project linters
5050

@@ -60,8 +60,8 @@ fix-js: ## fix js formatting
6060
cd js; pnpm fix
6161

6262
fix-docs: ## autoformat docs with mdformat and codespell
63-
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}
64-
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}
63+
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
64+
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
6565

6666
fix: fix-js fix-py fix-docs ## run project autoformatters
6767

@@ -79,7 +79,7 @@ check-dist: ## check python sdist and wheel with check-dist
7979
check-types: ## check python types with ty
8080
ty check --python $$(which python)
8181

82-
checks: check-dist
82+
checks: check-dist check-types
8383

8484
# alias
8585
check: checks

‎python/js/pyproject.toml.jinja‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ replace = '"version": "{new_version}"'
9191
[tool.coverage.run]
9292
branch = true
9393
omit = [
94-
"{{ module }}/tests/integration/",
94+
# a glob: a bare directory path matches no file
95+
"{{ module }}/tests/integration/*",
9596
]
9697

9798
[tool.coverage.report]

‎python/jupyter/Makefile.jinja‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ lint-js: ## run js linter
4545
cd js; pnpm lint
4646

4747
lint-docs: ## lint docs with mdformat and codespell
48-
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}
49-
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}
48+
python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
49+
python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
5050

5151
lint: lint-js lint-py lint-docs ## run project linters
5252

@@ -62,8 +62,8 @@ fix-js: ## fix js formatting
6262
cd js; pnpm fix
6363

6464
fix-docs: ## autoformat docs with mdformat and codespell
65-
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}
66-
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}
65+
python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
66+
python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %}{% if add_docs %}docs/src/{% endif %}
6767

6868
fix: fix-js fix-py fix-docs ## run project autoformatters
6969

@@ -81,7 +81,7 @@ check-dist: ## check python sdist and wheel with check-dist
8181
check-types: ## check python types with ty
8282
ty check --python $$(which python)
8383

84-
checks: check-dist
84+
checks: check-dist check-types
8585

8686
# alias
8787
check: checks

‎python/jupyter/pyproject.toml.jinja‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ replace = '"version": "{new_version}"'
9999
[tool.coverage.run]
100100
branch = true
101101
omit = [
102-
"{{ module }}/tests/integration/",
102+
# a glob: a bare directory path matches no file
103+
"{{ module }}/tests/integration/*",
103104
]
104105
105106
[tool.coverage.report]

0 commit comments

Comments
 (0)