Skip to content

Commit d30096f

Browse files
committed
Applied latest template
1 parent a8d08ea commit d30096f

File tree

6 files changed

+33
-23
lines changed

6 files changed

+33
-23
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
if: ${{ matrix.os == 'Windows' }}
2323
# https://github.com/actions/checkout/issues/135
2424
run: git config --global core.autocrlf false
25-
- uses: actions/checkout@v4
26-
- uses: actions/setup-node@v4
25+
- uses: actions/checkout@v6
26+
- uses: actions/setup-node@v6
2727
with:
28-
node-version: 20
28+
node-version: lts/*
2929
- name: Install pyright
3030
run: npm install --global pyright
3131
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v5
32+
uses: actions/setup-python@v6
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535
allow-prereleases: true
@@ -43,13 +43,11 @@ jobs:
4343
run: make installdeps
4444
- name: Run checks and lint
4545
run: make smoke-checks ver-checks
46-
- name: Run version-independent checks
47-
if: ${{ matrix.python-version == '3.13' }}
48-
run: make other-checks
4946
- name: Run nix-checks and shellcheck on Linux
5047
if: ${{ matrix.os == 'Ubuntu' }}
5148
# Only run nix-checks on Ubuntu because it doesn't work on Windows and bash is too old on macOS.
5249
# Only run shellcheck on Ubuntu because it's only installed there by default.
5350
run: make nix-checks shellcheck
5451
- name: Tests and Coverage
5552
run: make coverage
53+
# spell-checker: ignore shellcheck installdeps

Makefile

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ perm_checks = ./* .gitignore .vscode .github
1111
# The user can change the following on the command line:
1212
PYTHON3BIN = python
1313

14-
.PHONY: help tasklist installdeps test build-check
15-
.PHONY: smoke-checks nix-checks shellcheck ver-checks other-checks coverage unittest
16-
test: smoke-checks nix-checks shellcheck ver-checks other-checks coverage ## Run all tests
14+
.PHONY: help tasklist installdeps test build-check outdated
15+
.PHONY: smoke-checks nix-checks shellcheck ver-checks coverage unittest
16+
test: smoke-checks nix-checks shellcheck ver-checks coverage ## Run all tests
1717
# Reminder: If the `test` target changes, make the appropriate changes to .github/workflows/tests.yml
1818

19+
# spell-checker: ignore txts tasklist installdeps shellcheck FSTYPE MJSON OSTYPE devpod euxo pythonpath rcfile sdist
20+
# spell-checker: ignore igbpyutils ipynb msys mypy noheadings notruncate pipefail pycache pylint pyproject venv vfat
21+
1922
SHELL = /bin/bash
2023
.ONESHELL: # each recipe is executed as a single script
2124

@@ -36,11 +39,18 @@ build-check: smoke-checks
3639
echo "$${dist_files[@]}"
3740

3841
tasklist: ## List open tasks.
39-
@grep --color=auto \
42+
@set -uo pipefail
43+
command grep --color=auto \
4044
--exclude-dir=.git --exclude-dir=__pycache__ --exclude-dir=.ipynb_checkpoints --exclude-dir='.venv*' \
4145
--exclude-dir='.*cache' --exclude-dir=node_modules --exclude='LICENSE*' --exclude='.*.swp' \
4246
-Eri '\bto.?do\b'
43-
true # ignore nonzero exit code from grep
47+
set -e
48+
for gh_proj in $$( git remote -v | perl -wM5.014 -ne 'say $$1 while m{(?:\s|^)https?://(?:www\.)?github\.com/([^/\s]+/[^/\s]+)\.git(?:\s|$$)}ig' | sort -u ); do
49+
gh_count="$$(curl -sL https://api.github.com/repos/"$$gh_proj" | jq .open_issues_count)"
50+
if [ -n "$$gh_count" ] && [ "$$gh_count" != "0" ] && [ "$$gh_count" != "null" ]; then
51+
echo "There are $$gh_count open issues on GitHub $$gh_proj"
52+
fi
53+
done
4454

4555
installdeps: ## Install project dependencies
4656
@set -euxo pipefail
@@ -90,10 +100,10 @@ ver-checks: ## Checks that depend on the Python version
90100
$(PYTHON3BIN) -m flake8 --toml-config=pyproject.toml $(py_code_locs)
91101
$(PYTHON3BIN) -m pylint --rcfile=pyproject.toml --recursive=y $(py_code_locs)
92102

93-
other-checks: ## Checks not depending on the Python version
94-
@set -euxo pipefail
103+
outdated: ## Check the dependency versions
104+
@set -euo pipefail
95105
# note the following is on one line b/c GitHub macOS Action Runners are running bash 3.2 and the multiline version didn't work there...
96-
for REQ in $(requirement_txts); do $(PYTHON3BIN) -m pur --skip-gt --dry-run-changed --nonzero-exit-code -r "$$REQ"; done
106+
for REQ in $(requirement_txts); do $(PYTHON3BIN) -m pur --dry-run-changed -r "$$REQ"; done
97107

98108
unittest: ## Run unit tests
99109
$(PYTHON3BIN) -X dev -X warn_default_encoding -W error -m unittest -v

dev/isolated-dist-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trap 'set +e; popd; rm -rf "$temp_dir"' EXIT
2121
rsync -a tests "$temp_dir" --exclude=__pycache__
2222

2323
pushd "$temp_dir"
24-
$python3bin -m venv .venv
24+
"$python3bin" -m venv .venv
2525
.venv/bin/python -m pip -q install --upgrade pip
2626
.venv/bin/python -m pip install "$dist_file"
2727
.venv/bin/python -I -X dev -X warn_default_encoding -W error -m unittest -v

dev/requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# requirements *for development*!
2-
igbpyutils == 0.8.0
2+
igbpyutils == 1.0.0
33
simple-perms == 1.0.0 ; sys_platform != 'win32'
4-
coverage[toml] == 7.11.0
5-
coverage-simple-excludes == 1.1.0
6-
pylint == 4.0.2
7-
mypy == 1.18.2
4+
coverage[toml] == 7.12.0
5+
coverage-simple-excludes == 1.1.1
6+
pylint == 4.0.4
7+
mypy == 1.19.0
88
flake8 == 7.3.0
9-
Flake8-pyproject == 1.2.3
9+
Flake8-pyproject == 1.2.4
1010
pur == 7.3.3
1111
build == 1.3.0 ; sys_platform == 'linux'
1212
twine == 6.2.0 ; sys_platform == 'linux'

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ tomli == 2.3.0
33
sphinx >= 8.1.0, < 8.2.0 ; python_version < "3.11"
44
sphinx >= 8.2.3 ; python_version >= "3.11"
55
sphinx-markdown-builder == 0.6.8
6-
types-docutils == 0.22.2.20251006
6+
types-docutils == 0.22.3.20251115

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ packages = ["merge_insertion"]
4040
# mypy: ``# type: ignore[setting-name]``
4141
# coverage: ``# pragma: no cover``, ``# pragma: no branch``, and https://pypi.org/project/coverage-simple-excludes/
4242

43+
# spell-checker: ignore setuptools pylint noqa mypy venv rcfile pyproject inlinevar overgeneral argparse booleaness
44+
4345
# ##### ##### ##### ##### ##### https://github.com/microsoft/pyright/blob/main/docs/configuration.md ##### ##### ##### ##### #####
4446

4547
[tool.pyright]

0 commit comments

Comments
 (0)