You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Continuing with the effort to translate docs to rst format. Most of the phys_pkgs section has been translated.
This also includes additions to the contributions page describing git and how to work with it.
Copy file name to clipboardExpand all lines: doc/contributing.rst
+92-11Lines changed: 92 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,40 +93,66 @@ The fundamentals are:
93
93
Detailed guide
94
94
--------------
95
95
96
+
To be completed.
97
+
98
+
99
+
.. figure:: figs/git_setup.*
100
+
:width:70%
101
+
:align:center
102
+
:alt:Conceptual model of GitHub
103
+
:name:fig_48tile
104
+
105
+
A conceptual map of the GitHub setup. Text in serif font are labels or concepts, text in sans serif represent commands.
106
+
107
+
96
108
97
109
.. _subsec_code_style_guide:
98
110
99
111
Style guide
100
112
-----------
101
113
102
114
115
+
Automatic testing with Travis-CI
116
+
--------------------------------
117
+
118
+
The MITgcm uses the continuous integration service Travis-CI to test code before it is accepted into the repository. When you submit a pull request your contributions will be automatically tested. However, it is a good idea to test before submitting a pull request, so that you have time to fix any issues that are identified. To do this, you will need to activate Travis-CI for your fork of the repository.
119
+
120
+
**Detailed instructions or link to be added.**
121
+
122
+
103
123
104
124
Contributing to the manual
105
125
==========================
106
126
127
+
Whether you are correcting typos or describing currently undocumented packages, we welcome all contributions to the manual. The following information will help you make sure that your contribution is consistent with the style of the MITgcm documentation. (We know that not all of the current documentation follows these guidelines - we're working on it)
107
128
108
-
Section headings
109
-
----------------
129
+
Once you've made your changes to the manual, you should build it locally to verify that it works as expected. To do this you will need a working python installation with the following modules installed (use :code:`pip install MODULE` in the terminal):
110
130
111
-
Chapter headings - these are the main headings with integer numbers - underlined with ``****``
131
+
- sphinx
132
+
- sphinxcontrib-bibtex
133
+
- sphinx_rtd_theme
112
134
113
-
section headings - headings with number format X.Y - underlined with ``====``
135
+
Then, run :code:`make html` in the :code:`docs` directory.
114
136
115
-
subsection headings - headings with number format X.Y.Z - underlined with ``---``
116
137
117
-
subsubsection headings - headings with number format X.Y.Z.A - underlined with ``+++``
138
+
Section headings
139
+
----------------
118
140
119
-
paragraph headings - headings with no numbers - underlined with ``###``
141
+
- Chapter headings - these are the main headings with integer numbers - underlined with ``****``
142
+
- section headings - headings with number format X.Y - underlined with ``====``
143
+
- Subsection headings - headings with number format X.Y.Z - underlined with ``---``
144
+
- Subsubsection headings - headings with number format X.Y.Z.A - underlined with ``+++``
145
+
- Paragraph headings - headings with no numbers - underlined with ``###``
120
146
121
-
N.B. all underlinings should be the same length as the heading
147
+
N.B. all underlinings should be the same length as the heading. If they are too short an error will be produced.
122
148
123
149
124
150
Cross referencing
125
151
-----------------
126
152
127
153
Labels go above the section they refer to, with the format ``.. _LABELNAME:``. The leading underscore is important.
128
154
129
-
To reference sections by number use this format for the reference: ``section :numref:`sec_eg_baro```
155
+
To reference sections/figures/tables/equations by number use this format for the reference: ``:numref:`sec_eg_baro```
130
156
131
157
To reference sections by name use this format: ``:ref:`sec_eg_baro```
132
158
@@ -146,5 +172,60 @@ Separate equations, which will be typeset on their own lines, are produced with:
146
172
147
173
.. _subsec_manual_style_guide:
148
174
149
-
Style guide
150
-
----------------------
175
+
176
+
Units
177
+
-----
178
+
179
+
Units should be typeset in normal text, and exponents added with the ``:sup:`` command.
180
+
181
+
::
182
+
183
+
100 N m\ :sup:`--2`
184
+
185
+
If the exponent is negative use two dashes ``--`` to make the minus sign long enough. The backslash removes the space between the unit and the exponent.
186
+
187
+
188
+
189
+
190
+
Describing subroutine inputs and outputs
191
+
----------------------------------------
192
+
193
+
This information should go in an 'adominition' block. The source code to achieve this is:
The only people with write access to the main repository are a small number of core MITgcm developers. They are the people that will eventually merge your pull requests. However, before your PR gets merged, it will undergo the automated testing on Travis-CI, and it will be assessed by the MITgcm community.
218
+
219
+
**Everyone can review and comment on pull requests.** Even if you are not one of the core developers you can still comment on a pull request.
220
+
221
+
To test pull requests locally you should:
222
+
223
+
- add the repository of the user proposing the pull request as a remote, :code:`git remote add upstream https://github.com/USERNAME/MITgcm66h.git` where USERNAME is replaced by the user name of the person who has made the pull request;
224
+
225
+
- download a local version of the branch from the pull request, :code:`git fetch USERNAME` followed by :code:`git checkout --track USERNAME/foo`;
226
+
227
+
- run tests locally; and
228
+
229
+
- possibly push fixes or changes directly to the pull request.
230
+
231
+
None of these steps, apart from the final one, require write access to the main repository. This means that anyone can review pull requests. However, unless you are one of the core developers you won't be able to directly push changes. You will instead have to make a comment describing any problems you find.
0 commit comments