Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21a550b

Browse files
committed
Refactoring gitwash
1 parent149a039 commit21a550b

24 files changed

+151
-926
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 toMatplotlibs code and
16+
Pull requests (PRs) are the mechanism for contributing toMatplotlib'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 ofPEP8_, 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 theblack_ 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
Contributor incubator
1623
=====================
@@ -150,96 +157,8 @@ A brief overview is:
150157
Finally, go to the web page of your fork of the Matplotlib repo, and click
151158
'Pull request' to send your changes to the maintainers for review.
152159

153-
..seealso::
154-
155-
* `Git documentation<https://git-scm.com/doc>`_
156-
* `Git-Contributing to a Project<https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project>`_
157-
* `Introduction to GitHub<https://lab.github.com/githubtraining/introduction-to-github>`_
158-
*:ref:`development-workflow` for best practices for Matplotlib
159-
*:ref:`using-git`
160-
161-
Contributing pull requests
162-
--------------------------
163-
164-
It is recommended to check that your contribution complies with the following
165-
rules before submitting a pull request:
166-
167-
* If your pull request addresses an issue, please use the title to describe the
168-
issue and mention the issue number in the pull request description to ensure
169-
that a link is created to the original issue.
170-
171-
* All public methods should have informative docstrings with sample usage when
172-
appropriate. Use the `numpy docstring standard
173-
<https://numpydoc.readthedocs.io/en/latest/format.html>`_.
174-
175-
* Formatting should follow the recommendations ofPEP8_, as enforced by
176-
flake8_. You can check flake8 compliance from the command line with ::
177-
178-
python -m pip install flake8
179-
flake8 /path/to/module.py
180-
181-
or your editor may provide integration with it. Note that Matplotlib
182-
intentionally does not use theblack_ auto-formatter (1__), in particular due
183-
to its unability to understand the semantics of mathematical expressions
184-
(2__,3__).
185-
186-
.. _PEP8:https://www.python.org/dev/peps/pep-0008/
187-
.. _flake8:https://flake8.pycqa.org/
188-
.. _black:https://black.readthedocs.io/
189-
..__:https://github.com/matplotlib/matplotlib/issues/18796
190-
..__:https://github.com/psf/black/issues/148
191-
..__:https://github.com/psf/black/issues/1984
192-
193-
* Each high-level plotting function should have a simple example in the
194-
``Example`` section of the docstring. This should be as simple as possible
195-
to demonstrate the method. More complex examples should go in the
196-
``examples`` tree.
197-
198-
* Changes (both new features and bugfixes) should have good test coverage. See
199-
:ref:`testing` for more details.
200-
201-
* Import the following modules using the standard scipy conventions::
202-
203-
import numpy as np
204-
import numpy.ma as ma
205-
import matplotlib as mpl
206-
import matplotlib.pyplot as plt
207-
import matplotlib.cbook as cbook
208-
import matplotlib.patches as mpatches
209-
210-
In general, Matplotlib modules should **not** import `.rcParams` using ``from
211-
matplotlib import rcParams``, but rather access it as ``mpl.rcParams``. This
212-
is because some modules are imported very early, before the `.rcParams`
213-
singleton is constructed.
214-
215-
* If your change is a major new feature, add an entry to the ``What's new``
216-
section by adding a new file in ``doc/users/next_whats_new`` (see
217-
:file:`doc/users/next_whats_new/README.rst` for more information).
218-
219-
* If you change the API in a backward-incompatible way, please document it in
220-
:file:`doc/api/next_api_changes/behavior`, by adding a new file with the
221-
naming convention ``99999-ABC.rst`` where the pull request number is followed
222-
by the contributor's initials. (see:file:`doc/api/api_changes.rst` for more
223-
information)
224-
225-
* See below for additional points about:ref:`keyword-argument-processing`, if
226-
applicable for your pull request.
227-
228-
..note::
229-
230-
The current state of the Matplotlib code base is not compliant with all
231-
of those guidelines, but we expect that enforcing those constraints on all
232-
new contributions will move the overall code base quality in the right
233-
direction.
234-
235-
236-
..seealso::
237-
238-
*:ref:`coding_guidelines`
239-
*:ref:`testing`
240-
*:ref:`documenting-matplotlib`
241-
242-
160+
For more detailed instructions on how to set up Matplotlib for development and
161+
best practices for contribution, see:ref:`installing_for_devs`.
243162

244163

245164
.. _contributing_documentation:

‎doc/devel/development_setup.rst‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,31 @@ Retrieving the latest version of the code
3333

3434
Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
3535

36-
You can retrieve the latest sources with the command (see
37-
:ref:`set-up-fork` for more details)::
36+
After `setting up your own fork<https://docs.github.com/get-started/quickstart/fork-a-repo>`_, you can retrieve the latest
37+
sources with the command (see for more details)::
3838

39-
git clone https://github.com/matplotlib/matplotlib.git
39+
git clone https://github.com/YOURUSERNAME/matplotlib.git
40+
cd matplotlib
41+
git remote add upstream https://github.com/matplotlib/matplotlib.git
4042

4143
This will place the sources in a directory:file:`matplotlib` below your
42-
current working directory.
44+
current working directory, and tell git all your pull requests should target the
45+
``upstream`` repository.
4346

4447
If you have the proper privileges, you can use ``git@`` instead of
4548
``https://``, which works through the ssh protocol and might be easier to use
4649
if you are using 2-factor authentication.
4750

51+
..seealso::
52+
53+
* `Git documentation<https://git-scm.com/doc>`_
54+
* `Git-Contributing to a Project<https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project>`_
55+
* `Introduction to GitHub<https://lab.github.com/githubtraining/introduction-to-github>`_
56+
*:ref:`using-git`
57+
*:ref:`git-resources`
58+
* `Installing git<https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`_
59+
60+
4861
Installing Matplotlib in editable mode
4962
======================================
5063
Install Matplotlib in editable mode from the:file:`matplotlib` directory

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp