Skip to content

Commit 0c2864d

Browse files
Merge branch 'main' into pan-zoom-3d
2 parents 9e50954 + ddd8fb8 commit 0c2864d

File tree

255 files changed

+6535
-2415
lines changed

Some content is hidden

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

255 files changed

+6535
-2415
lines changed

.circleci/config.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ commands:
5555
texlive-latex-recommended \
5656
texlive-pictures \
5757
texlive-xetex \
58+
ttf-wqy-zenhei \
5859
graphviz \
5960
fonts-crosextra-carlito \
6061
fonts-freefont-otf \
@@ -140,7 +141,7 @@ commands:
140141
[ "$CIRCLE_PR_NUMBER" = "" ]; then
141142
export RELEASE_TAG='-t release'
142143
fi
143-
make html O="-T $RELEASE_TAG"
144+
make html O="-T $RELEASE_TAG -j4"
144145
rm -r build/html/_sources
145146
working_directory: doc
146147
- save_cache:
@@ -166,6 +167,7 @@ jobs:
166167
docs-python38:
167168
docker:
168169
- image: cimg/python:3.8
170+
resource_class: large
169171
steps:
170172
- checkout
171173
- check-skip

.flake8

+1-19
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,21 @@ per-file-ignores =
4949
lib/matplotlib/_cm.py: E122, E202, E203, E302
5050
lib/matplotlib/_mathtext.py: E221, E251
5151
lib/matplotlib/_mathtext_data.py: E122, E203, E261
52-
lib/matplotlib/animation.py: F401
5352
lib/matplotlib/_animation_data.py: E501
5453
lib/matplotlib/axes/__init__.py: F401, F403
55-
lib/matplotlib/axes/_axes.py: F401
56-
lib/matplotlib/backends/backend_*.py: F401
54+
lib/matplotlib/backends/backend_template.py: F401
5755
lib/matplotlib/backends/qt_editor/formlayout.py: F401, F403
58-
lib/matplotlib/cbook/__init__.py: F401
59-
lib/matplotlib/cbook/deprecation.py: F401
6056
lib/matplotlib/font_manager.py: E501
6157
lib/matplotlib/image.py: F401, F403
62-
lib/matplotlib/lines.py: F401
6358
lib/matplotlib/mathtext.py: E221, E251
6459
lib/matplotlib/pylab.py: F401, F403
6560
lib/matplotlib/pyplot.py: F401, F811
66-
lib/matplotlib/style/__init__.py: F401
67-
lib/matplotlib/testing/conftest.py: F401
68-
lib/matplotlib/tests/conftest.py: F401
69-
lib/matplotlib/tests/test_backend_qt.py: F401
7061
lib/matplotlib/tests/test_mathtext.py: E501
71-
lib/matplotlib/text.py: F401
7262
lib/matplotlib/transforms.py: E201, E202, E203
73-
lib/matplotlib/tri/__init__.py: F401, F403
7463
lib/matplotlib/tri/triinterpolate.py: E201, E221
75-
lib/mpl_toolkits/axes_grid/*: F401, F403
76-
lib/mpl_toolkits/axes_grid1/__init__.py: F401
7764
lib/mpl_toolkits/axes_grid1/axes_size.py: E272
7865
lib/mpl_toolkits/axisartist/__init__.py: F401
7966
lib/mpl_toolkits/axisartist/angle_helper.py: E221
80-
lib/mpl_toolkits/axisartist/axes_divider.py: F401
81-
lib/mpl_toolkits/axisartist/axes_rgb.py: F401
82-
lib/mpl_toolkits/axisartist/axislines.py: F401
83-
lib/mpl_toolkits/mplot3d/__init__.py: F401
84-
lib/mpl_toolkits/tests/conftest.py: F401
8567
lib/pylab.py: F401, F403
8668

8769
doc/conf.py: E402

.git_archival.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true)$
14
ref-names: $Format:%D$

.github/workflows/cibuildsdist.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build CI sdist and wheel
2+
3+
on:
4+
# Save CI by only running this on release branches or tags.
5+
push:
6+
branches:
7+
- main
8+
- v[0-9]+.[0-9]+.x
9+
tags:
10+
- v*
11+
# Also allow running this action on PRs if requested by applying the
12+
# "Run cibuildwheel" label.
13+
pull_request:
14+
types:
15+
- opened
16+
- synchronize
17+
- reopened
18+
- labeled
19+
20+
jobs:
21+
build_sdist:
22+
if: |
23+
github.event_name == 'push' ||
24+
github.event_name == 'pull_request' && (
25+
(
26+
github.event.action == 'labeled' &&
27+
github.event.label.name == 'Run cibuildwheel'
28+
) ||
29+
contains(github.event.pull_request.labels.*.name, 'Run cibuildwheel')
30+
)
31+
name: Build sdist and wheel on ${{ matrix.os }}
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
matrix:
35+
os: [ubuntu-20.04]
36+
python-version: ['3.8', '3.9', '3.10', '3.11.0-alpha - 3.11']
37+
38+
steps:
39+
- uses: actions/checkout@v3
40+
with:
41+
fetch-depth: 0
42+
43+
- uses: actions/setup-python@v4
44+
name: Install Python
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
48+
- name: Install build
49+
run: pip install build
50+
51+
- name: Build sdist and wheel
52+
run: python -m build .
53+
54+
- name: Install built matplotlib sdist
55+
run: pip install dist/matplotlib*.tar.gz
56+
57+
- name: Check version number is not 0
58+
run: python ./ci/check_version_number.py
59+
60+
- name: Install built matplotlib wheel
61+
run: pip install dist/matplotlib*.whl --force-reinstall
62+
63+
- name: Check version number is not 0
64+
run: python ./ci/check_version_number.py

.github/workflows/cibuildwheel.yml

+25-13
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
MACOSX_DEPLOYMENT_TARGET: "10.12"
3636
strategy:
3737
matrix:
38-
os: [ubuntu-18.04, windows-latest, macos-10.15]
38+
os: [ubuntu-20.04, windows-latest, macos-11]
3939
cibw_archs: ["auto"]
4040
include:
41-
- os: ubuntu-18.04
41+
- os: ubuntu-20.04
4242
cibw_archs: "aarch64"
4343

4444
steps:
@@ -52,8 +52,21 @@ jobs:
5252
with:
5353
fetch-depth: 0
5454

55+
- name: Build wheels for CPython 3.11
56+
uses: pypa/cibuildwheel@v2.9.0
57+
env:
58+
CIBW_BUILD: "cp311-*"
59+
CIBW_SKIP: "*-musllinux*"
60+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
61+
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
62+
CIBW_BEFORE_BUILD: >-
63+
pip install certifi oldest-supported-numpy &&
64+
git clean -fxd build
65+
MPL_DISABLE_FH4: "yes"
66+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
67+
5568
- name: Build wheels for CPython 3.10
56-
uses: pypa/cibuildwheel@v2.8.1
69+
uses: pypa/cibuildwheel@v2.9.0
5770
env:
5871
CIBW_BUILD: "cp310-*"
5972
CIBW_SKIP: "*-musllinux*"
@@ -66,42 +79,41 @@ jobs:
6679
CIBW_ARCHS: ${{ matrix.cibw_archs }}
6780

6881
- name: Build wheels for CPython 3.9
69-
uses: pypa/cibuildwheel@v2.8.1
82+
uses: pypa/cibuildwheel@v2.9.0
7083
env:
7184
CIBW_BUILD: "cp39-*"
7285
CIBW_SKIP: "*-musllinux*"
73-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
74-
CIBW_MANYLINUX_I686_IMAGE: manylinux1
86+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
87+
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
7588
CIBW_BEFORE_BUILD: >-
7689
pip install certifi oldest-supported-numpy &&
7790
git clean -fxd build
7891
MPL_DISABLE_FH4: "yes"
7992
CIBW_ARCHS: ${{ matrix.cibw_archs }}
8093

8194
- name: Build wheels for CPython 3.8
82-
uses: pypa/cibuildwheel@v2.8.1
95+
uses: pypa/cibuildwheel@v2.9.0
8396
env:
8497
CIBW_BUILD: "cp38-*"
8598
CIBW_SKIP: "*-musllinux*"
86-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
87-
CIBW_MANYLINUX_I686_IMAGE: manylinux1
99+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
100+
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
88101
CIBW_BEFORE_BUILD: >-
89102
pip install certifi numpy==1.19.2 &&
90103
git clean -fxd build
91104
MPL_DISABLE_FH4: "yes"
92105
CIBW_ARCHS: ${{ matrix.cibw_archs }}
93106

94107
- name: Build wheels for PyPy
95-
uses: pypa/cibuildwheel@v2.8.1
108+
uses: pypa/cibuildwheel@v2.9.0
96109
env:
97-
CIBW_BUILD: "pp38-*"
110+
CIBW_BUILD: "pp38-* pp39-*"
98111
CIBW_SKIP: "*-musllinux*"
99112
CIBW_BEFORE_BUILD: >-
100113
pip install certifi oldest-supported-numpy &&
101114
git clean -fxd build
102115
CIBW_ARCHS: ${{ matrix.cibw_archs }}
103-
PIP_USE_FEATURE: in-tree-build
104-
if: false && matrix.cibw_archs != 'aarch64'
116+
if: matrix.cibw_archs != 'aarch64'
105117

106118
- name: Validate that LICENSE files are included in wheels
107119
run: |

.github/workflows/nightlies.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ jobs:
1111
upload_nightly_wheels:
1212
name: Upload nightly wheels to Anaconda Cloud
1313
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
shell: bash -l {0}
1417
if: github.repository_owner == 'matplotlib'
1518

1619
steps:
17-
- name: Install Python
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: '3.x'
21-
2220
# c.f. https://github.com/actions/download-artifact/issues/3#issuecomment-1017141067
2321
- name: Download wheel artifacts from last build on 'main'
24-
shell: bash
2522
env:
2623
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2724
run: |
@@ -50,12 +47,14 @@ jobs:
5047
mv *.whl dist/
5148
ls -l dist/
5249
50+
# N.B. anaconda-client is only maintained on the main channel
5351
- name: Install anaconda-client
54-
run: |
55-
python -m pip install --upgrade pip setuptools wheel
56-
# c.f. https://github.com/Anaconda-Platform/anaconda-client/issues/540
57-
python -m pip install git+https://github.com/Anaconda-Server/anaconda-client@be1e14936a8e947da94d026c990715f0596d7043
58-
python -m pip list
52+
uses: mamba-org/provision-with-micromamba@v12
53+
with:
54+
environment-file: false
55+
environment-name: nightlies
56+
extra-specs: anaconda-client=1.10.0
57+
channels: main
5958

6059
- name: Upload wheels to Anaconda Cloud as nightlies
6160
run: |
@@ -65,7 +64,6 @@ jobs:
6564
dist/matplotlib-*.whl
6665
6766
- name: Remove old uploads to save space
68-
shell: bash
6967
run: |
7068
N_LATEST_UPLOADS=5
7169
@@ -78,6 +76,7 @@ jobs:
7876
7977
if [ -s remove-package-versions.txt ]; then
8078
while LANG=C IFS= read -r package_version ; do
79+
echo "# Removing scipy-wheels-nightly/matplotlib/${package_version}"
8180
anaconda --token ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} remove \
8281
--force \
8382
"scipy-wheels-nightly/matplotlib/${package_version}"

.github/workflows/tests.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
matrix:
3434
include:
3535
- name-suffix: "(Minimum Versions)"
36-
os: ubuntu-18.04
36+
os: ubuntu-20.04
3737
python-version: 3.8
3838
extra-requirements: '-c requirements/testing/minver.txt'
3939
pyqt5-ver: '==5.11.2 sip==5.0.0' # oldest versions with a Py3.8 wheel.
4040
delete-font-cache: true
41-
- os: ubuntu-18.04
41+
- os: ubuntu-20.04
4242
python-version: 3.8
4343
extra-requirements: '-r requirements/testing/extra.txt'
4444
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
@@ -109,7 +109,7 @@ jobs:
109109
macOS)
110110
brew install ccache
111111
brew tap homebrew/cask-fonts
112-
brew install font-noto-sans-cjk-sc
112+
brew install font-noto-sans-cjk
113113
;;
114114
esac
115115
@@ -192,7 +192,6 @@ jobs:
192192
echo 'PySide2 is available' ||
193193
echo 'PySide2 is not available'
194194
fi
195-
# Qt6 crashes on Github's ubuntu 18.04 runner.
196195
if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then
197196
python -mpip install --upgrade pyqt6 &&
198197
python -c 'import PyQt6.QtCore' &&

azure-pipelines.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ stages:
1818
jobs:
1919
- job: Skip
2020
pool:
21-
vmImage: 'ubuntu-18.04'
21+
vmImage: 'ubuntu-latest'
2222
variables:
2323
DECODE_PERCENTS: 'false'
2424
RET: 'true'
@@ -39,13 +39,13 @@ stages:
3939
strategy:
4040
matrix:
4141
Linux_py38:
42-
vmImage: 'ubuntu-18.04'
42+
vmImage: 'ubuntu-20.04' # keep one job pinned to the oldest image
4343
python.version: '3.8'
4444
Linux_py39:
45-
vmImage: 'ubuntu-18.04'
45+
vmImage: 'ubuntu-latest'
4646
python.version: '3.9'
4747
Linux_py310:
48-
vmImage: 'ubuntu-18.04'
48+
vmImage: 'ubuntu-latest'
4949
python.version: '3.10'
5050
macOS_py38:
5151
vmImage: 'macOS-latest'
@@ -97,7 +97,7 @@ stages:
9797
graphviz \
9898
inkscape \
9999
libcairo2 \
100-
libgirepository-1.0.1 \
100+
libgirepository-1.0-1 \
101101
lmodern \
102102
fonts-freefont-otf \
103103
poppler-utils \

ci/check_version_number.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python3
2+
3+
"""
4+
Check that the version number of the install Matplotlib does not start with 0
5+
6+
To run:
7+
$ python3 -m build .
8+
$ pip install dist/matplotlib*.tar.gz for sdist
9+
$ pip install dist/matplotlib*.whl for wheel
10+
$ ./ci/check_version_number.py
11+
"""
12+
import matplotlib
13+
14+
import sys
15+
16+
EXIT_SUCCESS = 0
17+
EXIT_FAILURE = 1
18+
19+
20+
print(f"Version {matplotlib.__version__} installed")
21+
if matplotlib.__version__[0] == "0":
22+
sys.exit(EXIT_FAILURE)
23+
sys.exit(EXIT_SUCCESS)

doc/_static/mplot3d_view_angles.png

24.4 KB
Loading

0 commit comments

Comments
 (0)