Skip to content

Commit ae656e2

Browse files
edoddridgejahn
authored andcommitted
documentation translation
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.
1 parent 748c5cc commit ae656e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+9493
-426
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
# dir menu entry, description, category)
174174
texinfo_documents = [
175175
(master_doc, 'MITgcm', u'MITgcm Documentation',
176-
author, 'MITgcm', 'One line description of project.',
176+
author, 'MITgcm', 'A highly configurable general circulation model.',
177177
'Miscellaneous'),
178178
]
179179

doc/contributing.rst

Lines changed: 92 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,40 +93,66 @@ The fundamentals are:
9393
Detailed guide
9494
--------------
9595

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+
96108

97109
.. _subsec_code_style_guide:
98110

99111
Style guide
100112
-----------
101113

102114

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+
103123

104124
Contributing to the manual
105125
==========================
106126

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)
107128

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):
110130

111-
Chapter headings - these are the main headings with integer numbers - underlined with ``****``
131+
- sphinx
132+
- sphinxcontrib-bibtex
133+
- sphinx_rtd_theme
112134

113-
section headings - headings with number format X.Y - underlined with ``====``
135+
Then, run :code:`make html` in the :code:`docs` directory.
114136

115-
subsection headings - headings with number format X.Y.Z - underlined with ``---``
116137

117-
subsubsection headings - headings with number format X.Y.Z.A - underlined with ``+++``
138+
Section headings
139+
----------------
118140

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 ``###``
120146

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.
122148

123149

124150
Cross referencing
125151
-----------------
126152

127153
Labels go above the section they refer to, with the format ``.. _LABELNAME:``. The leading underscore is important.
128154

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```
130156

131157
To reference sections by name use this format: ``:ref:`sec_eg_baro```
132158

@@ -146,5 +172,60 @@ Separate equations, which will be typeset on their own lines, are produced with:
146172

147173
.. _subsec_manual_style_guide:
148174

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:
194+
195+
::
196+
197+
.. admonition:: Subroutine
198+
:class: note
199+
200+
S/R GMREDI_CALC_TENSOR (*pkg/gmredi/gmredi_calc_tensor.F*)
201+
202+
:math:`\sigma_x`: **SlopeX** (argument on entry)
203+
204+
:math:`\sigma_y`: **SlopeY** (argument on entry)
205+
206+
:math:`\sigma_z`: **SlopeY** (argument)
207+
208+
:math:`S_x`: **SlopeX** (argument on exit)
209+
210+
:math:`S_y`: **SlopeY** (argument on exit)
211+
212+
213+
214+
Reviewing pull requests
215+
=======================
216+
217+
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.

doc/figs/git_setup.pdf

91.2 KB
Binary file not shown.

doc/figs/git_setup.svg

Lines changed: 1 addition & 0 deletions
Loading

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Welcome to MITgcm's user manual
77
===============================
88

99
.. toctree::
10-
:maxdepth: 4
10+
:maxdepth: 3
1111
:caption: Contents:
1212
:numbered: 4
1313

0 commit comments

Comments
 (0)