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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/requirements/coverage.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
coverage==7.17.2
PyYAML==6.0.3
Markdown==3.11.3
# The optional console report and TUI, so that their tests run and count.
rich==15.0.0
textual==8.2.8
43 changes: 43 additions & 0 deletions .github/requirements/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,39 @@ coverage==7.17.2 \
--hash=sha256:f94d465ee00ebe694ca866d66bbe45fa04618b1afcb377de934694f624fa7cf6 \
--hash=sha256:ffbaadf8612781358b3f949ad68dce26c5a35beaafcc48125fc231dbcce7d362
# via -r coverage.in
linkify-it-py==2.2.0 \
--hash=sha256:3adc40eb5af300b2605fcfdb968c24e1d780a90f1f2221af7c15e5111e94d443 \
--hash=sha256:907acd2d17ac1fbb9ddb62c8957ccbd6158cac602231a15c3b0cd1e215f03cee
# via markdown-it-py
markdown==3.11.3 \
--hash=sha256:81eb91631dc97ad1efbc76019ef0f80fe90ca49ddf81546752d79989c3bfff3e \
--hash=sha256:e1a31a112232504d753e5c01bb8c2de90d3f0ba986b063e10770cf7695b09e73
# via -r coverage.in
markdown-it-py==4.2.0 \
--hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \
--hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a
# via
# mdit-py-plugins
# rich
# textual
mdit-py-plugins==0.6.1 \
--hash=sha256:214c82fb2ac524472ab6a5bcab1de80f73b50443e187f401bfd77efbc7c6481d \
--hash=sha256:a2bca0f039f39dbd35fb74ae1b5f998608c437463371f0ff7f49a19a17a114d0
# via textual
mdurl==0.1.2 \
--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \
--hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba
# via markdown-it-py
platformdirs==4.14.5 \
--hash=sha256:32e9921db7385aa8169bee4fe9501923e5715ba9fb7ea3b9c69b0d8e0639f7a1 \
--hash=sha256:8e778c6fa421516f4d3369449f8df3b0e1b72c0e0005fe88e3ec772d0a14e750
# via textual
pygments==2.21.0 \
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \
--hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c
# via
# rich
# textual
pyyaml==6.0.3 \
--hash=sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c \
--hash=sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a \
Expand Down Expand Up @@ -204,3 +233,17 @@ pyyaml==6.0.3 \
--hash=sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926 \
--hash=sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0
# via -r coverage.in
rich==15.0.0 \
--hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \
--hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36
# via
# -r coverage.in
# textual
textual==8.2.8 \
--hash=sha256:267375fd402dc8d981457212efa71f0e3365fd17bba144ba9bb3ed7563cb374a \
--hash=sha256:3f106a9fbc73e39dd266c9712432087de78a6d644084c7c241d6a25c3169115b
# via -r coverage.in
typing-extensions==4.16.0 \
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \
--hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5
# via textual
8 changes: 8 additions & 0 deletions .github/requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
PyYAML==6.0.3
# tests/build_site.py renders the documentation site.
Markdown==3.11.3
# The optional console report and TUI, so that their tests run and count.
rich==15.0.0
textual==8.2.8
# Runs the suite (unittest test cases) in parallel, one worker per core.
pytest==9.2.0
pytest-xdist==3.8.0
# pytest needs it on Windows only, so compiling on Linux would leave it out of the pins.
colorama==0.4.6
74 changes: 74 additions & 0 deletions .github/requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,70 @@
#
# pip-compile --allow-unsafe --generate-hashes --no-emit-index-url --output-file=test.txt --strip-extras test.in
#
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
# via -r test.in
execnet==2.1.2 \
--hash=sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd \
--hash=sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec
# via pytest-xdist
iniconfig==2.3.1 \
--hash=sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960 \
--hash=sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7
# via pytest
linkify-it-py==2.2.0 \
--hash=sha256:3adc40eb5af300b2605fcfdb968c24e1d780a90f1f2221af7c15e5111e94d443 \
--hash=sha256:907acd2d17ac1fbb9ddb62c8957ccbd6158cac602231a15c3b0cd1e215f03cee
# via markdown-it-py
markdown==3.11.3 \
--hash=sha256:81eb91631dc97ad1efbc76019ef0f80fe90ca49ddf81546752d79989c3bfff3e \
--hash=sha256:e1a31a112232504d753e5c01bb8c2de90d3f0ba986b063e10770cf7695b09e73
# via -r test.in
markdown-it-py==4.2.0 \
--hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \
--hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a
# via
# mdit-py-plugins
# rich
# textual
mdit-py-plugins==0.6.1 \
--hash=sha256:214c82fb2ac524472ab6a5bcab1de80f73b50443e187f401bfd77efbc7c6481d \
--hash=sha256:a2bca0f039f39dbd35fb74ae1b5f998608c437463371f0ff7f49a19a17a114d0
# via textual
mdurl==0.1.2 \
--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \
--hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba
# via markdown-it-py
packaging==26.3 \
--hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \
--hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
# via pytest
platformdirs==4.14.5 \
--hash=sha256:32e9921db7385aa8169bee4fe9501923e5715ba9fb7ea3b9c69b0d8e0639f7a1 \
--hash=sha256:8e778c6fa421516f4d3369449f8df3b0e1b72c0e0005fe88e3ec772d0a14e750
# via textual
pluggy==1.7.0 \
--hash=sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec \
--hash=sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8
# via pytest
pygments==2.21.0 \
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \
--hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c
# via
# pytest
# rich
# textual
pytest==9.2.0 \
--hash=sha256:07acdcf88ec174f907dc01af70bf52d49b014bbab03faeeade31c96b18c2e588 \
--hash=sha256:97c4f3b1f3c7414aa36465e09b8220f1d03627993bd51b1282e193753c80557b
# via
# -r test.in
# pytest-xdist
pytest-xdist==3.8.0 \
--hash=sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88 \
--hash=sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1
# via -r test.in
pyyaml==6.0.3 \
--hash=sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c \
--hash=sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a \
Expand Down Expand Up @@ -83,3 +143,17 @@ pyyaml==6.0.3 \
--hash=sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926 \
--hash=sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0
# via -r test.in
rich==15.0.0 \
--hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \
--hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36
# via
# -r test.in
# textual
textual==8.2.8 \
--hash=sha256:267375fd402dc8d981457212efa71f0e3365fd17bba144ba9bb3ed7563cb374a \
--hash=sha256:3f106a9fbc73e39dd266c9712432087de78a6d644084c7c241d6a25c3169115b
# via -r test.in
typing-extensions==4.16.0 \
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \
--hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5
# via textual
1 change: 1 addition & 0 deletions .github/requirements/typing.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ mypy==2.4.1
types-PyYAML==6.0.12.20261103
PyYAML==6.0.3
rich==15.0.0
textual==8.2.8
types-Markdown==3.11.3.20261108
Markdown==3.11.3
31 changes: 28 additions & 3 deletions .github/requirements/typing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,25 @@ librt==0.16.0 \
--hash=sha256:fe52bf4641069e7978a14253b036cb9002def1926317e710f2e249f8a8c47742 \
--hash=sha256:ff7baa55f8e7c69851419e50a666015d02a74198716fd45c0125a2112e0a389f
# via mypy
linkify-it-py==2.2.0 \
--hash=sha256:3adc40eb5af300b2605fcfdb968c24e1d780a90f1f2221af7c15e5111e94d443 \
--hash=sha256:907acd2d17ac1fbb9ddb62c8957ccbd6158cac602231a15c3b0cd1e215f03cee
# via markdown-it-py
markdown==3.11.3 \
--hash=sha256:81eb91631dc97ad1efbc76019ef0f80fe90ca49ddf81546752d79989c3bfff3e \
--hash=sha256:e1a31a112232504d753e5c01bb8c2de90d3f0ba986b063e10770cf7695b09e73
# via -r typing.in
markdown-it-py==4.2.0 \
--hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \
--hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a
# via rich
# via
# mdit-py-plugins
# rich
# textual
mdit-py-plugins==0.6.1 \
--hash=sha256:214c82fb2ac524472ab6a5bcab1de80f73b50443e187f401bfd77efbc7c6481d \
--hash=sha256:a2bca0f039f39dbd35fb74ae1b5f998608c437463371f0ff7f49a19a17a114d0
# via textual
mdurl==0.1.2 \
--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \
--hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba
Expand Down Expand Up @@ -276,10 +287,16 @@ pathspec==1.1.1 \
--hash=sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a \
--hash=sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189
# via mypy
platformdirs==4.14.5 \
--hash=sha256:32e9921db7385aa8169bee4fe9501923e5715ba9fb7ea3b9c69b0d8e0639f7a1 \
--hash=sha256:8e778c6fa421516f4d3369449f8df3b0e1b72c0e0005fe88e3ec772d0a14e750
# via textual
pygments==2.21.0 \
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \
--hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c
# via rich
# via
# rich
# textual
pyyaml==6.0.3 \
--hash=sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c \
--hash=sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a \
Expand Down Expand Up @@ -358,6 +375,12 @@ pyyaml==6.0.3 \
rich==15.0.0 \
--hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \
--hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36
# via
# -r typing.in
# textual
textual==8.2.8 \
--hash=sha256:267375fd402dc8d981457212efa71f0e3365fd17bba144ba9bb3ed7563cb374a \
--hash=sha256:3f106a9fbc73e39dd266c9712432087de78a6d644084c7c241d6a25c3169115b
# via -r typing.in
types-markdown==3.11.3.20261108 \
--hash=sha256:eac0188fc8dacbf9bbbea68a0aee98c7d3b0008f8b1def1a141cd669dd7c708a \
Expand All @@ -370,4 +393,6 @@ types-pyyaml==6.0.12.20261103 \
typing-extensions==4.16.0 \
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \
--hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5
# via mypy
# via
# mypy
# textual
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: Install PyYAML
- name: Install the test dependencies
run: python -m pip install --require-hashes -r .github/requirements/test.txt

# The unittest suite, run by pytest-xdist on every core; warnings are errors in each worker.
- name: Test
run: python -W error -m unittest
run: python -W error -m pytest -W error -n auto -p no:cacheprovider

formatting:
name: formatting
Expand Down Expand Up @@ -235,8 +236,12 @@ jobs:
# the job summary first; the strict run decides the step.
- name: Validate project_validator with itself
run: |
project-validator --format markdown --exclude tests/fixtures . >> "$GITHUB_STEP_SUMMARY" || true
project-validator --strict --exclude tests/fixtures .
# The HTML report's script (views/assets) is JavaScript without a JavaScript toolchain of its own yet: it is
# left out until it has one, rather than hidden from the validator. build/ is what `pip install .` left
# (a copy of the package, that script included).
exclude=(--exclude tests/fixtures --exclude project_validator/views/assets --exclude build)
project-validator --format markdown "${exclude[@]}" . >> "$GITHUB_STEP_SUMMARY" || true
project-validator --strict "${exclude[@]}" .

# What a pull request changes in the support matrix (the rows a profile or a check adds), against main's.
- name: Show the support matrix changes
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/leaderboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ jobs:
path: ${{ runner.temp }}/results
merge-multiple: true

# The data branch holds only the results (an orphan branch, created on the first night). The token is used for
# this push alone, not kept in the checkout.
- name: Add the night to the leaderboard-data branch
# The data branch holds only the results, as one commit: each night replaces it, so that the projects' full
# HTML reports (the latest only) never grow its history; history/ keeps every night's numbers. The token is
# used for this push alone, not kept in the checkout.
- name: Record the night as the leaderboard-data branch
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
Expand All @@ -119,10 +120,11 @@ jobs:
fi
python -m leaderboard record "${RUNNER_TEMP}/results" "$data" --date "$(date -u +%F)"
cd "$data"
git checkout --quiet --orphan night
git add --all
git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
commit --quiet --allow-empty -m "Leaderboard for $(date -u +%F)"
git push --quiet "$remote" HEAD:leaderboard-data
git push --quiet --force "$remote" HEAD:leaderboard-data

publish:
name: publish the site
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/mutation-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
mutmut:
name: mutmut
runs-on: ubuntu-latest
timeout-minutes: 35
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -55,20 +55,22 @@ jobs:
git -C mutants add -A
# A budget below the job's timeout: a pull request that changes many functions still gets a report
# of the mutants checked so far, instead of a cancelled job and no report at all. The budget covers
# the whole run: the stats pass that maps tests to functions (the full suite, 8 to 14 minutes), the
# the whole run: the stats pass that maps tests to functions (the full suite, 15 to 20 minutes), the
# clean run of the tests covering the changed functions (up to the full suite again for a change to
# a central function), then the mutants at about two seconds each. A pull request that changes a few
# functions finishes well inside it; one that changes central ones gets the mutants of the fastest
# tests first.
budget_minutes=20
budget_minutes=30
status=0
timeout --signal=INT --kill-after=2m "${budget_minutes}m" mutmut run "${patterns[@]}" 2>&1 | tee run.log || status=$?
if grep -q 'Filtered for specific mutants, but nothing matches' run.log; then
# mutmut asserts when no pattern matches: the changed functions are ones it does not mutate.
echo "The changed functions have no mutants: nothing to mutate." >> "$GITHUB_STEP_SUMMARY"
exit 0
fi
[ "$status" -eq 0 ] || [ "$status" -eq 124 ] || exit "$status"
# 124 is the budget's end; 137 is the KILL two minutes after it, when mutmut ignored the INT (its stats pass
# does): both are the budget running out, reported below, not a failure.
[ "$status" -eq 0 ] || [ "$status" -eq 124 ] || [ "$status" -eq 137 ] || exit "$status"
# The results also list every mutant not run (the other functions'), which would fill the summary.
survivors=$(mktemp)
mutmut results | grep -v ': not checked$' > "$survivors" || true
Expand All @@ -78,7 +80,7 @@ jobs:
echo
echo 'Mutants of: `'"${patterns[*]}"'`'
echo
if [ "$status" -eq 124 ]; then
if [ "$status" -ne 0 ]; then
echo "Stopped after $budget_minutes minutes with $checked mutants checked: the results below cover those."
echo
fi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
.mypy_cache/
.ruff_cache/
.pytest_cache/

# Virtual environments
.venv/
Expand Down
Loading
Loading