@@ -10,9 +10,9 @@ The goal is to maintain a diverse community that's pleasant for everyone.
10
10
[ Code of Conduct] ( https://github.com/GenericMappingTools/pygmt/blob/master/CODE_OF_CONDUCT.md )
11
11
and we encourage all to read it carefully.
12
12
13
- ## ** Ways to Contribute**
13
+ ## Ways to Contribute
14
14
15
- ### ** Ways to Contribute Documentation and/or Code**
15
+ ### Ways to Contribute Documentation and/or Code
16
16
17
17
* Tackle any issue that you wish! Some issues are labeled as ** "good first issues"** to
18
18
indicate that they are beginner friendly, meaning that they don't require extensive
@@ -22,7 +22,7 @@ and we encourage all to read it carefully.
22
22
* Contribute code! This can be code that you already have and it doesn't need to be
23
23
perfect! We will help you clean things up, test it, etc.
24
24
25
- ### ** Ways to Contribute Feedback**
25
+ ### Ways to Contribute Feedback
26
26
27
27
* Provide feedback about how we can improve the project or about your particular use
28
28
case. Open an [ issue] ( https://github.com/GenericMappingTools/pygmt/issues ) with
@@ -31,17 +31,17 @@ and we encourage all to read it carefully.
31
31
* Help triage issues, or give a "thumbs up" on issues that others reported which are
32
32
relevant to you.
33
33
34
- ### ** Ways to Contribute to Community Building**
34
+ ### Ways to Contribute to Community Building
35
35
36
36
* Participate and answer questions on the [ PyGMT forum Q&A] ( https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a/11 ) .
37
37
* Participate in discussions at the quarterly PyGMT Community Meetings, which are
38
38
announced on the [ forum governance page] ( https://forum.generic-mapping-tools.org/c/governance/9 ) .
39
39
* Cite PyGMT when using the project.
40
40
* Spread the word about PyGMT or star the project!
41
41
42
- ## ** Providing Feedback**
42
+ ## Providing Feedback
43
43
44
- ### ** Reporting a Bug**
44
+ ### Reporting a Bug
45
45
46
46
* Find the [ * Issues* ] ( https://github.com/GenericMappingTools/pygmt/issues ) tab on the
47
47
top of the GitHub repository and click * New Issue* .
@@ -50,7 +50,7 @@ top of the GitHub repository and click *New Issue*.
50
50
* After submitting your bug report, try to answer any follow up questions about the bug
51
51
as best as you can.
52
52
53
- ### ** Submitting a Feature Request**
53
+ ### Submitting a Feature Request
54
54
55
55
* Find the [ * Issues* ] ( https://github.com/GenericMappingTools/pygmt/issues ) tab on the
56
56
top of the GitHub repository and click * New Issue* .
@@ -59,7 +59,7 @@ top of the GitHub repository and click *New Issue*.
59
59
* After submitting your feature request, try to answer any follow up questions as best
60
60
as you can.
61
61
62
- ### ** Submitting General Comments/Questions**
62
+ ### Submitting General Comments/Questions
63
63
64
64
There are several pages on the [ Community Forum] ( https://forum.generic-mapping-tools.org/ )
65
65
where you can submit general comments and/or questions:
@@ -71,9 +71,9 @@ where you can submit general comments and/or questions:
71
71
* To share your work, select * New Topic* from the
72
72
[ Showcase Page] ( https://forum.generic-mapping-tools.org/c/Sow-your-nice-example-script/10 ) .
73
73
74
- ## ** General Guidelines**
74
+ ## General Guidelines
75
75
76
- ### ** Resources for New Contributors**
76
+ ### Resources for New Contributors
77
77
78
78
Please take a look at these resources to learn about Git and pull requests (don't
79
79
hesitate to [ ask questions] ( #getting-help ) ):
@@ -82,13 +82,13 @@ hesitate to [ask questions](#getting-help)):
82
82
* [ Git Workflow Tutorial] ( http://www.asmeurer.com/git-workflow/ ) by Aaron Meurer.
83
83
* [ How to Contribute to an Open Source Project on GitHub] ( https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github ) .
84
84
85
- ### ** Getting Help**
85
+ ### Getting Help
86
86
87
87
Discussion often happens on GitHub issues and pull requests. In addition, there is a
88
88
[ Discourse forum] ( https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a ) for
89
89
the project where you can ask questions.
90
90
91
- ### ** Pull Request Workflow**
91
+ ### Pull Request Workflow
92
92
93
93
We follow the [ git pull request workflow] ( http://www.asmeurer.com/git-workflow )
94
94
to make changes to our codebase. Every change made goes through a pull request, even
@@ -97,7 +97,7 @@ our own, so that our
97
97
services have a chance to check that the code is up to standards and passes all
98
98
our tests. This way, the * master* branch is always stable.
99
99
100
- #### ** General Guidelines for Making a Pull Request (PR):**
100
+ #### General Guidelines for Making a Pull Request (PR):
101
101
102
102
* What should be included in a PR
103
103
- Have a quick look at the titles of all the existing issues first. If there
@@ -127,7 +127,7 @@ our tests. This way, the *master* branch is always stable.
127
127
- Be aware that the pull request review process is not immediate, and is
128
128
generally proportional to the size of the pull request.
129
129
130
- #### ** General Process for Pull Request Review:**
130
+ #### General Process for Pull Request Review:
131
131
132
132
After you've submitted a pull request, you should expect to hear at least a
133
133
comment within a couple of days. We may suggest some changes, improvements or
@@ -157,7 +157,7 @@ Try to get them all passing (green).
157
157
If you have any trouble, leave a comment in the PR or
158
158
[ get in touch] ( #how-can-i-talk-to-you ) .
159
159
160
- ## ** Setting up your Environment**
160
+ ## Setting up your Environment
161
161
162
162
These steps for setting up your environment are necessary for
163
163
[ editing the documentation locally] ( #editing-the-documentation-locally ) and
@@ -203,9 +203,9 @@ This installs your project in *editable* mode, meaning that changes made to the
203
203
code will be available when you import the package (even if you're on a different
204
204
directory).
205
205
206
- ## ** Contributing Documentation**
206
+ ## Contributing Documentation
207
207
208
- ### ** PyGMT Documentation Overview**
208
+ ### PyGMT Documentation Overview
209
209
210
210
There are four main components to PyGMT's documentation:
211
211
@@ -235,7 +235,7 @@ There are two primary ways to edit the PyGMT documentation:
235
235
In order to build the documentation locally, you first need to
236
236
[ set up your environment] ( #setting-up-your-environment ) .
237
237
238
- ### ** Editing the Documentation on GitHub**
238
+ ### Editing the Documentation on GitHub
239
239
240
240
If you're browsing the documentation and notice a typo or something that could be
241
241
improved, please consider letting us know by [ creating an issue] ( #reporting-a-bug ) or
@@ -268,7 +268,7 @@ Alternatively, you can make the changes offline to the files in the `doc` folder
268
268
example scripts. See [ editing the documentation locally] ( #editing-the-documentation-locally )
269
269
for instructions.
270
270
271
- ### ** Editing the Documentation Locally**
271
+ ### Editing the Documentation Locally
272
272
273
273
For more extensive changes, you can edit the documentation in your cloned repository
274
274
and build the documentation to preview changes before submitting a pull request. First,
@@ -284,7 +284,7 @@ This will build the HTML files in `doc/_build/html`.
284
284
Open ` doc/_build/html/index.html ` in your browser to view the pages. Follow the
285
285
[ pull request workflow] ( #pull-request-workflow ) to submit your changes for review.
286
286
287
- ### ** Contributing Gallery Plots**
287
+ ### Contributing Gallery Plots
288
288
289
289
The gallery and tutorials are managed by
290
290
[ sphinx-gallery] ( https://sphinx-gallery.readthedocs.io/ ) .
@@ -315,7 +315,7 @@ General guidelines for making a good gallery plot:
315
315
documentation.
316
316
* SI units should be used in the example code for gallery plots.
317
317
318
- ### ** Contributing Tutorials**
318
+ ### Contributing Tutorials
319
319
320
320
The tutorials (the User Guide in the docs) are also built by sphinx-gallery from the
321
321
` .py ` files in the ` examples/tutorials ` folder of the repository. To add a new tutorial:
@@ -343,7 +343,7 @@ Guidelines for a good tutorial:
343
343
Note that the ` Figure.show() ` function needs to be called for a plot to be inserted into
344
344
the documentation.
345
345
346
- ### ** Editing the API Documentation**
346
+ ### Editing the API Documentation
347
347
348
348
The API documentation is built from the docstrings in the Python ` *.py ` files under
349
349
the ` pygmt/src/ ` and ` /pygmt/datasets/ ` folders. ** All docstrings** should follow the
@@ -355,7 +355,7 @@ While the maximum line length for code is automatically set by Black, docstrings
355
355
must be formatted manually. To play nicely with Jupyter and IPython, ** keep docstrings
356
356
limited to 79 characters** per line.
357
357
358
- ### ** Standards for Example Code**
358
+ ### Standards for Example Code
359
359
360
360
When editing documentation, use the following standards to demonstrate the example code:
361
361
@@ -373,7 +373,7 @@ When editing documentation, use the following standards to demonstrate the examp
373
373
with [ ] (square brackers) with the prefix "Default is". Example: [ Default is
374
374
** p** ] .
375
375
376
- ### ** Cross-referencing with Sphinx**
376
+ ### Cross-referencing with Sphinx
377
377
378
378
The API reference is manually assembled in ` doc/api/index.rst ` .
379
379
The * autodoc* sphinx extension will automatically create pages for each
@@ -410,15 +410,15 @@ For GMT configuration parameters, an example is
410
410
Sphinx will create a link to the automatically generated page for that
411
411
function/class/module.
412
412
413
- ## ** Contributing Code**
413
+ ## Contributing Code
414
414
415
- ### ** PyGMT Code Overview**
415
+ ### PyGMT Code Overview
416
416
417
417
The source code for PyGMT is located in the ` pygmt/ ` directory. When contributing
418
418
code, be sure to follow the general guidelines in the
419
419
[ pull request workflow] ( #pull-request-workflow ) section.
420
420
421
- ### ** Code Style**
421
+ ### Code Style
422
422
423
423
We use some tools to to format the code so we don't have to think about it:
424
424
@@ -459,7 +459,7 @@ make check # Runs black, blackdoc, docformatter, flake8 and isort (in check mo
459
459
make lint # Runs pylint, which is a bit slower
460
460
```
461
461
462
- ### ** Testing your Code**
462
+ ### Testing your Code
463
463
464
464
Automated testing helps ensure that our code is as free of bugs as it can be.
465
465
It also lets us know immediately if a change we make breaks any other part of the code.
@@ -503,15 +503,15 @@ or run tests which contain names that match a specific keyword expression:
503
503
504
504
pytest -k KEYWORD pygmt/tests
505
505
506
- ### ** Testing Plots**
506
+ ### Testing Plots
507
507
508
508
Writing an image-based test is only slightly more difficult than a simple test.
509
509
The main consideration is that you must specify the "baseline" or reference
510
510
image, and compare it with a "generated" or test image. This is handled using
511
511
the * decorator* functions ` @pytest.mark.mpl_image_compare ` and ` @check_figures_equal `
512
512
whose usage are further described below.
513
513
514
- #### ** Using mpl_image_compare**
514
+ #### Using mpl_image_compare
515
515
516
516
> ** This is the preferred way to test plots whenever possible.**
517
517
@@ -553,7 +553,7 @@ Don't forget to commit the baseline image as well!
553
553
The images should be pushed up into a remote repository using ` dvc ` (instead of
554
554
` git ` ) as will be explained in the next section.
555
555
556
- #### ** Using Data Version Control ([ dvc] ( https://dvc.org ) ) to Manage Test Images**
556
+ #### Using Data Version Control ([ dvc] ( https://dvc.org ) ) to Manage Test Images
557
557
558
558
As the baseline images are quite large blob files that can change often (e.g.
559
559
with new GMT versions), it is not ideal to store them in ` git ` (which is meant
@@ -620,7 +620,7 @@ summarized as follows:
620
620
git push
621
621
dvc push
622
622
623
- #### ** Using check_figures_equal**
623
+ #### Using check_figures_equal
624
624
625
625
This approach draws the same figure using two different methods (the reference
626
626
method and the tested method), and checks that both of them are the same.
0 commit comments