Skip to content

Commit 31b1fd6

Browse files
Merge branch 'main' into patch-1
2 parents e9be020 + 117be95 commit 31b1fd6

File tree

342 files changed

+3660
-1249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+3660
-1249
lines changed

.github/workflows/changelog.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
timeout-minutes: 10
2222
steps:
2323
- name: Check out code from GitHub
24-
uses: actions/[email protected].0
24+
uses: actions/[email protected].5
2525
with:
2626
# `towncrier check` runs `git diff --name-only origin/main...`, which
2727
# needs a non-shallow clone.
2828
fetch-depth: 0
2929
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3030
id: python
31-
uses: actions/setup-python@v4.7.1
31+
uses: actions/setup-python@v5.1.0
3232
with:
3333
python-version: ${{ env.DEFAULT_PYTHON }}
3434
check-latest: true
@@ -41,7 +41,7 @@ jobs:
4141
$GITHUB_OUTPUT
4242
- name: Restore Python virtual environment
4343
id: cache-venv
44-
uses: actions/cache@v3.3.2
44+
uses: actions/cache@v4.0.2
4545
with:
4646
path: venv
4747
key: >-

.github/workflows/checks.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
3434
steps:
3535
- name: Check out code from GitHub
36-
uses: actions/[email protected].0
36+
uses: actions/[email protected].5
3737
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3838
id: python
39-
uses: actions/setup-python@v4.7.1
39+
uses: actions/setup-python@v5.1.0
4040
with:
4141
python-version: ${{ env.DEFAULT_PYTHON }}
4242
check-latest: true
@@ -49,7 +49,7 @@ jobs:
4949
$GITHUB_OUTPUT
5050
- name: Restore Python virtual environment
5151
id: cache-venv
52-
uses: actions/cache@v3.3.2
52+
uses: actions/cache@v4.0.2
5353
with:
5454
path: venv
5555
key: >-
@@ -71,7 +71,7 @@ jobs:
7171
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
7272
- name: Restore pre-commit environment
7373
id: cache-precommit
74-
uses: actions/cache@v3.3.2
74+
uses: actions/cache@v4.0.2
7575
with:
7676
path: ${{ env.PRE_COMMIT_CACHE }}
7777
key: >-
@@ -89,16 +89,16 @@ jobs:
8989
needs: prepare-base
9090
steps:
9191
- name: Check out code from GitHub
92-
uses: actions/[email protected].0
92+
uses: actions/[email protected].5
9393
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
9494
id: python
95-
uses: actions/setup-python@v4.7.1
95+
uses: actions/setup-python@v5.1.0
9696
with:
9797
python-version: ${{ env.DEFAULT_PYTHON }}
9898
check-latest: true
9999
- name: Restore Python virtual environment
100100
id: cache-venv
101-
uses: actions/cache@v3.3.2
101+
uses: actions/cache@v4.0.2
102102
with:
103103
path: venv
104104
fail-on-cache-miss: true
@@ -107,7 +107,7 @@ jobs:
107107
needs.prepare-base.outputs.python-key }}
108108
- name: Restore pre-commit environment
109109
id: cache-precommit
110-
uses: actions/cache@v3.3.2
110+
uses: actions/cache@v4.0.2
111111
with:
112112
path: ${{ env.PRE_COMMIT_CACHE }}
113113
fail-on-cache-miss: true
@@ -130,16 +130,16 @@ jobs:
130130
needs: prepare-base
131131
steps:
132132
- name: Check out code from GitHub
133-
uses: actions/[email protected].0
133+
uses: actions/[email protected].5
134134
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
135135
id: python
136-
uses: actions/setup-python@v4.7.1
136+
uses: actions/setup-python@v5.1.0
137137
with:
138138
python-version: ${{ env.DEFAULT_PYTHON }}
139139
check-latest: true
140140
- name: Restore Python virtual environment
141141
id: cache-venv
142-
uses: actions/cache@v3.3.2
142+
uses: actions/cache@v4.0.2
143143
with:
144144
path: venv
145145
fail-on-cache-miss: true
@@ -158,16 +158,16 @@ jobs:
158158
needs: prepare-base
159159
steps:
160160
- name: Check out code from GitHub
161-
uses: actions/[email protected].0
161+
uses: actions/[email protected].5
162162
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
163163
id: python
164-
uses: actions/setup-python@v4.7.1
164+
uses: actions/setup-python@v5.1.0
165165
with:
166166
python-version: ${{ env.DEFAULT_PYTHON }}
167167
check-latest: true
168168
- name: Restore Python virtual environment
169169
id: cache-venv
170-
uses: actions/cache@v3.3.2
170+
uses: actions/cache@v4.0.2
171171
with:
172172
path: venv
173173
fail-on-cache-miss: true
@@ -183,7 +183,9 @@ jobs:
183183
. venv/bin/activate
184184
cd doc
185185
pre-commit run --hook-stage push sphinx-generated-doc --all-files || {
186+
echo "git diff:" ; \
186187
git diff ; \
187-
echo "Make sure that there are no modifications locally when launching 'make html'" ; \
188+
echo "End of 'git diff'" ; \
189+
echo "Make sure that 'make html' succeed without any modifications locally." ; \
188190
exit 1; \
189191
}

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848

4949
steps:
5050
- name: Checkout repository
51-
uses: actions/[email protected].0
51+
uses: actions/[email protected].5
5252

5353
# Initializes the CodeQL tools for scanning.
5454
- name: Initialize CodeQL
55-
uses: github/codeql-action/init@v2
55+
uses: github/codeql-action/init@v3
5656
with:
5757
languages: ${{ matrix.language }}
5858
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -63,7 +63,7 @@ jobs:
6363
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6464
# If this step fails, then you should remove it and run the build manually (see below)
6565
- name: Autobuild
66-
uses: github/codeql-action/autobuild@v2
66+
uses: github/codeql-action/autobuild@v3
6767

6868
# ℹ️ Command-line programs to run using the OS shell.
6969
# 📚 https://git.io/JvXDl
@@ -77,4 +77,4 @@ jobs:
7777
# make release
7878

7979
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v2
80+
uses: github/codeql-action/analyze@v3

.github/workflows/primer-test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
python-key: ${{ steps.generate-python-key.outputs.key }}
3636
steps:
3737
- name: Check out code from GitHub
38-
uses: actions/[email protected].0
38+
uses: actions/[email protected].5
3939
- name: Set up Python ${{ matrix.python-version }}
4040
id: python
41-
uses: actions/setup-python@v4.7.1
41+
uses: actions/setup-python@v5.1.0
4242
with:
4343
python-version: ${{ matrix.python-version }}
4444
check-latest: true
@@ -51,7 +51,7 @@ jobs:
5151
$GITHUB_OUTPUT
5252
- name: Restore Python virtual environment
5353
id: cache-venv
54-
uses: actions/cache@v3.3.2
54+
uses: actions/cache@v4.0.2
5555
with:
5656
path: venv
5757
key: >-
@@ -75,16 +75,16 @@ jobs:
7575
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
7676
steps:
7777
- name: Check out code from GitHub
78-
uses: actions/[email protected].0
78+
uses: actions/[email protected].5
7979
- name: Set up Python ${{ matrix.python-version }}
8080
id: python
81-
uses: actions/setup-python@v4.7.1
81+
uses: actions/setup-python@v5.1.0
8282
with:
8383
python-version: ${{ matrix.python-version }}
8484
check-latest: true
8585
- name: Restore Python virtual environment
8686
id: cache-venv
87-
uses: actions/cache@v3.3.2
87+
uses: actions/cache@v4.0.2
8888
with:
8989
path: venv
9090
fail-on-cache-miss: true

.github/workflows/primer_comment.yaml

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,28 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Check out code from GitHub
33-
uses: actions/[email protected].0
33+
uses: actions/[email protected].5
3434
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
3535
id: python
36-
uses: actions/setup-python@v4.7.1
36+
uses: actions/setup-python@v5.1.0
3737
with:
3838
python-version: ${{ env.DEFAULT_PYTHON }}
3939
check-latest: true
4040

4141
# Restore cached Python environment
4242
- name: Restore Python virtual environment
4343
id: cache-venv
44-
uses: actions/cache@v3.3.2
44+
uses: actions/cache@v4.0.2
4545
with:
4646
path: venv
47-
fail-on-cache-miss: true
4847
key:
4948
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
5049
env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml',
5150
'requirements_test.txt', 'requirements_test_min.txt',
5251
'requirements_test_pre_commit.txt') }}
5352

5453
- name: Download outputs
55-
uses: actions/github-script@v6.4.1
54+
uses: actions/github-script@v7.0.1
5655
with:
5756
script: |
5857
// Download workflow pylint output
@@ -63,52 +62,44 @@ jobs:
6362
run_id: ${{ github.event.workflow_run.id }},
6463
});
6564
66-
// Get 'main' output
67-
const [matchArtifactWorkflowMain] = artifacts_workflow.data.artifacts.filter((artifact) =>
68-
artifact.name == "primer_output_main");
69-
const downloadOne = await github.rest.actions.downloadArtifact({
70-
owner: context.repo.owner,
71-
repo: context.repo.repo,
72-
artifact_id: matchArtifactWorkflowMain.id,
73-
archive_format: "zip",
74-
});
75-
fs.writeFileSync("primer_main_output.zip", Buffer.from(downloadOne.data));
65+
// Get 'main' and 'PR' outputs and PR number
66+
const artifacts = artifacts_workflow.data.artifacts.filter((artifact) =>
67+
artifact.name.startsWith(`primer_output_main_${process.env.DEFAULT_PYTHON}`)
68+
|| artifact.name.startsWith(`primer_output_pr_${process.env.DEFAULT_PYTHON}`)
69+
|| artifact.name === 'pr_number'
70+
);
71+
for (const artifact of artifacts) {
72+
const downloaded = await github.rest.actions.downloadArtifact({
73+
owner: context.repo.owner,
74+
repo: context.repo.repo,
75+
artifact_id: artifact.id,
76+
archive_format: "zip",
77+
});
78+
fs.writeFileSync(`${artifact.name}.zip`, Buffer.from(downloaded.data));
79+
}
7680
77-
// Get PR output
78-
const [matchArtifactWorkflowPR] = artifacts_workflow.data.artifacts.filter((artifact) =>
79-
artifact.name == "primer_output_pr");
80-
const downloadTwo = await github.rest.actions.downloadArtifact({
81-
owner: context.repo.owner,
82-
repo: context.repo.repo,
83-
artifact_id: matchArtifactWorkflowPR.id,
84-
archive_format: "zip",
85-
});
86-
fs.writeFileSync("primer_pr_output.zip", Buffer.from(downloadTwo.data));
87-
88-
// Get PR number
89-
const [matchArtifactWorkflowNumber] = artifacts_workflow.data.artifacts.filter((artifact) =>
90-
artifact.name == "pr_number");
91-
const downloadThree = await github.rest.actions.downloadArtifact({
92-
owner: context.repo.owner,
93-
repo: context.repo.repo,
94-
artifact_id: matchArtifactWorkflowNumber.id,
95-
archive_format: "zip",
96-
});
97-
fs.writeFileSync("primer_pr_number.zip", Buffer.from(downloadThree.data));
98-
- run: unzip primer_main_output.zip
99-
- run: unzip primer_pr_output.zip
100-
- run: unzip primer_pr_number.zip
81+
- name: Unzip outputs
82+
run: |
83+
unzip primer_output_main_${{ env.DEFAULT_PYTHON }}_batch0.zip
84+
unzip primer_output_main_${{ env.DEFAULT_PYTHON }}_batch1.zip
85+
unzip primer_output_main_${{ env.DEFAULT_PYTHON }}_batch2.zip
86+
unzip primer_output_main_${{ env.DEFAULT_PYTHON }}_batch3.zip
87+
unzip primer_output_pr_${{ env.DEFAULT_PYTHON }}_batch0.zip
88+
unzip primer_output_pr_${{ env.DEFAULT_PYTHON }}_batch1.zip
89+
unzip primer_output_pr_${{ env.DEFAULT_PYTHON }}_batch2.zip
90+
unzip primer_output_pr_${{ env.DEFAULT_PYTHON }}_batch3.zip
91+
unzip pr_number.zip
10192
- name: Compare outputs
10293
run: |
10394
. venv/bin/activate
10495
python tests/primer/__main__.py compare \
10596
--commit=${{ github.event.workflow_run.head_sha }} \
106-
--base-file=output_${{ steps.python.outputs.python-version }}_main_BATCHIDX.txt \
107-
--new-file=output_${{ steps.python.outputs.python-version }}_pr_BATCHIDX.txt \
97+
--base-file=output_${{ env.DEFAULT_PYTHON }}_main_BATCHIDX.txt \
98+
--new-file=output_${{ env.DEFAULT_PYTHON }}_pr_BATCHIDX.txt \
10899
--batches=4
109100
- name: Post comment
110101
id: post-comment
111-
uses: actions/github-script@v6.4.1
102+
uses: actions/github-script@v7.0.1
112103
with:
113104
script: |
114105
const fs = require('fs')

.github/workflows/primer_run_main.yaml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ jobs:
3434
batchIdx: [0, 1, 2, 3]
3535
steps:
3636
- name: Check out code from GitHub
37-
uses: actions/[email protected].0
37+
uses: actions/[email protected].5
3838
- name: Set up Python ${{ matrix.python-version }}
3939
id: python
40-
uses: actions/setup-python@v4.7.1
40+
uses: actions/setup-python@v5.1.0
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343
check-latest: true
4444

4545
# Create a re-usable virtual environment
4646
- name: Create Python virtual environment cache
4747
id: cache-venv
48-
uses: actions/cache@v3.3.2
48+
uses: actions/cache@v4.0.2
4949
with:
5050
path: venv
5151
key:
@@ -71,7 +71,7 @@ jobs:
7171
echo "commitstring=$output" >> $GITHUB_OUTPUT
7272
- name: Restore projects cache
7373
id: cache-projects
74-
uses: actions/cache@v3.3.2
74+
uses: actions/cache@v4.0.2
7575
with:
7676
path: tests/.pylint_primer_tests/
7777
key: >-
@@ -82,10 +82,11 @@ jobs:
8282
run: |
8383
. venv/bin/activate
8484
python tests/primer/__main__.py prepare --clone
85-
- name: Upload output diff
86-
uses: actions/[email protected]
85+
- name: Upload commit string
86+
uses: actions/[email protected]
87+
if: matrix.batchIdx == 0
8788
with:
88-
name: primer_commitstring
89+
name: primer_commitstring_${{ matrix.python-version }}
8990
path:
9091
tests/.pylint_primer_tests/commit_string_${{ matrix.python-version }}.txt
9192

@@ -103,9 +104,10 @@ jobs:
103104
then echo "::warning ::$WARNINGS"
104105
fi
105106
- name: Upload output
106-
uses: actions/upload-artifact@v3.1.3
107+
uses: actions/upload-artifact@v4.3.3
107108
with:
108-
name: primer_output
109+
name:
110+
primer_output_main_${{ matrix.python-version }}_batch${{ matrix.batchIdx }}
109111
path: >-
110-
tests/.pylint_primer_tests/output_${{ steps.python.outputs.python-version
111-
}}_main_batch${{ matrix.batchIdx }}.txt
112+
tests/.pylint_primer_tests/output_${{ matrix.python-version }}_main_batch${{
113+
matrix.batchIdx }}.txt

0 commit comments

Comments
 (0)