Skip to content

Commit 5e7224a

Browse files
committed
Merge branch 'main' into text-overhaul
2 parents 4efa3c0 + 49fd492 commit 5e7224a

File tree

138 files changed

+1557
-444
lines changed

Some content is hidden

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

138 files changed

+1557
-444
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ commands:
103103
- run:
104104
name: Install Python dependencies
105105
command: |
106-
python -m pip install --user -r requirements/dev/build-requirements.txt
106+
python -m pip install --user --group build
107107
python -m pip install --user \
108108
numpy<< parameters.numpy_version >> \
109-
-r requirements/doc/doc-requirements.txt
109+
--group doc
110110
python -m pip install --no-deps --user \
111111
git+https://github.com/matplotlib/mpl-sphinx-theme.git
112112

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ updates:
99
actions:
1010
patterns:
1111
- "*"
12+
- package-ecosystem: "pip"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
exclude-paths:
17+
- "ci/minver-requirements.txt"

.github/labeler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
"CI: Run cibuildwheel":
33
- changed-files:
4-
- any-glob-to-any-file: ['.github/workflows/cibuildwheel.yml']
4+
- any-glob-to-any-file:
5+
- '.github/workflows/cibuildwheel.yml'
6+
- '.github/workflows/wasm.yml'
57
"CI: Run cygwin":
68
- changed-files:
79
- any-glob-to-any-file: ['.github/workflows/cygwin.yml']
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: autoclose comment
3+
# Post comment on PRs when labeled with "status: autoclose candidate".
4+
# Based on scikit-learn's autoclose bot at
5+
# https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/autoclose-comment.yml
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
on:
12+
pull_request_target:
13+
types:
14+
- labeled
15+
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
20+
21+
jobs:
22+
post_comment:
23+
name: post_comment
24+
if: "${{ contains(github.event.label.name, 'status: autoclose candidate') }}"
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
29+
- name: comment on potential autoclose
30+
run: |
31+
gh api \
32+
--method POST \
33+
-H "Accept: application/vnd.github+json" \
34+
-H "X-GitHub-Api-Version: 2022-11-28" \
35+
/repos/$GH_REPO/issues/$PULL_REQUEST_NUMBER/comments \
36+
-f "body=$BODY"
37+
env:
38+
BODY: >
39+
⏰ This pull request might be automatically closed in two weeks from now.
40+
41+
42+
Thank you for your contribution to Matplotlib and for the effort you
43+
have put into this PR. This pull request does not yet meet the
44+
quality and clarity standards needed for an effective review.
45+
Project maintainers have limited time for code reviews, and our goal
46+
is to prioritize well-prepared contributions to keep Matplotlib
47+
maintainable.
48+
49+
50+
Matplotlib maintainers cannot provide one-to-one guidance on this PR.
51+
However, if you ask focused, well-researched questions, a community
52+
member may be willing to help. 💬
53+
54+
55+
To increase the chance of a productive review:
56+
57+
- Use [the template provided in the PR
58+
description](https://github.com/matplotlib/matplotlib/blob/main/.github/PULL_REQUEST_TEMPLATE.md)
59+
and fill it out as completely as possible, especially the summary and AI Disclosure sections.
60+
61+
- Make sure your PR conforms to our [PR
62+
checklist](https://matplotlib.org/devdocs/devel/pr_guide.html#summary-for-pull-request-authors).
63+
64+
65+
As the author, you are responsible for driving this PR, which entails doing
66+
necessary background research as well as presenting its context and your
67+
thought process. If you are a new contributor, or do not know how to
68+
fulfill these requirements, we recommend that you familiarize
69+
yourself with Matplotlib's
70+
[development conventions](https://matplotlib.org/devdocs/devel/index.html)
71+
or engage with the community via our [Discourse](https://discourse.matplotlib.org/)
72+
or one of our [meetings](https://scientific-python.org/calendars/)
73+
before submitting code.
74+
75+
76+
If you substantially improve this PR within two weeks, leave a comment
77+
and a team member may remove the `status: autoclose candidate` label and the
78+
PR stays open. Cosmetic changes or incomplete fixes will not be
79+
sufficient. Maintainers will assess improvements on their own
80+
schedule. Please do not ping (`@`) maintainers.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: autoclose schedule
3+
# Autoclose PRs labeled with "status: autoclose candidate" after 2 weeks.
4+
# Based on scikit-learn's implementation at
5+
# https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/autoclose-schedule.yml
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
on:
12+
schedule:
13+
- cron: '0 2 * * *' # runs daily at 02:00 UTC
14+
workflow_dispatch:
15+
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
19+
jobs:
20+
21+
autoclose:
22+
name: autoclose labeled PRs
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
27+
with:
28+
python-version: '3.13'
29+
- name: Install PyGithub
30+
run: pip install -Uq PyGithub
31+
32+
- name: Checkout repository
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
35+
- name: Close PRs labeled more than 14 days ago
36+
run: |
37+
python tools/autoclose_prs.py

.github/workflows/cibuildwheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140

141141
steps:
142142
- name: Download sdist
143-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
143+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
144144
with:
145145
name: cibw-sdist
146146
path: dist/

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
persist-credentials: false
3535

3636
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
37+
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
3838
with:
3939
languages: ${{ matrix.language }}
4040

@@ -45,4 +45,4 @@ jobs:
4545
pip install --user -v .
4646
4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
48+
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1

.github/workflows/cygwin.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,21 @@ jobs:
141141
# FreeType build fails with bash, succeeds with dash
142142

143143
- name: Cache pip
144-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
144+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
145145
with:
146146
path: C:\cygwin\home\runneradmin\.cache\pip
147-
key: Cygwin-py3.${{ matrix.python-minor-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
147+
key: Cygwin-py3.${{ matrix.python-minor-version }}-pip-${{ hashFiles('pyproject.toml') }}
148148
restore-keys: ${{ matrix.os }}-py3.${{ matrix.python-minor-version }}-pip-
149149

150150
- name: Cache ccache
151-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
151+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
152152
with:
153153
path: C:\cygwin\home\runneradmin\.ccache
154154
key: Cygwin-py3.${{ matrix.python-minor-version }}-ccache-${{ hashFiles('src/*') }}
155155
restore-keys: Cygwin-py3.${{ matrix.python-minor-version }}-ccache-
156156

157157
- name: Cache Matplotlib
158-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
158+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
159159
with:
160160
path: |
161161
C:\cygwin\home\runneradmin\.cache\matplotlib
@@ -175,15 +175,9 @@ jobs:
175175
- name: Install Python dependencies
176176
shell: bash.exe -eo pipefail -o igncr "{0}"
177177
run: |
178-
python -m pip install --upgrade pip setuptools wheel
179-
python -m pip install kiwisolver 'numpy>=1.22,<1.26' pillow importlib_resources
180-
grep -v -F -e psutil requirements/testing/all.txt >requirements_test.txt
181-
python -m pip install meson-python pybind11
178+
python -m pip install --group build 'numpy>=1.25,<1.26'
182179
export PATH="/usr/local/bin:$PATH"
183-
python -m pip install --no-build-isolation 'contourpy>=1.0.1'
184-
python -m pip install --upgrade cycler fonttools \
185-
packaging pyparsing python-dateutil 'setuptools-scm<10' \
186-
-r requirements_test.txt sphinx ipython
180+
python -m pip install --upgrade --group test sphinx ipython
187181
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
188182
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
189183
echo 'PyGObject is available' ||

.github/workflows/linting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1919
with:
2020
python-version: "3.x"
21-
- uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1.1.1
21+
- uses: j178/prek-action@79f765515bd648eb4d6bb1b17277b7cb22cb6468 # v2.0.0
2222
with:
2323
extra_args: --hook-stage manual --all-files
2424

@@ -69,7 +69,7 @@ jobs:
6969
python-version: '3.11'
7070

7171
- name: Install mypy
72-
run: pip3 install -r requirements/testing/mypy.txt -r requirements/testing/all.txt
72+
run: pip3 install --group build --group typing
7373

7474
- name: Set up reviewdog
7575
uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1.5.0

.github/workflows/nightlies.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,28 @@ jobs:
3232
run: |
3333
PROJECT_REPO="matplotlib/matplotlib"
3434
BRANCH="main"
35-
WORKFLOW_NAME="cibuildwheel.yml"
3635
ARTIFACT_PATTERN="cibw-wheels-*"
3736
38-
gh run --repo "${PROJECT_REPO}" \
39-
list --branch "${BRANCH}" \
40-
--workflow "${WORKFLOW_NAME}" \
41-
--json event,status,conclusion,databaseId > runs.json
42-
RUN_ID=$(
43-
jq --compact-output \
44-
'[
45-
.[] |
46-
# Filter on "push" events to main (merged PRs) ...
47-
select(.event == "push") |
48-
# that have completed successfully ...
49-
select(.status == "completed" and .conclusion == "success")
50-
] |
51-
# and get ID of latest build of wheels.
52-
sort_by(.databaseId) | reverse | .[0].databaseId' runs.json
53-
)
54-
gh run --repo "${PROJECT_REPO}" view "${RUN_ID}"
55-
gh run --repo "${PROJECT_REPO}" \
56-
download "${RUN_ID}" --pattern "${ARTIFACT_PATTERN}"
37+
for WORKFLOW_NAME in cibuildwheel.yml wasm.yml; do
38+
gh run --repo "${PROJECT_REPO}" \
39+
list --branch "${BRANCH}" \
40+
--workflow "${WORKFLOW_NAME}" \
41+
--json event,status,conclusion,databaseId > runs.json
42+
RUN_ID=$(
43+
jq --compact-output \
44+
'[
45+
.[] |
46+
# Filter on "push" events to main (merged PRs) ...
47+
select(.event == "push") |
48+
# that have completed successfully ...
49+
select(.status == "completed" and .conclusion == "success")
50+
] |
51+
# and get ID of latest build of wheels.
52+
sort_by(.databaseId) | reverse | .[0].databaseId' runs.json
53+
)
54+
gh run --repo "${PROJECT_REPO}" view "${RUN_ID}"
55+
gh run --repo "${PROJECT_REPO}" download "${RUN_ID}" --pattern "${ARTIFACT_PATTERN}"
56+
done
5757
5858
mkdir dist
5959
mv ${ARTIFACT_PATTERN}/*.whl dist/

0 commit comments

Comments
 (0)