Skip to content

Commit 7a6af81

Browse files
authored
Merge branch 'main' into fix/333-naturaldelta-inf
2 parents 8c5d6a5 + 08cf2c3 commit 7a6af81

19 files changed

Lines changed: 466 additions & 42 deletions

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
benchmarks:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1616
with:
1717
persist-credentials: false
1818

1919
- name: Set up Python 3.14
20-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
20+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2121
with:
2222
python-version: "3.14"
2323
allow-prereleases: true
@@ -34,7 +34,7 @@ jobs:
3434
run: pip install -e ".[tests]"
3535

3636
- name: Run benchmarks
37-
uses: CodSpeedHQ/action@3194d9a39c4d46684cb44bf7207fc56626aad8fd # v4.15.1
37+
uses: CodSpeedHQ/action@f99becdce5e5d51fd556489ebef684f4ecfd6286 # v4.18.5
3838
with:
3939
mode: simulation
4040
run: pytest tests/test_benchmarks.py --codspeed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1616
with:
1717
persist-credentials: false
1818

1919
- name: Set up Python
20-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
20+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2121
with:
2222
python-version: "3.x"
2323

2424
- name: Install uv
25-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
25+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
2626

2727
- name: Docs
2828
run: |

.github/workflows/labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
pull-requests: write
1515
runs-on: ubuntu-slim
1616
steps:
17-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1818
with:
1919
persist-credentials: false
2020
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1717
with:
1818
persist-credentials: false
19-
- uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4
19+
- uses: j178/prek-action@5337cb91e0fa35a7ff31b9ca345126d8bbbcdf16 # v2.0.6
2020

2121
mypy:
2222
runs-on: ubuntu-latest
2323

2424
steps:
25-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2626
with:
2727
persist-credentials: false
28-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
28+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2929
with:
3030
python-version: "3.x"
3131
- name: Install uv
32-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
32+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
3333
- name: Mypy
3434
run: uvx --with tox-uv tox -e mypy
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Run gh-profiler against the author of each new issue.
2+
# Delete the profile output when the issue is closed.
3+
# PR authors are profiled by the unprivileged profile-pr-authors.yml instead,
4+
# so no dangerous trigger is needed for PRs from forks.
5+
6+
name: Profile issue authors
7+
8+
on:
9+
issues:
10+
types: [opened, reopened, closed]
11+
12+
jobs:
13+
profile-author:
14+
if: github.event.action != 'closed'
15+
16+
permissions:
17+
issues: write
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
23+
with:
24+
enable-cache: false
25+
ignore-empty-workdir: true
26+
27+
- name: Run gh-profiler (=== Expand this to see full profile output ===)
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
LOGIN: ${{ github.event.issue.user.login }}
31+
run: |
32+
uvx gh-profiler@latest "$LOGIN" --concise > profiler.txt
33+
echo
34+
echo "======================== Full profile ========================="
35+
echo
36+
uvx gh-profiler@latest "$LOGIN"
37+
echo
38+
echo "==============================================================="
39+
40+
- name: Comment on issue
41+
env:
42+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
SERVER_URL: ${{ github.server_url }}
44+
REPOSITORY: ${{ github.repository }}
45+
RUN_ID: ${{ github.run_id }}
46+
CHECK_RUN_ID: ${{ job.check_run_id }}
47+
NUMBER: ${{ github.event.issue.number }}
48+
run: |
49+
{
50+
echo "<!-- gh-profiler:profile-link run-id=$RUN_ID -->"
51+
echo "Profile summary:"
52+
echo
53+
echo '```text'
54+
cat profiler.txt
55+
echo '```'
56+
echo
57+
echo "<a href=\"$SERVER_URL/$REPOSITORY/actions/runs/$RUN_ID/job/$CHECK_RUN_ID\">Full profile</a>"
58+
echo
59+
echo "(This comment and the linked profile output will auto-delete when this issue is closed.)"
60+
} > body.txt
61+
62+
jq -Rs '{body: .}' body.txt > payload.json
63+
64+
gh api \
65+
"repos/$REPOSITORY/issues/$NUMBER/comments" \
66+
--input payload.json
67+
68+
delete-profile:
69+
if: github.event.action == 'closed'
70+
71+
permissions:
72+
actions: write
73+
issues: write
74+
75+
runs-on: ubuntu-latest
76+
77+
steps:
78+
- name: Delete profile comment
79+
env:
80+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
REPOSITORY: ${{ github.repository }}
82+
NUMBER: ${{ github.event.issue.number }}
83+
run: |
84+
gh api --paginate \
85+
"repos/$REPOSITORY/issues/$NUMBER/comments" \
86+
--jq '
87+
.[]
88+
| select(.user.login == "github-actions[bot]")
89+
| select(.body | startswith("<!-- gh-profiler:profile-link run-id="))
90+
| [.id, (.body | capture("gh-profiler:profile-link run-id=(?<id>[0-9]+)").id)]
91+
| @tsv
92+
' |
93+
while IFS=$'\t' read -r comment_id run_id; do
94+
echo "Deleting logs from workflow run $run_id."
95+
gh api --method DELETE \
96+
"repos/$REPOSITORY/actions/runs/$run_id/logs"
97+
98+
echo "Deleting profile comment $comment_id."
99+
gh api --method DELETE \
100+
"repos/$REPOSITORY/issues/comments/$comment_id"
101+
done
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Run gh-profiler against the author of each new PR and show the output in
2+
# the job log and step summary, reachable via the PR's checks.
3+
#
4+
# This runs unprivileged (read-only token, safe for PRs from forks), so it
5+
# cannot post a comment like profile-issue-authors.yml does for issues.
6+
# There is also nothing to delete when the PR is closed: the output expires
7+
# with the run logs.
8+
9+
name: Profile PR authors
10+
11+
on:
12+
pull_request:
13+
types: [opened, reopened]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
profile-author:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
24+
with:
25+
enable-cache: false
26+
ignore-empty-workdir: true
27+
28+
- name: Run gh-profiler (=== Expand this to see full profile output ===)
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
LOGIN: ${{ github.event.pull_request.user.login }}
32+
run: |
33+
uvx gh-profiler@latest "$LOGIN" > profiler.txt
34+
cat profiler.txt
35+
{
36+
echo '```text'
37+
cat profiler.txt
38+
echo '```'
39+
} >> "$GITHUB_STEP_SUMMARY"

.github/workflows/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-slim
2626
steps:
2727
# Drafts your next release notes as pull requests are merged into "main"
28-
- uses: release-drafter/release-drafter@693d20e7c1ce1a81d3a41962f85914253b518449 # v7.3.1
28+
- uses: release-drafter/release-drafter@eada3c96a64734dd381cfbda23511034e328ddb0 # v7.6.0
2929

3030
autolabeler:
3131
if: |
@@ -36,4 +36,4 @@ jobs:
3636
pull-requests: write
3737
runs-on: ubuntu-slim
3838
steps:
39-
- uses: release-drafter/release-drafter/autolabeler@693d20e7c1ce1a81d3a41962f85914253b518449 # v7.3.1
39+
- uses: release-drafter/release-drafter/autolabeler@eada3c96a64734dd381cfbda23511034e328ddb0 # v7.6.0

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424

2525
steps:
26-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2727
with:
2828
fetch-depth: 0
2929
persist-credentials: false
@@ -36,7 +36,7 @@ jobs:
3636
run: |
3737
scripts/generate-translation-binaries.sh
3838
39-
- uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0
39+
- uses: hynek/build-and-inspect-python-package@2abe76da66d0a6a4a227101f9348ee855797cfa5 # v3.0.1
4040

4141
# Upload to Test PyPI on every commit on main.
4242
release-test-pypi:
@@ -59,7 +59,7 @@ jobs:
5959
path: dist
6060

6161
- name: Upload package to Test PyPI
62-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
62+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
6363
with:
6464
repository-url: https://test.pypi.org/legacy/
6565

@@ -83,4 +83,4 @@ jobs:
8383
path: dist
8484

8585
- name: Upload package to PyPI
86-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
86+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2

.github/workflows/require-pr-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write
1414

1515
steps:
16-
- uses: mheap/github-action-required-labels@0ac283b4e65c1fb28ce6079dea5546ceca98ccbe # v5.5.2
16+
- uses: mheap/github-action-required-labels@23e10fde7e062233401931a0eece796cd9bf3177 # v5.6.0
1717
with:
1818
mode: minimum
1919
count: 1

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
os: [windows-latest, macos-latest, ubuntu-latest]
2828

2929
steps:
30-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3131
with:
3232
persist-credentials: false
3333

3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
35+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838
allow-prereleases: true
@@ -53,7 +53,7 @@ jobs:
5353
brew install gettext
5454
5555
- name: Install uv
56-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
56+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
5757

5858
- name: Generate translation binaries
5959
run: |
@@ -64,7 +64,7 @@ jobs:
6464
uvx --python ${{ matrix.python-version }} --with tox-uv tox -e py
6565
6666
- name: Upload coverage
67-
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
67+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
6868
with:
6969
flags: ${{ matrix.os }}
7070
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)