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
[develop]: Add GitHub Actions to check that Technical Docs are up-to-date (#1152)
* Adds a GitHub Actions workflow & script to check whether the Technical Documentation is up-to-date
* Turns on the -W flag so that documentation build warnings register as error
* Updates the requirements file so that --remove-old flag can be used to check Tech Docs
* Updates the Contributor's Guide w/information on Technical Documentation and troubleshooting guidelines
* Fixes a few broken links.
Copy file name to clipboardexpand all lines: doc/ContribGuide/documentation.rst
+51-1
Original file line number
Diff line number
Diff line change
@@ -69,4 +69,54 @@ Please follow these guidelines when contributing to the documentation:
69
69
70
70
.. code-block:: python
71
71
72
-
n = 88
72
+
n = 88
73
+
74
+
Troubleshooting Documentation
75
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
+
77
+
In the SRW App documentation Makefile (``ufs-srweather-app/doc/Makefile``), the ``-W`` option causes documentation builds to fail when there are errors or warnings in the build.
78
+
This ensures that the documentation remains up-to-date and notifies developers of any new issues (like failing links). However, the build will fail when it hits the first error without showing subsequent errors.
79
+
When troubleshooting, it can be useful to see all warnings and errors.
80
+
To see all warnings and errors, comment out the ``-W`` flag in ``SPHINXOPTS`` in the Makefile and build the documentation by running ``make doc`` from the ``doc`` directory.
81
+
82
+
Technical Documentation Guidelines
83
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
+
85
+
Technical (API-like) documentation is generated for any Python scripts in the ``ush`` or ``tests/WE2E`` directories.
86
+
When developers change Python files in these directories, they need to update the Python docstrings (i.e., comments in ``"""triple quotes"""``) to reflect the changes they made.
87
+
Each Python script should include:
88
+
89
+
* A summary of the script's purpose/functionality
90
+
91
+
* Should start with a verb, e.g., "checks" or "loads" or "initializes"
92
+
93
+
* Docstrings for each method (except methods like ``_parse_args`` that start with an underscore). These docstrings should include:
94
+
95
+
* A description of what the method does (starting with a verb, e.g., "checks" or "parses")
96
+
* A list of method parameters, or ``Args:``, with a definition and expected data type for each
97
+
* A return statement (``Returns:``) -- if applicable
98
+
* List of exceptions (``Raises:``) -- if applicable
99
+
100
+
.. note::
101
+
102
+
Python does not have truly private methods, but methods that start with an underscore are the closest equivalent. In the SRW App, the underscore signals that this method is only accessed by the script within which it is called.
103
+
104
+
After updating the docstrings, developers need to update the corresponding RST files.
105
+
To do this successfully, developers must have *sphinx>=7.4.0* installed on their system. To update the RST files, run:
Developers who do not have *sphinx>=7.4.0* installed may issue the following commands from ``ufs-srweather-app/doc/TechDoc`` before running the sphinx-apidoc commands above:
116
+
117
+
.. code-block:: console
118
+
119
+
rm -rf ush
120
+
rm -rf tests/WE2E
121
+
122
+
This will delete current RST files before recreating them with the ``sphinx-apidoc`` command based on the current contents of ``ush`` and ``tests/WE2E``. This step is necessary because the ``--remove-old`` flag does not work with earlier versions of sphinx.
Copy file name to clipboardexpand all lines: doc/UsersGuide/BuildingRunningTesting/VXCases.rst
+2-1
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,8 @@ Point STAT Files
262
262
263
263
The Point-Stat files contain continuous variables like temperature, pressure, and wind speed. A description of the Point-Stat file can be found :ref:`here <met:point-stat>` in the MET documentation.
264
264
265
-
The Point-Stat files contain a potentially overwhelming amount of information. Therefore, it is recommended that users focus on the CNT MET test, which contains the `RMSE <https://metplus.readthedocs.io/projects/met/en/latest/Users_Guide/appendixC.html#root-mean-squared-error-rmse>`_ and `MBIAS <https://metplus.readthedocs.io/projects/met/en/latest/Users_Guide/appendixC.html#multiplicative-bias>`_ statistics. The MET tests are defined in column 24 'LINE_TYPE' of the ``.stat`` file. Look for 'CNT' in this column. Then find column 66-68 for MBIAS and 78-80 for RMSE statistics. A full description of this file can be found :ref:`here <met:point_stat-output>`.
265
+
The Point-Stat files contain a potentially overwhelming amount of information. Therefore, it is recommended that users focus on the CNT MET test, which contains the Root Mean Squared Error (`RMSE <https://metplus.readthedocs.io/en/latest/Users_Guide/statistics_list.html#statistics-list-p-r>`_) and Magnitude &
266
+
Multiplicative bias (`MBIAS <https://metplus.readthedocs.io/en/latest/Users_Guide/statistics_list.html#statistics-list-g-m>`_) statistics. The MET tests are defined in column 24 'LINE_TYPE' of the ``.stat`` file. Look for 'CNT' in this column. Then find column 66-68 for MBIAS and 78-80 for RMSE statistics. A full description of this file can be found :ref:`here <met:point_stat-output>`.
266
267
267
268
To narrow down the variable field even further, users can focus on these weather variables:
Copy file name to clipboardexpand all lines: doc/UsersGuide/CustomizingTheWorkflow/DefineWorkflow.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Defining an SRW App Workflow
6
6
7
7
Many predefined workflows with optional variants exist within the Short-Range Weather Application, but the Application also includes the ability to define a new workflow from scratch. This functionality allows users to add tasks to the workflow to meet their scientific exploration needs.
8
8
9
-
Rocoto is the primary workflow manager software used by the UFS SRW App. Rocoto workflows are defined in an XML file (``FV3LAM_wflow.xml``) based on parameters set during experiment generation. This section explains how the Rocoto XML is built using a Jinja2 template (`Jinja docs here <https://jinja.palletsprojects.com/en/3.1.x/templates/>`__) and structured YAML files. The YAML follows the requirements in the `Rocoto documentation <http://christopherwharrop.github.io/rocoto/>`__ with a few exceptions or additions outlined in this documentation.
9
+
Rocoto is the primary workflow manager software used by the UFS SRW App. Rocoto workflows are defined in an XML file (``FV3LAM_wflow.xml``) based on parameters set during experiment generation. This section explains how the Rocoto XML is built using a Jinja2 template (`Jinja docs here <https://jinja.palletsprojects.com/en/stable/templates>`_) and structured YAML files. The YAML follows the requirements in the `Rocoto documentation <http://christopherwharrop.github.io/rocoto/>`__ with a few exceptions or additions outlined in this documentation.
0 commit comments