8000 Refactoring gitwash · matplotlib/matplotlib@0600dae · GitHub
[go: up one dir, main page]

Skip to content

Commit 0600dae

Browse files
committed
Refactoring gitwash
1 parent 116ace5 commit 0600dae

24 files changed

+158
-923
lines changed

doc/devel/coding_guide.rst

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,89 @@
1313
Pull request guidelines
1414
***********************
1515

16-
Pull requests (PRs) are the mechanism for contributing to Matplotlibs code and
16+
Pull requests (PRs) are the mechanism for contributing to Matplotlib's code and
1717
documentation.
1818

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

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:

doc/devel/development_setup.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Retrieve the latest version of the code
1515
Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
1616

1717
You can retrieve the latest sources with the command (see
18-
:ref:`set-up-fork` for more details)
18+
`the GitHub documentation <https://docs.github.com/get-started/quickstart/fork-a-repo>`__ for more details)::
1919

2020
.. tab-set::
2121

@@ -69,6 +69,11 @@ The simplest way to do this is to use either Python's virtual environment
6969
<file folder location>\Scripts\activate.bat # Windows cmd.exe
7070
<file folder location>\Scripts\Activate.ps1 # Windows PowerShell
7171

72+
Conda dev environment
73+
---------------------
74+
75+
After you have cloned the repo change into the matplotlib directory.
76+
7277
.. tab-item:: conda environment
7378

7479
Create a new `conda`_ environment with ::
@@ -86,12 +91,30 @@ The simplest way to do this is to use either Python's virtual environment
8691

8792
Remember to activate the environment whenever you start working on Matplotlib.
8893

94+
<<<<<<< HEAD
8995
Install additional development dependencies
9096
===========================================
9197
See :ref:`development-dependencies`.
9298

99+
=======
100+
<<<<<<< HEAD
101+
>>>>>>> e998d58f3c (Refactoring gitwash)
93102
Install Matplotlib in editable mode
94103
===================================
104+
=======
105+
.. seealso::
106+
107+
* `Git documentation <https://git-scm.com/doc>`_
108+
* `Git-Contributing to a Project <https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project>`_
109+
* `Introduction to GitHub <https://lab.github.com/githubtraining/introduction-to-github>`_
110+
* :ref:`using-git`
111+
* :ref:`git-resources`
112+
* `Installing git <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`_
113+
114+
115+
Installing Matplotlib in editable mode
116+
======================================
117+
>>>>>>> 0e759d3ee8 (Refactoring gitwash)
95118
Install Matplotlib in editable mode from the :file:`matplotlib` directory
96119
using the command ::
97120

0 commit comments

Comments
 (0)
0