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

Skip to content

Commit 3f16132

Browse files
authored
Merge branch 'matplotlib:main' into Plot-first-and-last-minor-ticks-#22331
2 parents 1231636 + b2e8434 commit 3f16132

Some content is hidden

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

70 files changed

+880
-2031
lines changed

.appveyor.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ branches:
1111

1212
clone_depth: 50
1313

14+
image: Visual Studio 2017
15+
1416
environment:
1517

1618
global:
@@ -79,17 +81,7 @@ test_script:
7981
- echo The following args are passed to pytest %PYTEST_ARGS%
8082
- pytest %PYTEST_ARGS%
8183

82-
after_test:
83-
# After the tests were a success, build wheels.
84-
# Hide the output, the copied files really clutter the build log...
85-
- 'python setup.py bdist_wheel > NUL:'
86-
- dir dist\
87-
- echo finished...
88-
8984
artifacts:
90-
- path: dist\*
91-
name: packages
92-
9385
- path: result_images\*
9486
name: result_images
9587
type: zip

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ commands:
156156
command: |
157157
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
158158
echo "No errors or warnings")
159+
when: always
159160

160161
doc-show-deprecations:
161162
steps:
@@ -166,6 +167,7 @@ commands:
166167
echo "No deprecation warnings in gallery")
167168
(grep DeprecationWarning -r -l doc/build/html/tutorials ||
168169
echo "No deprecation warnings in tutorials")
170+
when: always
169171

170172
doc-bundle:
171173
steps:

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
# https://github.com/jazzband/pip-tools/pull/1681
4343
python -m pip install --upgrade \
4444
certifi contourpy cycler fonttools kiwisolver importlib_resources \
45-
numpy packaging pillow pyparsing python-dateutil setuptools-scm
45+
numpy packaging pillow pyparsing python-dateutil setuptools-scm \
46+
pybind11
4647
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
4748
4849
- name: Initialize CodeQL

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ jobs:
170170
-r requirements/testing/all.txt \
171171
${{ matrix.extra-requirements }}
172172
173+
# Preinstall pybind11 on no-build-isolation builds.
174+
if [[ "${{ matrix.name-suffix }}" == '(Minimum Versions)' ]]; then
175+
python -m pip install 'pybind11>=2.6'
176+
fi
177+
173178
# Install optional dependencies from PyPI.
174179
# Sphinx is needed to run sphinxext tests
175180
python -m pip install --upgrade sphinx
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
``ticklabels`` parameter of `.Axis.set_ticklabels` renamed to ``labels``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Expiration of ``FancyBboxPatch`` deprecations
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
The `.FancyBboxPatch` constructor no longer accepts the *bbox_transmuter*
4+
parameter, nor can the *boxstyle* parameter be set to "custom" -- instead,
5+
directly set *boxstyle* to the relevant boxstyle instance. The
6+
*mutation_scale* and *mutation_aspect* parameters have also become
7+
keyword-only.
8+
9+
The *mutation_aspect* parameter is now handled internally and no longer passed
10+
to the boxstyle callables when mutating the patch path.

doc/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,10 @@ def linkcode_resolve(domain, info):
682682
if lineno else "")
683683

684684
startdir = Path(matplotlib.__file__).parent.parent
685-
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
685+
try:
686+
fn = os.path.relpath(fn, start=startdir).replace(os.path.sep, '/')
687+
except ValueError:
688+
return None
686689

687690
if not fn.startswith(('matplotlib/', 'mpl_toolkits/')):
688691
return None

doc/devel/coding_guide.rst

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,92 @@
1313
Pull request guidelines
1414
***********************
1515

16-
Pull requests (PRs) are the mechanism for contributing to Matplotlibs code and
17-
documentation.
16+
`Pull requests (PRs) on GitHub
17+
<https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests>`__
18+
are the mechanism for contributing to Matplotlib's code and documentation.
19+
20+
It is recommended to check that your contribution complies with the following
21+
rules before submitting a pull request:
22+
23+
* If your pull request addresses an issue, please use the title to describe the
24+
issue (e.g. "Add ability to plot timedeltas") and mention the issue number
25+
in the pull request description to ensure that a link is created to the
26+
original issue (e.g. "Closes #8869" or "Fixes #8869"). This will ensure the
27+
original issue mentioned is automatically closed when your PR is merged. See
28+
`the GitHub documentation
29+
<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue>`__
30+
for more details.
31+
32+
* Formatting should follow the recommendations of PEP8_, as enforced by
33+
flake8_. You can check flake8 compliance from the command line with ::
34+
35+
python -m pip install flake8
36+
flake8 /path/to/module.py
37+
38+
or your editor may provide integration with it. Note that Matplotlib
39+
intentionally does not use the black_ auto-formatter (1__), in particular due
40+
to its unability to understand the semantics of mathematical expressions
41+
(2__, 3__).
42+
43+
.. _PEP8: https://www.python.org/dev/peps/pep-0008/
44+
.. _flake8: https://flake8.pycqa.org/
45+
.. _black: https://black.readthedocs.io/
46+
.. __: https://github.com/matplotlib/matplotlib/issues/18796
47+
.. __: https://github.com/psf/black/issues/148
48+
.. __: https://github.com/psf/black/issues/1984
49+
50+
* All public methods should have informative docstrings with sample usage when
51+
appropriate. Use the :ref:`docstring standards <writing-docstrings>`.
52+
53+
* For high-level plotting functions, consider adding a simple example either in
54+
the ``Example`` section of the docstring or the
55+
:ref:`examples gallery <gallery>`.
56+
57+
* Changes (both new features and bugfixes) should have good test coverage. See
58+
:ref:`testing` for more details.
59+
60+
* Import the following modules using the standard scipy conventions::
61+
62+
import numpy as np
63+
import numpy.ma as ma
64+
import matplotlib as mpl
65+
import matplotlib.pyplot as plt
66+
import matplotlib.cbook as cbook
67+
import matplotlib.patches as mpatches
68+
69+
In general, Matplotlib modules should **not** import `.rcParams` using ``from
70+
matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
71+
is because some modules are imported very early, before the `.rcParams`
72+
singleton is constructed.
73+
74+
* If your change is a major new feature, add an entry to the ``What's new``
75+
section by adding a new file in ``doc/users/next_whats_new`` (see
76+
:file:`doc/users/next_whats_new/README.rst` for more information).
77+
78+
* If you change the API in a backward-incompatible way, please document it in
79+
:file:`doc/api/next_api_changes/behavior`, by adding a new file with the
80+
naming convention ``99999-ABC.rst`` where the pull request number is followed
81+
by the contributor's initials. (see :file:`doc/api/api_changes.rst` for more
82+
information)
83+
84+
* See below for additional points about :ref:`keyword-argument-processing`, if
85+
applicable for your pull request.
86+
87+
.. note::
88+
89+
The current state of the Matplotlib code base is not compliant with all
90+
of these guidelines, but we expect that enforcing these constraints on all
91+
new contributions will move the overall code base quality in the right
92+
direction.
93+
94+
95+
.. seealso::
96+
97+
* :ref:`coding_guidelines`
98+
* :ref:`testing`
99+
* :ref:`documenting-matplotlib`
100+
101+
18102

19103
Summary for pull request authors
20104
================================

doc/devel/contributing.rst

Lines changed: 11 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44
Contributing
55
============
66

7+
You've discovered a bug or something else you want to change
8+
in Matplotlib — excellent!
9+
10+
You've worked out a way to fix it — even better!
11+
12+
You want to tell us about it — best of all!
13+
714
This project is a community effort, and everyone is welcome to
815
contribute. Everyone within the community
916
is expected to abide by our
1017
`code of conduct <https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md>`_.
1118

12-
The project is hosted on
13-
https://github.com/matplotlib/matplotlib
19+
Below, you can find a number of ways to contribute, and how to connect with the
20+
Matplotlib community.
1421

1522
Get Connected
1623
=============
@@ -192,96 +199,8 @@ A brief overview is:
192199
Finally, go to the web page of your fork of the Matplotlib repo, and click
193200
'Pull request' to send your changes to the maintainers for review.
194201

195-
.. seealso::
196-
197-
* `Git documentation <https://git-scm.com/doc>`_
198-
* `Git-Contributing to a Project <https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project>`_
199-
* `Introduction to GitHub <https://lab.github.com/githubtraining/introduction-to-github>`_
200-
* :ref:`development-workflow` for best practices for Matplotlib
201-
* :ref:`using-git`
202-
203-
Contributing pull requests
204-
--------------------------
205-
206-
It is recommended to check that your contribution complies with the following
207-
rules before submitting a pull request:
208-
209-
* If your pull request addresses an issue, please use the title to describe the
210-
issue and mention the issue number in the pull request description to ensure
211-
that a link is created to the original issue.
212-
213-
* All public methods should have informative docstrings with sample usage when
214-
appropriate. Use the `numpy docstring standard
215-
<https://numpydoc.readthedocs.io/en/latest/format.html>`_.
216-
217-
* Formatting should follow the recommendations of PEP8_, as enforced by
218-
flake8_. You can check flake8 compliance from the command line with ::
219-
220-
python -m pip install flake8
221-
flake8 /path/to/module.py
222-
223-
or your editor may provide integration with it. Note that Matplotlib
224-
intentionally does not use the black_ auto-formatter (1__), in particular due
225-
to its inability to understand the semantics of mathematical expressions
226-
(2__, 3__).
227-
228-
.. _PEP8: https://www.python.org/dev/peps/pep-0008/
229-
.. _flake8: https://flake8.pycqa.org/
230-
.. _black: https://black.readthedocs.io/
231-
.. __: https://github.com/matplotlib/matplotlib/issues/18796
232-
.. __: https://github.com/psf/black/issues/148
233-
.. __: https://github.com/psf/black/issues/1984
234-
235-
* Each high-level plotting function should have a simple example in the
236-
``Example`` section of the docstring. This should be as simple as possible
237-
to demonstrate the method. More complex examples should go in the
238-
``examples`` tree.
239-
240-
* Changes (both new features and bugfixes) should have good test coverage. See
241-
:ref:`testing` for more details.
242-
243-
* Import the following modules using the standard scipy conventions::
244-
245-
import numpy as np
246-
import numpy.ma as ma
247-
import matplotlib as mpl
248-
import matplotlib.pyplot as plt
249-
import matplotlib.cbook as cbook
250-
import matplotlib.patches as mpatches
251-
252-
In general, Matplotlib modules should **not** import `.rcParams` using ``from
253-
matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
254-
is because some modules are imported very early, before the `.rcParams`
255-
singleton is constructed.
256-
257-
* If your change is a major new feature, add an entry to the ``What's new``
258-
section by adding a new file in ``doc/users/next_whats_new`` (see
259-
:file:`doc/users/next_whats_new/README.rst` for more information).
260-
261-
* If you change the API in a backward-incompatible way, please document it in
262-
:file:`doc/api/next_api_changes/behavior`, by adding a new file with the
263-
naming convention ``99999-ABC.rst`` where the pull request number is followed
264-
by the contributor's initials. (see :file:`doc/api/api_changes.rst` for more
265-
information)
266-
267-
* See below for additional points about :ref:`keyword-argument-processing`, if
268-
applicable for your pull request.
269-
270-
.. note::
271-
272-
The current state of the Matplotlib code base is not compliant with all
273-
of those guidelines, but we expect that enforcing those constraints on all
274-
new contributions will move the overall code base quality in the right
275-
direction.
276-
277-
278-
.. seealso::
279-
280-
* :ref:`coding_guidelines`
281-
* :ref:`testing`
282-
* :ref:`documenting-matplotlib`
283-
284-
202+
For more detailed instructions on how to set up Matplotlib for development and
203+
best practices for contribution, see :ref:`installing_for_devs`.
285204

286205

287206
.. _contributing_documentation:

0 commit comments

Comments
 (0)