Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f78ea06

Browse files
authored
Merge branch 'main' into fallback-revamp
2 parents 69916e5 + 075067c commit f78ea06

File tree

422 files changed

+15213
-12452
lines changed

Some content is hidden

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

422 files changed

+15213
-12452
lines changed

.circleci/config.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ commands:
2828
name: Merge with upstream
2929
command: |
3030
if ! git remote -v | grep upstream; then
31-
git remote add upstream git://github.com/matplotlib/matplotlib.git
31+
git remote add upstream https://github.com/matplotlib/matplotlib.git
3232
fi
3333
git fetch upstream
3434
if [[ "$CIRCLE_BRANCH" != "main" ]] && \
@@ -104,7 +104,15 @@ commands:
104104
steps:
105105
- run:
106106
name: Install Matplotlib
107-
command: python -m pip install --user -ve .
107+
command: |
108+
if [[ "$CIRCLE_BRANCH" == v*-doc ]]; then
109+
# The v*-doc branches must build against the specified release.
110+
version=${CIRCLE_BRANCH%-doc}
111+
version=${version#v}
112+
python -m pip install matplotlib==${version}
113+
else
114+
python -m pip install --user -ve .
115+
fi
108116
- save_cache:
109117
key: build-deps-1
110118
paths:

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,13 @@ per-file-ignores =
9494
tutorials/colors/colormap-manipulation.py: E402
9595
tutorials/intermediate/artists.py: E402
9696
tutorials/intermediate/constrainedlayout_guide.py: E402
97-
tutorials/intermediate/gridspec.py: E402
9897
tutorials/intermediate/legend_guide.py: E402
9998
tutorials/intermediate/tight_layout_guide.py: E402
10099
tutorials/introductory/customizing.py: E501
101100
tutorials/introductory/images.py: E402, E501
102101
tutorials/introductory/pyplot.py: E402, E501
103102
tutorials/introductory/sample_plots.py: E501
104-
tutorials/introductory/usage.py: E501
103+
tutorials/introductory/quick_start.py: E703
105104
tutorials/text/annotations.py: E402, E501
106105
tutorials/text/text_intro.py: E402
107106
tutorials/text/text_props.py: E501
@@ -121,6 +120,7 @@ per-file-ignores =
121120
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
122121
examples/text_labels_and_annotations/custom_legends.py: E402
123122
examples/ticks/date_concise_formatter.py: E402
123+
examples/ticks/date_formatters_locators.py: F401
124124
examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
125125
examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
126126
examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* text=auto
2+
*.m diff=objc
23
*.ppm binary
34
*.svg binary
45
*.svg linguist-language=true

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
name: Bug Report
2-
description: Report a bug or issue with Matplotlib
2+
description: Report a bug or issue with Matplotlib.
33
title: "[Bug]: "
44
body:
5-
- type: markdown
6-
attributes:
7-
value: |
8-
To help us understand and resolve your issue, please fill out the form to the best of your ability.
95
- type: textarea
106
id: summary
117
attributes:
128
label: Bug summary
13-
description: Please provide 1-2 short sentences that succinctly describes the bug
9+
description: Describe the bug in 1-2 short sentences
1410
placeholder:
1511
value:
1612
validations:
@@ -28,63 +24,62 @@ body:
2824
id: actual
2925
attributes:
3026
label: Actual outcome
31-
description: Please provide the output produced by the above code, which may be a screenshot, console output, etc.
32-
placeholder: if applicable, paste the console output and images here
27+
description: |
28+
Paste the output produced by the code provided above, e.g.
29+
console output, images/videos produced by the code, any relevant screenshots/screencasts, etc.
3330
validations:
3431
required: true
3532
- type: textarea
3633
id: expected
3734
attributes:
3835
label: Expected outcome
39-
description: Please provide a description (or visual example) of the expected outcome from the code snippet. If this used to work in an earlier version of Matplotlib, please note the version it used to work on
36+
description: Describe (or provide a visual example of) the expected outcome from the code snippet.
4037
validations:
4138
required: true
39+
- type: textarea
40+
id: details
41+
attributes:
42+
label: Additional information
43+
description: |
44+
- What are the conditions under which this bug happens? input parameters, edge cases, etc?
45+
- Has this worked in earlier versions?
46+
- Do you know why this bug is happening?
47+
- Do you maybe even know a fix?
4248
- type: input
4349
id: operating-system
4450
attributes:
4551
label: Operating system
46-
description: What operating system are you using?
47-
placeholder: Windows, OS/X, Arch, Debian, Ubuntu, etc.
52+
description: Windows, OS/X, Arch, Debian, Ubuntu, etc.
4853
- type: input
4954
id: matplotlib-version
5055
attributes:
5156
label: Matplotlib Version
52-
placeholder: import matplotlib; print(matplotlib.__version__)
57+
description: "From Python prompt: `import matplotlib; print(matplotlib.__version__)`"
5358
validations:
5459
required: true
5560
- type: input
5661
id: matplotlib-backend
5762
attributes:
5863
label: Matplotlib Backend
59-
placeholder: print(matplotlib.get_backend())
64+
description: "From Python prompt: `import matplotlib; print(matplotlib.get_backend())`"
6065
- type: input
6166
id: python-version
6267
attributes:
6368
label: Python version
64-
placeholder: python --version
69+
description: "In console: `python --version`"
6570
- type: input
6671
id: jupyter-version
6772
attributes:
6873
label: Jupyter version
69-
placeholder: jupyter notebook --version, jupyter lab --version
70-
- type: textarea
71-
id: other-libraries
72-
attributes:
73-
label: Other libraries
74-
description: please provide the versions of any other libraries that are relevant to this bug report.
74+
description: "In console: `jupyter notebook --version` or `jupyter lab --version`"
7575
- type: dropdown
7676
id: install
7777
attributes:
7878
label: Installation
79-
description: how did you install matplotlib?
79+
description: How did you install matplotlib?
8080
options:
8181
- pip
8282
- conda
83-
- Linux package manager (Debian/Fedora/etc.)
84-
- source
85-
- type: input
86-
id: conda-channel
87-
attributes:
88-
label: Conda channel
89-
description: If you installed from conda, please specify which channel you used if not the default?
90-
placeholder: conda-forge
83+
- Linux package manager
84+
- from source (.tar.gz)
85+
- git checkout

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ description: Create a report to help us improve the documentation
33
title: "[Doc]: "
44
labels: [Documentation]
55
body:
6-
- type: markdown
7-
attributes:
8-
value: |
9-
To help us understand and resolve your issue, please fill out the form to the best of your ability.
106
- type: input
117
id: link
128
attributes:
139
label: Documentation Link
14-
description: Please provide a link to any documentation or examples that you are referencing.
15-
placeholder: https://matplotlib.org/devdocs/
10+
description: |
11+
Link to any documentation or examples that you are referencing.
12+
Suggested improvements should be based on the development version of the docs: https://matplotlib.org/devdocs/
13+
placeholder: https://matplotlib.org/devdocs/...
1614
- type: textarea
1715
id: problem
1816
attributes:
@@ -28,7 +26,6 @@ body:
2826
id: improvement
2927
attributes:
3028
label: Suggested improvement
31-
description: How can we improve the documentation?
3229
placeholder: |
3330
* This line should be be changed to say [...]
3431
* Include a paragraph explaining [...]
@@ -37,15 +34,6 @@ body:
3734
id: matplotlib-version
3835
attributes:
3936
label: Matplotlib Version
40-
placeholder: import matplotlib; print(matplotlib.__version__)
41-
validations:
42-
required: true
43-
- type: input
44-
id: matplotlib-doc-version
45-
attributes:
46-
label: Matplotlib documentation version
47-
placeholder: check under the logo
37+
description: "From Python prompt: `import matplotlib; print(matplotlib.__version__)`"
4838
validations:
4939
required: true
50-
51-

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
Thanks for thinking of a way to improve Matplotlib. Please search the issues for relevant feature requests before creating a new feature request.
9+
Please search the [issues](https://github.com/matplotlib/matplotlib/issues) for relevant feature requests before creating a new feature request.
1010
- type: textarea
1111
id: problem
1212
attributes:
1313
label: Problem
14-
description: Please provide a clear and concise description of the problem this feature will solve.
14+
description: Briefly describe the problem this feature will solve. (2-4 sentences)
1515
placeholder: |
1616
* I'm always frustrated when [...] because [...]
1717
* I would like it if [...] happened when I [...] because [...]
@@ -22,15 +22,4 @@ body:
2222
id: solution
2323
attributes:
2424
label: Proposed solution
25-
description: Please provide a clear and concise description of a way to accomplish what you want.
26-
placeholder: Add an option so that when [...] [...] will happen
27-
- type: textarea
28-
id: prior-art
29-
attributes:
30-
label: Additional context and prior art
31-
description: Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request.
32-
placeholder: Another project [...] solved this by [...]
33-
34-
35-
36-
25+
description: Describe a way to accomplish the goals of this feature request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
## PR Checklist
44

55
<!-- Please mark any checkboxes that do not apply to this PR as [N/A]. -->
6-
6+
**Tests and Styling**
77
- [ ] Has pytest style unit tests (and `pytest` passes).
8-
- [ ] Is [Flake 8](https://flake8.pycqa.org/en/latest/) compliant (run `flake8` on changed files to check).
8+
- [ ] Is [Flake 8](https://flake8.pycqa.org/en/latest/) compliant (install `flake8-docstrings` and run `flake8 --docstring-convention=all`).
9+
10+
**Documentation**
911
- [ ] New features are documented, with examples if plot related.
10-
- [ ] Documentation is sphinx and numpydoc compliant (the docs should [build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) without error).
11-
- [ ] Conforms to Matplotlib style conventions (install `flake8-docstrings` and run `flake8 --docstring-convention=all`).
1212
- [ ] New features have an entry in `doc/users/next_whats_new/` (follow instructions in README.rst there).
1313
- [ ] API changes documented in `doc/api/next_api_changes/` (follow instructions in README.rst there).
14+
- [ ] Documentation is sphinx and numpydoc compliant (the docs should [build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) without error).
1415

1516
<!--
1617
Thank you so much for your PR! To help us review your contribution, please

.github/workflows/cibuildwheel.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
11
name: Build CI wheels
22

33
on:
4+
# Save CI by only running this on release branches or tags.
45
push:
56
branches:
67
- main
78
- v[0-9]+.[0-9]+.x
89
tags:
910
- 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
1019

1120
jobs:
1221
build_wheels:
22+
if: |
23+
(
24+
github.event.action == 'labeled' &&
25+
github.event.label.name == 'Run cibuildwheel'
26+
) ||
27+
contains(github.event.pull_request.labels.*.name, 'Run cibuildwheel')
1328
name: Build wheels on ${{ matrix.os }}
1429
runs-on: ${{ matrix.os }}
1530
env:
@@ -64,12 +79,11 @@ jobs:
6479
- name: Build wheels for CPython 3.10
6580
run: |
6681
python -m cibuildwheel --output-dir dist
67-
if: matrix.os != 'macos-10.15'
6882
env:
6983
CIBW_BUILD: "cp310-*"
7084
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
7185
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
72-
CIBW_BEFORE_BUILD: pip install certifi numpy==1.21.2
86+
CIBW_BEFORE_BUILD: pip install certifi numpy==1.21.3
7387
MPL_DISABLE_FH4: "yes"
7488
CIBW_ARCHS: ${{ matrix.cibw_archs }}
7589

.github/workflows/circleci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
repo-token: ${{ secrets.GITHUB_TOKEN }}
1111
artifact-path: 0/doc/build/html/index.html
1212
circleci-jobs: docs-python38
13-
job-title: Check the rendered docs here!
13+
job-title: View the built docs

.github/workflows/clean_pr.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,25 @@ jobs:
1919
printf 'The following files were both added and deleted in this PR:\n%s\n' "$ad"
2020
exit 1
2121
fi
22-
22+
- name: Check for added-and-modified images
23+
run: |
24+
git fetch --quiet origin "$GITHUB_BASE_REF"
25+
base="$(git merge-base "origin/$GITHUB_BASE_REF" 'HEAD^2')"
26+
am="$(git log "$base..HEAD^2" --pretty=tformat: --name-status --diff-filter=AM |
27+
cut --fields 2 | sort | uniq --repeated |
28+
grep -E '\.(png|pdf|ps|eps|svg)' || true)"
29+
if [[ -n "$am" ]]; then
30+
printf 'The following images were both added and modified in this PR:\n%s\n' "$am"
31+
exit 1
32+
fi
33+
- name: Check for invalid backports to -doc branches
34+
if: endsWith(github.base_ref, '-doc')
35+
run: |
36+
git fetch --quiet origin "$GITHUB_BASE_REF"
37+
base="$(git merge-base "origin/$GITHUB_BASE_REF" 'HEAD^2')"
38+
lib="$(git log "$base..HEAD^2" --pretty=tformat: --name-status -- lib src |
39+
cut --fields 2 | sort || true)"
40+
if [[ -n "$lib" ]]; then
41+
printf 'Changes to the following files have no effect and should not be backported:\n%s\n' "$lib"
42+
exit 1
43+
fi

.github/workflows/pr_welcome.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/first-interaction@v1
11-
with:
12-
repo-token: ${{ secrets.GITHUB_TOKEN }}
13-
pr-message: >+
14-
Thank you for opening your first PR into Matplotlib!
10+
- uses: actions/first-interaction@v1
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
pr-message: >+
14+
Thank you for opening your first PR into Matplotlib!
1515
1616
17-
If you have not heard from us in a while, please feel free to
18-
ping `@matplotlib/developers` or anyone who has commented on the
19-
PR. Most of our reviewers are volunteers and sometimes
20-
things fall through the cracks.
17+
If you have not heard from us in a while, please feel free to ping
18+
`@matplotlib/developers` or anyone who has commented on the PR.
19+
Most of our reviewers are volunteers and sometimes things fall
20+
through the cracks.
2121
2222
23-
You can also join us [on
24-
gitter](https://gitter.im/matplotlib/matplotlib) for real-time
25-
discussion.
23+
You can also join us [on
24+
gitter](https://gitter.im/matplotlib/matplotlib) for real-time
25+
discussion.
2626
2727
28-
For details on testing, writing docs, and our review process,
29-
please see [the developer
30-
guide](https://matplotlib.org/devdocs/devel/index.html)
28+
For details on testing, writing docs, and our review process,
29+
please see [the developer
30+
guide](https://matplotlib.org/devdocs/devel/index.html)
3131
3232
33-
We strive to be a welcoming and open project. Please follow our
34-
[Code of
35-
Conduct](https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md).
33+
We strive to be a welcoming and open project. Please follow our
34+
[Code of
35+
Conduct](https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)