@@ -12,7 +12,7 @@ The project is hosted on https://github.com/matplotlib/matplotlib
1212Submitting a bug report
1313=======================
1414
15- In case you experience issues using this package , do not hesitate to submit a
15+ If you find a bug in the code or documentation , do not hesitate to submit a
1616ticket to the
1717`Bug Tracker <https://github.com/matplotlib/matplotlib/issues >`_. You are
1818also welcome to post feature requests or pull requests.
@@ -30,52 +30,56 @@ You can check out the latest sources with the command::
3030 git clone [email protected] :matplotlib/matplotlib.git 3131
3232
33- After obtaining a local copy of the matpotlib source code (:ref: `set-up-fork `),
34- navigate to the matplotlib directory and run the following in the shell:
35-
36- ::
33+ After obtaining a local copy of the matplotlib source code (:ref: `set-up-fork `),
34+ navigate to the matplotlib directory and run the following in the shell::
3735
3836 python setup.py develop
3937
4038or::
4139
4240 pip install -v -e .
4341
44- This installs matplotlib for development (i.e., builds everything and places the
45- symbolic links back to the source code). You can then run the tests your work
46- environment is set up properly::
4742
48- python tests.py
43+ This installs matplotlib for development (i.e., builds everything and places the
44+ symbolic links back to the source code).
4945
46+ .. warning ::
5047
51- You may want to consider setting up a `virtual environment
52- <http://docs.python-guide.org/en/latest/dev/virtualenvs/> `_ or a `conda
53- environment <http://conda.pydata.org/docs/using/envs.html> `_
48+ If you already have a version of matplotlib installed, you will need to
49+ uninstall it.
5450
5551
5652.. note ::
5753
58- If you decide to do this, you will have to rerun::
54+ If you decide to do install with ``python setup.py develop `` or ``pip
55+ install -v -e ``, you will have to rerun::
5956
6057 python setup.py build
6158
6259 every time the source code of a compiled extension is changed (for
6360 instance when switching branches or pulling changes from upstream).
6461
65- .. _nose : http://nose.readthedocs.org/en/latest/
66- .. _pep8 : http://pep8.readthedocs.org/en/latest/
62+
63+
64+ You can then run the tests to check your work environment is set up properly::
65+
66+ python tests.py
67+
68+
69+ .. _nose : https://nose.readthedocs.io/en/latest/
70+ .. _pep8 : https://pep8.readthedocs.io/en/latest/
6771
6872.. note ::
6973
7074 **Additional dependencies for testing **: nose _ (version 1.0 or later), `mock
71- <http ://www.voidspace .org.uk/python/mock/ > `_ (if python < 3.3), `Ghostscript
72- <http://pages.cs.wisc.edu/~ghost /> `_, `Inkscape <http://inkscape.org >`_
75+ <https ://docs.python .org/dev/library/unittest.mock.html > `_ (if python < 3.3), `Ghostscript
76+ <http://www.ghostscript.com /> `_, `Inkscape <http://inkscape.org >`_
7377
7478.. note :: To make sure the tests run locally:
7579
7680 * Copy setup.cfg.template to setup.cfg
77- * Edit setup.cfg to set `test ` to True, and `local_freetype ` to True
78- * If you have build matplotlib previously, remove the build folder.
81+ * Edit setup.cfg to set `` test `` to True, and `` local_freetype ` ` to True
82+ * If you have built matplotlib previously, remove the `` build `` folder.
7983 * Execute the build command.
8084
8185When working on bleeding edge packages, setting up a
@@ -112,21 +116,22 @@ then submit a "pull request" (PR):
112116
113117 4. Create a branch to hold your changes::
114118
115- $ git checkout -b my-feature
119+ $ git checkout -b my-feature origin/master
116120
117121 and start making changes. Never work in the ``master`` branch!
118122
119123 5. Work on this copy, on your computer, using Git to do the version
120- control. When you're done editing, do::
124+ control. When you're done editing e.g., ``lib/matplotlib/collections.py ``,
125+ do::
121126
122- $ git add modified_files
127+ $ git add lib/matplotlib/collections.py
123128 $ git commit
124129
125130 to record your changes in Git, then push them to GitHub with::
126131
127132 $ git push -u origin my-feature
128133
129- Finally, go to the web page of the your fork of the matplotlib repo,
134+ Finally, go to the web page of your fork of the matplotlib repo,
130135and click 'Pull request' to send your changes to the maintainers for review.
131136You may want to consider sending an email to the mailing list for more
132137visibility.
@@ -143,24 +148,24 @@ Contributing pull requests
143148It is recommended to check that your contribution complies with the following
144149rules before submitting a pull request:
145150
146- * If your pull request addresses an issue, please use the title todescribe
151+ * If your pull request addresses an issue, please use the title to describe
147152 the issue and mention the issue number in the pull request description
148153 to ensure a link is created to the original issue.
149154
150155 * All public methods should have informative docstrings with sample
151- usage presented as doctests when appropriate. Use the
156+ usage when appropriate. Use the
152157 `numpy docstring standard <https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt >`_
153158
154- * Formatting should follow `PEP8 recommandation
155- <http ://www.python.org/dev/peps/pep-0008/> `_. You should consider
159+ * Formatting should follow `PEP8 recommendation
160+ <https ://www.python.org/dev/peps/pep-0008/> `_. You should consider
156161 installing/enabling automatic PEP8 checking in your editor. Part of the
157162 test suite is checking PEP8 compliance, things go smoother if the code is
158163 mostly PEP8 compliant to begin with.
159164
160165 * Each high-level plotting function should have a simple example in
161- the `Example ` section of the docstring. This should be as simple as
166+ the `` Example ` ` section of the docstring. This should be as simple as
162167 possible to demonstrate the method. More complex examples should go
163- in the `examples ` tree.
168+ in the `` examples ` ` tree.
164169
165170 * Changes (both new features and bugfixes) should be tested. See
166171 :ref: `testing ` for more details.
@@ -170,13 +175,12 @@ rules before submitting a pull request:
170175 import numpy as np
171176 import numpy.ma as ma
172177 import matplotlib as mpl
173- from matplotlib import pyplot as plt
178+ import matplotlib. pyplot as plt
174179 import matplotlib.cbook as cbook
175- import matplotlib.collections as mcol
176180 import matplotlib.patches as mpatches
177181
178- * If your change is a major new feature, add an entry to ` What's new `
179- section by adding a new file in `doc/users/whats_new ` (see
182+ * If your change is a major new feature, add an entry to the `` What's new ` `
183+ section by adding a new file in `` doc/users/whats_new ` ` (see
180184 :file: `doc/users/whats_new/README ` for more information).
181185
182186 * If you change the API in a backward-incompatible way, please
@@ -205,7 +209,7 @@ tools:
205209
206210 The current state of the matplotlib code base is not compliant with all
207211 of those guidelines, but we expect that enforcing those constraints on all
208- new contributions will get the overall code base quality in the right
212+ new contributions will move the overall code base quality in the right
209213 direction.
210214
211215
@@ -223,23 +227,14 @@ Issues for New Contributors
223227---------------------------
224228
225229New contributors should look for the following tags when looking for issues.
226- We strongly recommend that new contributors tackle "new-contributor-friendly"
230+ We strongly recommend that new contributors tackle
231+ `new-contributor-friendly <https://github.com/matplotlib/matplotlib/labels/new-contributor-friendly >`_
227232issues (easy, well documented issues, that do not require an understanding of
228- the different submodules of matplotlib) and "Easy-fix" issues. This helps the
229- contributor become familiar with the contribution workflow, and for the core
230- devs to become acquainted with the contributor; besides which, we frequently
231- underestimate how easy an issue is to solve!
232-
233- .. topic :: new-contributor-friendly
234-
235- A great way to start contributing to matplotlib is to pick an item from
236- the list of
237- `new-contributor-friendly <https://github.com/matplotlib/matplotlib/labels/new-contributor-friendly >`_
238- in the issue tracker. Resolving these issues allow you to start
239- contributing to the project without much prior knowledge. Your assistance
240- in this area will be greatly appreciated by the more experienced
241- developers as it helps free up their time to concentrate on other issues.
242-
233+ the different submodules of matplotlib) and
234+ `Easy-fix <https://github.com/matplotlib/matplotlib/labels/Difficulty%3A%20Easy >`_
235+ issues. This helps the contributor become familiar with the contribution
236+ workflow, and for the core devs to become acquainted with the contributor;
237+ besides which, we frequently underestimate how easy an issue is to solve!
243238
244239.. _other_ways_to_contribute :
245240
@@ -266,7 +261,7 @@ New modules and files: installation
266261-----------------------------------
267262
268263* If you have added new files or directories, or reorganized existing
269- ones, make sure the new files included in the match patterns in
264+ ones, make sure the new files are included in the match patterns in
270265 :file: `MANIFEST.in `, and/or in `package_data ` in `setup.py `.
271266
272267C/C++ extensions
@@ -277,9 +272,6 @@ C/C++ extensions
277272* Code style should conform to PEP7 (understanding that PEP7 doesn't
278273 address C++, but most of its admonitions still apply).
279274
280- * Interfacing with Python may be done either with the raw Python/C API
281- or Cython.
282-
283275* Python/C interface code should be kept separate from the core C/C++
284276 code. The interface code should be named `FOO_wrap.cpp ` or
285277 `FOO_wrapper.cpp `.
@@ -296,7 +288,7 @@ Keyword argument processing
296288
297289Matplotlib makes extensive use of ``**kwargs `` for pass-through
298290customizations from one function to another. A typical example is in
299- :func: `matplotlib.pylab .text `. The definition of the pylab text
291+ :func: `matplotlib.pyplot .text `. The definition of the pylab text
300292function is a simple pass-through to
301293:meth: `matplotlib.axes.Axes.text `::
302294
@@ -310,7 +302,7 @@ function is a simple pass-through to
310302i.e., it just passes all ``args `` and ``kwargs `` on to
311303:meth: `matplotlib.text.Text.__init__ `::
312304
313- # in axes.py
305+ # in axes/_axes .py
314306 def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
315307 t = Text(x=x, y=y, text=s, **kwargs)
316308
@@ -342,7 +334,7 @@ used locally and pass on the rest. For example, in
342334local arguments and the rest are passed on as
343335:meth: `~matplotlib.lines.Line2D ` keyword arguments::
344336
345- # in axes.py
337+ # in axes/_axes .py
346338 def plot(self, *args, **kwargs):
347339 scalex = kwargs.pop('scalex', True)
348340 scaley = kwargs.pop('scaley', True)
@@ -381,7 +373,7 @@ If you are working on a custom backend, the *backend* setting in
381373:file: `matplotlibrc ` (:ref: `customizing-matplotlib `) supports an
382374external backend via the ``module `` directive. if
383375:file: `my_backend.py ` is a matplotlib backend in your
384- :envvar: `PYTHONPATH `, you can set use it on one of several ways
376+ :envvar: `PYTHONPATH `, you can set it on one of several ways
385377
386378* in matplotlibrc::
387379
0 commit comments