Skip to content

Commit 3205f85

Browse files
authored
Merge branch 'main' into ttconv_pybind11_pr
2 parents c38348b + e240080 commit 3205f85

File tree

957 files changed

+7977
-5981
lines changed

Some content is hidden

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

957 files changed

+7977
-5981
lines changed

.appveyor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ branches:
99
- /auto-backport-.*/
1010
- /^v\d+\.\d+\.[\dx]+-doc$/
1111

12+
skip_commits:
13+
message: /\[ci doc\]/
14+
files:
15+
- doc/
16+
- galleries/
17+
1218
clone_depth: 50
1319

1420
image: Visual Studio 2017

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ commands:
9797
- run:
9898
name: Install Python dependencies
9999
command: |
100-
python -m pip install --no-deps --user \
101-
git+https://github.com/matplotlib/mpl-sphinx-theme.git
102100
python -m pip install --user \
103101
numpy<< parameters.numpy_version >> codecov coverage \
104102
-r requirements/doc/doc-requirements.txt
103+
python -m pip install --no-deps --user \
104+
git+https://github.com/matplotlib/mpl-sphinx-theme.git
105105
106106
mpl-install:
107107
steps:

.circleci/fetch_doc_logs.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from pathlib import Path
2323
import sys
2424
from urllib.parse import urlparse
25-
from urllib.request import urlopen
25+
from urllib.request import URLError, urlopen
2626

2727

2828
if len(sys.argv) != 2:
@@ -38,8 +38,11 @@
3838
f'{organization}/{repository}/{build_id}/artifacts'
3939
)
4040
print(artifact_url)
41-
with urlopen(artifact_url) as response:
42-
artifacts = json.load(response)
41+
try:
42+
with urlopen(artifact_url) as response:
43+
artifacts = json.load(response)
44+
except URLError:
45+
artifacts = {'items': []}
4346
artifact_count = len(artifacts['items'])
4447
print(f'Found {artifact_count} artifacts')
4548

.flake8

Lines changed: 45 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,23 @@
22
max-line-length = 88
33
select =
44
# flake8 default
5-
C90, E, F, W,
6-
# docstring-convention=numpy
7-
D100, D101, D102, D103, D104, D105, D106,
8-
D200, D201, D202, D204, D205, D206, D207, D208,
9-
D209, D210, D211, D214, D215,
10-
D300, D301, D302,
11-
D400, D401, D403, D404, D405, D406, D407, D408,
12-
D409, D410, D411, D412, D414,
13-
# matplotlib-specific extra pydocstyle errors
14-
D213,
5+
D, E, F, W,
156
ignore =
167
# flake8 default
178
E121,E123,E126,E226,E24,E704,W503,W504,
189
# Additional ignores:
1910
E127, E131,
2011
E266,
2112
E305, E306,
22-
E722, E741,
13+
E741,
2314
F841,
24-
# Some new flake8 ignores:
25-
N801, N802, N803, N806, N812,
2615
# pydocstyle
27-
D100, D101, D102, D103, D104, D105, D106, D107,
28-
D200, D202, D203, D204, D205, D207, D212,
16+
D100, D101, D102, D103, D104, D105, D106,
17+
D200, D202, D204, D205,
2918
D301,
30-
D400, D401, D402, D403, D404, D413,
19+
D400, D401, D403, D404
20+
# ignored by pydocstyle numpy docstring convention
21+
D107, D203, D212, D213, D402, D413, D415, D416, D417,
3122

3223
exclude =
3324
.git
@@ -42,7 +33,6 @@ exclude =
4233
per-file-ignores =
4334
setup.py: E402
4435

45-
4636
lib/matplotlib/__init__.py: E402, F401
4737
lib/matplotlib/_animation_data.py: E501
4838
lib/matplotlib/_api/__init__.py: F401
@@ -65,47 +55,43 @@ per-file-ignores =
6555
lib/pylab.py: F401, F403
6656

6757
doc/conf.py: E402
68-
tutorials/advanced/path_tutorial.py: E402
69-
tutorials/advanced/patheffects_guide.py: E402
70-
tutorials/advanced/transforms_tutorial.py: E402, E501
71-
tutorials/colors/colormaps.py: E501
72-
tutorials/colors/colors.py: E402
73-
tutorials/intermediate/artists.py: E402
74-
tutorials/intermediate/constrainedlayout_guide.py: E402
75-
tutorials/intermediate/legend_guide.py: E402
76-
tutorials/intermediate/tight_layout_guide.py: E402
77-
tutorials/introductory/animation_tutorial.py: E501
78-
tutorials/introductory/images.py: E501
79-
tutorials/introductory/pyplot.py: E402, E501
80-
tutorials/text/annotations.py: E402, E501
81-
tutorials/text/mathtext.py: E501
82-
tutorials/text/text_intro.py: E402
83-
tutorials/text/text_props.py: E501
84-
tutorials/text/usetex.py: E501
85-
tutorials/toolkits/axes_grid.py: E501
86-
tutorials/toolkits/axisartist.py: E501
58+
galleries/users_explain/artists/paths.py: E402
59+
galleries/users_explain/artists/patheffects_guide.py: E402
60+
galleries/users_explain/artists/transforms_tutorial.py: E402, E501
61+
galleries/users_explain/colors/colormaps.py: E501
62+
galleries/users_explain/colors/colors.py: E402
63+
galleries/tutorials/artists.py: E402
64+
galleries/users_explain/axes/constrainedlayout_guide.py: E402
65+
galleries/users_explain/axes/legend_guide.py: E402
66+
galleries/users_explain/axes/tight_layout_guide.py: E402
67+
galleries/users_explain/animations/animations.py: E501
68+
galleries/tutorials/images.py: E501
69+
galleries/tutorials/pyplot.py: E402, E501
70+
galleries/users_explain/text/annotations.py: E402, E501
71+
galleries/users_explain/text/mathtext.py: E501
72+
galleries/users_explain/text/text_intro.py: E402
73+
galleries/users_explain/text/text_props.py: E501
8774

88-
examples/animation/frame_grabbing_sgskip.py: E402
89-
examples/images_contours_and_fields/tricontour_demo.py: E201
90-
examples/images_contours_and_fields/tripcolor_demo.py: E201
91-
examples/images_contours_and_fields/triplot_demo.py: E201
92-
examples/lines_bars_and_markers/marker_reference.py: E402
93-
examples/misc/print_stdout_sgskip.py: E402
94-
examples/misc/table_demo.py: E201
95-
examples/style_sheets/bmh.py: E501
96-
examples/style_sheets/plot_solarizedlight2.py: E501
97-
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
98-
examples/text_labels_and_annotations/custom_legends.py: E402
99-
examples/ticks/date_concise_formatter.py: E402
100-
examples/ticks/date_formatters_locators.py: F401
101-
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
102-
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
103-
examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402
104-
examples/user_interfaces/embedding_in_gtk4_sgskip.py: E402
105-
examples/user_interfaces/gtk3_spreadsheet_sgskip.py: E402
106-
examples/user_interfaces/gtk4_spreadsheet_sgskip.py: E402
107-
examples/user_interfaces/mpl_with_glade3_sgskip.py: E402
108-
examples/user_interfaces/pylab_with_gtk3_sgskip.py: E402
109-
examples/user_interfaces/pylab_with_gtk4_sgskip.py: E402
110-
examples/userdemo/pgf_preamble_sgskip.py: E402
75+
galleries/examples/animation/frame_grabbing_sgskip.py: E402
76+
galleries/examples/images_contours_and_fields/tricontour_demo.py: E201
77+
galleries/examples/images_contours_and_fields/tripcolor_demo.py: E201
78+
galleries/examples/images_contours_and_fields/triplot_demo.py: E201
79+
galleries/examples/lines_bars_and_markers/marker_reference.py: E402
80+
galleries/examples/misc/print_stdout_sgskip.py: E402
81+
galleries/examples/misc/table_demo.py: E201
82+
galleries/examples/style_sheets/bmh.py: E501
83+
galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
84+
galleries/examples/text_labels_and_annotations/custom_legends.py: E402
85+
galleries/examples/ticks/date_concise_formatter.py: E402
86+
galleries/examples/ticks/date_formatters_locators.py: F401
87+
galleries/examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
88+
galleries/examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
89+
galleries/examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402
90+
galleries/examples/user_interfaces/embedding_in_gtk4_sgskip.py: E402
91+
galleries/examples/user_interfaces/gtk3_spreadsheet_sgskip.py: E402
92+
galleries/examples/user_interfaces/gtk4_spreadsheet_sgskip.py: E402
93+
galleries/examples/user_interfaces/mpl_with_glade3_sgskip.py: E402
94+
galleries/examples/user_interfaces/pylab_with_gtk3_sgskip.py: E402
95+
galleries/examples/user_interfaces/pylab_with_gtk4_sgskip.py: E402
96+
galleries/examples/userdemo/pgf_preamble_sgskip.py: E402
11197
force-check = True

.github/workflows/cibuildwheel.yml

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,29 @@ jobs:
3535
name: Build wheels on ${{ matrix.os }}
3636
runs-on: ${{ matrix.os }}
3737
env:
38-
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
39-
MACOSX_DEPLOYMENT_TARGET: "10.12"
38+
CIBW_BEFORE_BUILD: >-
39+
pip install certifi oldest-supported-numpy &&
40+
git clean -fxd build
4041
CIBW_BEFORE_BUILD_WINDOWS: >-
4142
pip install certifi delvewheel oldest-supported-numpy &&
4243
git clean -fxd build
4344
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
4445
delvewheel repair -w {dest_dir} {wheel}
46+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
47+
CIBW_SKIP: "*-musllinux*"
48+
MACOSX_DEPLOYMENT_TARGET: "10.12"
49+
MPL_DISABLE_FH4: "yes"
4550
strategy:
4651
matrix:
47-
os: [ubuntu-20.04, windows-latest, macos-11]
48-
cibw_archs: ["auto"]
4952
include:
53+
- os: ubuntu-20.04
54+
cibw_archs: "x86_64"
5055
- os: ubuntu-20.04
5156
cibw_archs: "aarch64"
57+
- os: windows-latest
58+
cibw_archs: "auto"
59+
- os: macos-11
60+
cibw_archs: "x86_64 universal2 arm64"
5261

5362
steps:
5463
- name: Set up QEMU
@@ -61,53 +70,36 @@ jobs:
6170
with:
6271
fetch-depth: 0
6372

73+
# Something changed somewhere that prevents the downloaded-at-build-time
74+
# licenses from being included in built wheels, so pre-download them so
75+
# that they exist before the build and are included.
76+
- name: Pre-download bundled licenses
77+
run: >
78+
curl -Lo LICENSE/LICENSE_QHULL
79+
https://github.com/qhull/qhull/raw/2020.2/COPYING.txt
80+
6481
- name: Build wheels for CPython 3.11
65-
uses: pypa/[email protected].0
82+
uses: pypa/[email protected].1
6683
env:
6784
CIBW_BUILD: "cp311-*"
68-
CIBW_SKIP: "*-musllinux*"
69-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
70-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
71-
CIBW_BEFORE_BUILD: >-
72-
pip install certifi oldest-supported-numpy &&
73-
git clean -fxd build
74-
MPL_DISABLE_FH4: "yes"
7585
CIBW_ARCHS: ${{ matrix.cibw_archs }}
7686

7787
- name: Build wheels for CPython 3.10
78-
uses: pypa/[email protected].0
88+
uses: pypa/[email protected].1
7989
env:
8090
CIBW_BUILD: "cp310-*"
81-
CIBW_SKIP: "*-musllinux*"
82-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
83-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
84-
CIBW_BEFORE_BUILD: >-
85-
pip install certifi oldest-supported-numpy &&
86-
git clean -fxd build
87-
MPL_DISABLE_FH4: "yes"
8891
CIBW_ARCHS: ${{ matrix.cibw_archs }}
8992

9093
- name: Build wheels for CPython 3.9
91-
uses: pypa/[email protected].0
94+
uses: pypa/[email protected].1
9295
env:
9396
CIBW_BUILD: "cp39-*"
94-
CIBW_SKIP: "*-musllinux*"
95-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
96-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
97-
CIBW_BEFORE_BUILD: >-
98-
pip install certifi oldest-supported-numpy &&
99-
git clean -fxd build
100-
MPL_DISABLE_FH4: "yes"
10197
CIBW_ARCHS: ${{ matrix.cibw_archs }}
10298

10399
- name: Build wheels for PyPy
104-
uses: pypa/[email protected].0
100+
uses: pypa/[email protected].1
105101
env:
106102
CIBW_BUILD: "pp39-*"
107-
CIBW_SKIP: "*-musllinux*"
108-
CIBW_BEFORE_BUILD: >-
109-
pip install certifi oldest-supported-numpy &&
110-
git clean -fxd build
111103
CIBW_ARCHS: ${{ matrix.cibw_archs }}
112104
if: matrix.cibw_archs != 'aarch64'
113105

.github/workflows/stale.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Label inactive PRs'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
6+
jobs:
7+
stale:
8+
if: github.repository == 'matplotlib/matplotlib'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v8
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
operations-per-run: 150
15+
stale-pr-message: 'Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it.'
16+
stale-pr-label: 'inactive'
17+
days-before-pr-stale: 60
18+
days-before-pr-close: -1
19+
stale-issue-message: 'This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!'
20+
stale-issue-label: 'inactive'
21+
days-before-issue-stale: 365
22+
days-before-issue-close: 30
23+
ascending: true
24+
exempt-issue-labels: "keep"
25+
exempt-pr-labels: "keep,status: orphaned PR"

.github/workflows/tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ on:
1212
pull_request:
1313
branches-ignore:
1414
- v[0-9]+.[0-9]+.[0-9x]+-doc
15+
paths-ignore:
16+
# Skip running tests if changes are only in documentation directories
17+
- 'doc/**'
18+
- 'galleries/examples/**'
19+
- 'galleries/plot_types/**'
20+
- 'galleries/tutorials/**'
1521
schedule:
1622
# 5:47 UTC on Saturdays
1723
- cron: "47 5 * * 6"
@@ -230,9 +236,14 @@ jobs:
230236
231237
- name: Install the nightly dependencies
232238
# Only install the nightly dependencies during the scheduled event
233-
if: ${{ github.event_name == 'schedule' && matrix.name-suffix != '(Minimum Versions)' }}
239+
if: |
240+
github.event_name == 'schedule' &&
241+
matrix.name-suffix != '(Minimum Versions)'
234242
run: |
235-
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple --upgrade --only-binary=:all: numpy pandas
243+
python -m pip install pytz # Must be installed for Pandas.
244+
python -m pip install \
245+
--index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple \
246+
--upgrade --only-binary=:all: numpy pandas
236247
237248
- name: Install Matplotlib
238249
run: |

.gitignore

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Thumbs.db
5656

5757
# Things specific to this project #
5858
###################################
59-
tutorials/intermediate/CL01.png
60-
tutorials/intermediate/CL02.png
59+
galleries/tutorials/intermediate/CL01.png
60+
galleries/tutorials/intermediate/CL02.png
6161

6262
# Documentation generated files #
6363
#################################
@@ -71,15 +71,14 @@ doc/modules
7171
doc/plot_types
7272
doc/pyplots/tex_demo.png
7373
doc/tutorials
74+
doc/users/explain
7475
lib/dateutil
75-
examples/*/*.bmp
76-
examples/*/*.eps
77-
examples/*/*.pdf
78-
examples/*/*.png
79-
examples/*/*.svg
80-
examples/*/*.svgz
81-
examples/tests/*
82-
!examples/tests/backend_driver_sgskip.py
76+
galleries/examples/*/*.bmp
77+
galleries/examples/*/*.eps
78+
galleries/examples/*/*.pdf
79+
galleries/examples/*/*.png
80+
galleries/examples/*/*.svg
81+
galleries/examples/*/*.svgz
8382
result_images
8483
doc/_static/constrained_layout*.png
8584
doc/.mpl_skip_subdirs.yaml

.lgtm.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ repos:
4747
hooks:
4848
- id: isort
4949
name: isort (python)
50-
files: ^tutorials/|^examples/
50+
files: ^galleries/tutorials/|^galleries/examples/|^galleries/plot_types/

0 commit comments

Comments
 (0)