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
Copy file name to clipboardExpand all lines: docs/README.md
+22-74Lines changed: 22 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,9 @@ Doxygen in run in two modes. For the API manual, it is instructed to generate o
42
42
43
43
If the software is installed, local copies of html and pdf instead of those found at RTD. The html and pdf versions produced by doxygen will not have any of the additional documentation from the sphinx portion of the pipeline.
44
44
45
+
RTD by default runs html(sphinx) pipeline and adds a bit of styling. The RTD can be instructed to also produce a PDF. However, the current pipeline exceeds 900 seconds
46
+
execution time and fails if RTD is instructed to generate the html and PDF in one session. By default, the PDF generation is currently turned off.
47
+
45
48
## Starting structure
46
49
47
50
We define `SRC` as the root of the source directory assuming the `$(SRC)` directory was created from downloading the tree from github using `git clone`.
@@ -96,7 +99,7 @@ on the [MOM6 developer's wiki](https://github.com/NOAA-GFDL/MOM6/wiki/Doxygen).
96
99
97
100
NOTE: Not all doxygen commands are supported through the sphinx documentation processor. Support can be added by adding an [issue](https://github.com/NOAA-GFDL/MOM6/issues) to the github repository.
98
101
99
-
For the API documentation, the tree will look like this:
102
+
For the API documentation, the resultant tree will look like this:
100
103
```
101
104
SRC/
102
105
docs/
@@ -107,7 +110,7 @@ SRC/
107
110
MOM6.tags
108
111
```
109
112
110
-
The main driver for doxygen is a configuration file. The content linked to[MOM6 developer's wiki](https://github.com/NOAA-GFDL/MOM6/wiki/Doxygen) uses the `Doxyfile_nortd` configuration file.
113
+
The main driver for doxygen is a configuration file. The content on[MOM6 developer's wiki](https://github.com/NOAA-GFDL/MOM6/wiki/Doxygen) uses the `Doxyfile_nortd` configuration file.
111
114
112
115
By default, the html directory is only available after processing the documentation. Please see [software operation](software-operation) on how to generate the pdf companion of the documentation.
113
116
@@ -121,7 +124,7 @@ SRC/
121
124
MOM6.tags
122
125
```
123
126
124
-
The documentation generated by Sphinx and RTD uses the `Doxyfile_rtd`. These options can be overridden at the command line. See software operation for more details.
127
+
The documentation generated by Sphinx and RTD uses the `Doxyfile_rtd`. These options can be overridden at the command line. See [software operation](software-operation) for more details.
125
128
126
129
The `_build/doxygen_warn_rtd_log.txt` should be reviewed for warnings and errors.
127
130
@@ -145,7 +148,7 @@ The `html_log.txt` should be reviewed for warnings and errors.
145
148
146
149
## Read the Docs
147
150
148
-
The RTD site can be configured to watch for updates on a github repository. A documentation update may be triggered when an update is pushed to the repository. The entire documentation process is run twice. The first run produces html. The second run produces a pdf.
151
+
The RTD site can be configured to watch for updates on a github repository. A documentation update may be triggered when an update is pushed to the repository. The entire documentation process is run twice. The first run produces html. The second run produces a pdf (if so instructed).
149
152
150
153
NOTE: There is a rough execution time limit of about 900 seconds. Trying to do more than that will cause a "timeout" error.
151
154
@@ -249,6 +252,7 @@ as RTD runs sphinx processing directly using `sphinx-build` and not the Makefile
249
252
##### PAPER
250
253
251
254
The default value is empty (`PAPER=`). There are two options currently available in the Makefile (a4 or letter).
255
+
The `PAPER` argument has no impact on html rendered content.
252
256
253
257
#### conf.py
254
258
@@ -274,19 +278,6 @@ NOTE: This command does not have any impact if an existing binary is found.
274
278
275
279
This option activates the NCAR configuration file: `ncar/Doxyfile_ncar_rtd`
276
280
277
-
### Local web server
278
-
279
-
Python provides a way to quickly stand up a private web server for checking documentation. It requires knowledge of
280
-
the IP address if you are using a remote server, otherwise `localhost` should work.
281
-
282
-
You can start the server on any port. Port 8080 is shown here as an example.
283
-
```bash
284
-
python3 -m http.server 8080
285
-
```
286
-
287
-
After starting the server, you can browse to the known IP using `http://IP/` or if you are on the same
288
-
machine use `http://localhost/`.
289
-
290
281
# Software installation
291
282
292
283
On a relatively bare system, you can install a fairly stable documentation pipeline.
@@ -346,7 +337,9 @@ PDF generation requires the following packages
346
337
347
338
### doxygen
348
339
349
-
Download latest [source](https://www.doxygen.nl/download.html). Latest is `doxygen-1.8.20.src.tar.gz`.
340
+
You may choose to download the [source](https://www.doxygen.nl/download.html).
341
+
342
+
Latest is `doxygen-1.8.20.src.tar.gz`.
350
343
351
344
```bash
352
345
tar xzf doxygen-1.8.20.src.tar.gz
@@ -358,15 +351,20 @@ make
358
351
sudo make install
359
352
```
360
353
361
-
Make install attempts to place the compiled version into /usr/local/bin. You can link to a
362
-
specific executable within the virtual environment. At this point we also recommend
363
-
renaming `doxygen` to `doxygen-1.8.20` within `/usr/local/bin`.
354
+
The makefile for doxygen attempts to install the compiled version into /usr/local/bin.
355
+
You can link to a specific executable within the virtual environment. At this point we
356
+
also recommend renaming `doxygen` to `doxygen-1.8.20` within `/usr/local/bin`.
357
+
358
+
NOTE: The makefile for the documentation framework will attempt to compile a local doxygen
359
+
binary of version 1.8.13 if a binary cannot be found in the `$PATH`.
364
360
365
361
#### Testing
366
362
367
-
Currently, the majority of testing has been done with the following versions:
363
+
A lot of manual testing has been completed using the following versions:
368
364
* 1.8.13
365
+
* 1.8.14
369
366
* 1.8.19
367
+
* 1.8.20
370
368
371
369
### Read the Docs
372
370
@@ -383,56 +381,6 @@ See Sphinx run options below. We capture up to three logfiles for RTD. The mai
383
381
Logfiles were renamed to `*.txt` to allow easier access and viewing from most websites.
384
382
Most websites force download of `*.log` files.
385
383
386
-
### python3 virtual enviroment
387
-
388
-
Setup a virtual environment for processing:
389
-
390
-
```bash
391
-
python3 -m venv venv/mom6Doc
392
-
source venv/mom6Doc/bin/activate
393
-
# cd to the docs directory within the MOM6 repo
394
-
pip3 install -r requirements.txt
395
-
```
396
-
397
-
The `deactivate` command allows you to exit from the virtual environment.
398
-
399
-
NOTE: RTD will not upgrade the sphinx module if `#egg=` is specified in the `requirements.txt` file.
400
-
401
-
### debugging
402
-
403
-
A useful commnad line tool for debugging sphinx and extensions is the python debugger.
404
-
Add the following line to stop to any portion of the python code to create a break
405
-
point.
406
-
407
-
```python
408
-
import pdb; pdb.set_trace()
409
-
```
410
-
411
-
Run `make html` without redirection to a log file.
412
-
413
-
For only processing .dox files, run
414
-
`make clean; make html DOXYGEN_CONF=Doxyfile_rtd_dox UPDATEHTMLEQS=Y`
415
-
416
-
## Example execution
417
-
418
-
The following example assumes a virtual environment as setup above using `mom6Doc`.
419
-
The same environment is possible using anaconda.
420
-
421
-
```
422
-
$ source venv/mom6Doc/bin/activate
423
-
(mom6Doc) $ cd docs
424
-
(mom6Doc) $ make clean
425
-
(mom6Doc) $ make html >& _build/html_log.txt
426
-
(mom6Doc) $ make latexpdf >& _build/latex_log.txt
427
-
```
428
-
429
-
The last command may appear to hang. On error, latex will request input from the keyboard.
430
-
Press `R` and enter. This will keep latex running to completion or stop after 100 errors
431
-
are reached.
432
-
433
-
Once the documentation is built, you can use a web browser to look around in the `_build`
434
-
directory.
435
-
436
384
# Credits
437
385
438
386
## 2020
@@ -442,10 +390,10 @@ to process the MOM6 documentation. The versions are tagged and placed into the
0 commit comments