Skip to content

Commit

Permalink
Feature 898 headers (#2389)
Browse files Browse the repository at this point in the history
* changing _ to - for header consistency

* changing _ to - for header consistency

* updating all headers for consistency

* updating all headers for consistency and adding spacing

The spacing doesn't seem to be required but it is the convention that we follow for headers.

* updating all headers for consistency

* updating headers for consistency and adding capital letters to  headers

* Using the overline ### to keep index consistent with other indexes

* updating all headers for consistency

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* updating all headers and some spacing for consistency

* updating headers for consistency

* changing to ### for consistency

* Per #898, fixed the headers for the Release Guide part, chapters, and sections.

* Duplicating changes in develop branch for requirements.txt file

* updating headers

* Per #2669, updated header formatting to resolve errors

* Per #2669, udpating header

* Per #2669, udpating headers

* Per #2669, udpating header

* Per #2669, updated header formatting

* Per #2669, update header formatting

* updating headers

* Per #898, removed space in front of title

* Capitalizing Please

* changing to just italics to match standard formatting

* indenting for consistent formatting

* fixing italics again

* changing from note to warning for consistency

* updating headers, adding some capitalizing to the headers

* fixing typo

Co-authored-by: George McCabe <[email protected]>

* This file was committed but never updated or used

Per Minna, ok to delete.

* Restructuring table of contents to make it more clear which guides are for users and which are for contributors

* fixing formatting for clairity

Co-authored-by: Julie Prestopnik <[email protected]>

---------

Co-authored-by: George McCabe <[email protected]>
Co-authored-by: Julie Prestopnik <[email protected]>
  • Loading branch information
3 people authored Oct 25, 2023
1 parent 72a57b3 commit 5dca7d4
Show file tree
Hide file tree
Showing 127 changed files with 282 additions and 289 deletions.
23 changes: 12 additions & 11 deletions docs/Contributors_Guide/conda_env.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.. _conda_env:

**************************************
Instructions for the Conda Environment
======================================
**************************************

Overview: Replicating the Python 3.6.3 environment for running METplus
_______________________________________________________________________
Overview: Replicating the Python 3.6.3 environment for Running METplus
=======================================================================

If the host (i.e. the computer on which the METplus and MET tools are
running) doesn't already have all the necessary packages installed, it is
Expand All @@ -19,8 +20,8 @@ METplus source code:

*METplus/environment.yml*

Pre-condition- installing the conda package manager if it doesn't exist
_______________________________________________________________________
Pre-condition- Installing the Conda Package Manager If It Doesn't Exist
=======================================================================

**These instructions only need to be followed once.**

Expand Down Expand Up @@ -72,7 +73,7 @@ _______________________________________________________________________


Creating the METplus conda env
______________________________
==============================

**These instructions only need to be implemented once.**

Expand Down Expand Up @@ -127,8 +128,8 @@ to end the application.
conda deactivate
Activating and deactivating the METplus conda env
_________________________________________________
Activating and Deactivating the METplus conda env
=================================================

Once the user has followed the instructions under the "Creating the METplus
conda env", follow these instructions to start running METplus :
Expand Down Expand Up @@ -163,8 +164,8 @@ conda env", follow these instructions to start running METplus :



Optional: Checking for missing packages and mismatched version
______________________________________________________________
Optional: Checking for Missing Packages and Mismatched Version
==============================================================

To check for missing and mismatched packages run the **check_python.py**
script in the METplus directory:
Expand Down Expand Up @@ -192,7 +193,7 @@ The results are sent to stdout (screen) and three files are created:


Link Conda Directory to Data Disk (RAL Linux Machines)
______________________________________________________
======================================================

By default, Conda environments are stored in a directory called ".conda" that is found in the user's home directory, i.e. /home/user/.conda (Note that the dot at the beginning of the directory name is a hidden directory that does not always show up in a directory listing). Conda environments can take up a lot of disk space which can quickly fill up the /home disk. It is recommended that you create a directory on a data disk that has more disk space and create a symbolic link from the .conda directory so the environments will be stored on the data disk. Keep in mind that deleting the directory on the data disk will delete all of your conda environments and they cannot be easily recovered.

Expand Down
31 changes: 16 additions & 15 deletions docs/Contributors_Guide/create_wrapper.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
***************************
How to Create a New Wrapper
===========================
***************************

Naming
------
======

File Name
^^^^^^^^^
---------

Create the new wrapper in the *metplus/wrappers* directory and
name it to reflect the wrapper's function, e.g.: new_tool_wrapper.py is
a wrapper around an application named "new_tool."
Copy the **example_wrapper.py** to start the process.

Class Name
^^^^^^^^^^
----------

The name of the class should match the wrapper's function without underscores
and with the first letter of each word capitalized followed by "Wrapper."
For example, the new_tool wrapper would be named **NewToolWrapper**.

Add Entry to LOWER_TO_WRAPPER_NAME Dictionary
---------------------------------------------
=============================================

In *metplus/util/constants.py*, add entries to the LOWER_TO_WRAPPER_NAME
dictionary so that the wrapper can be found in the PROCESS_LIST even if
Expand Down Expand Up @@ -57,12 +58,12 @@ More than one entry is rarely needed, but
they will not hurt anything as long as they do not cause any conflicts.

Wrapper Components
------------------
==================

Open the wrapper file for editing the new class.

Naming
^^^^^^
------

Rename the class to match the wrapper's class from the above sections.
Most wrappers should be a subclass of the RuntimeFreqWrapper::
Expand All @@ -80,7 +81,7 @@ To create EnsembleStat wrapper from GridStat, replace
**GridStat** with **EnsembleStat**.

Parent Class
^^^^^^^^^^^^
------------

If the new tool falls under one of the existing tool categories,
then make the tool a subclass of one of the existing classes.
Expand All @@ -91,15 +92,15 @@ See :ref:`bc_class_hierarchy` for more information on existing classes to
determine which class to use as the parent class.

Class Variables for Runtime Frequency
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------------------------------

**RUNTIME_FREQ_DEFAULT** and **RUNTIME_FREQ_SUPPORTED** should be set for all
wrappers that inherit from **RuntimeFreqWrapper**.

See :ref:`bc_class_vars` for more information.

Init Function
^^^^^^^^^^^^^
-------------

Modify the init function to initialize NewTool from its base class
to set the self.app_name variable to the name of the application.
Expand All @@ -114,7 +115,7 @@ See the Basic Components :ref:`bc_init_function` section for more information::
super().__init__(config, instance=instance)

Read Configuration Variables
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
----------------------------

The create_c_dict function is called during the initialization step of each
wrapper. It is where values from the self.config object are read.
Expand All @@ -132,13 +133,13 @@ The function should also always return the c_dict variable::
return c_dict

File Input/Output
"""""""""""""""""
^^^^^^^^^^^^^^^^^

METplus configuration variables that end with _DIR and _TEMPLATE are used
to define the criteria to search for input files.

Allow Multiple Files
""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^

If the application can take more than one file as input for a given category
(i.e. FCST, OBS, ENS, etc.) then ALLOW_MULTIPLE_FILES must be set to True::
Expand All @@ -151,7 +152,7 @@ If it is set to False and a list of files are found for an input
then the wrapper will produce an error and not build the command.

Run Functions
^^^^^^^^^^^^^
-------------

* The **run_at_time_once** function or some the functions that it calls will
need to be overridden in the wrapper.
Expand Down Expand Up @@ -240,7 +241,7 @@ Refer to the :ref:`basic_components_of_wrappers` section of the Contributor's
Guide for more information on what should be added.

Documentation
-------------
=============

* Add a section for the new wrapper in the 'Python Wrappers' section of the
User's Guide. This includes a list of all configuration variables specific
Expand Down
9 changes: 6 additions & 3 deletions docs/Contributors_Guide/deprecation.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
**********************************
Deprecating an Old Config Variable
==================================
**********************************

If a config variable changes names, an alert is needed to let
the user know that they need to update the config files if they
are using a deprecated variable.

Example
-------
=======

::

[exe]
Expand All @@ -25,7 +27,8 @@ read and the user will have no way to know that they are setting the
wrong variable and it is using WGRIB2 = wgrib2.

check_for_deprecated_config()
-----------------------------
=============================

In **metplus/util/constants.py** there is a dictionary called
DEPRECATED_DICT that specifies the old config name as the key.
The value is a dictionary of info that is used to help users update their
Expand Down
27 changes: 14 additions & 13 deletions docs/Contributors_Guide/documentation.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
*************
Documentation
=============
*************

Viewing METplus documentation
_____________________________
=============================

The METplus documentation (beginning with version 3.0) is available
`online <https://metplus.readthedocs.io/>`_.


Doxygen Source Code Documentation
_________________________________
=================================

The source code documentation is coming soon.


Documentation Overview
______________________
======================

The majority of the documentation is created using the Sphinx documentation
generator tool, which was originally created for Python documentation.
Expand All @@ -37,7 +38,7 @@ Contributor's Guide.


Description of Documentation Directories
________________________________________
========================================

Core documentation is divided into four sections: User's Guide, Contributor's
Guide, Release Guide, and Verification Datasets Guide all of which reside
Expand All @@ -61,7 +62,7 @@ section for more information on documenting a new use case.


Adding New Documentation
________________________
========================

To determine where to add new documentation:

Expand All @@ -81,7 +82,7 @@ To determine where to add new documentation:


User's Guide:
~~~~~~~~~~~~~
-------------

* To add/modify any content that affects METplus users.
* Modify any of the affected sections from the
Expand All @@ -94,7 +95,7 @@ User's Guide:
* **wrappers.rst** (METplus wrappers)

Contributor's Guide:
~~~~~~~~~~~~~~~~~~~~
--------------------

* To add/modify any content that affects METplus contributors.
* Modify any of the affected sections from the
Expand All @@ -118,7 +119,7 @@ Contributor's Guide:
wrapper code)

Release Guide:
~~~~~~~~~~~~~~
--------------

* To add/modify the instructions for creating software releases for
any METplus component, including official, bugfix, and development
Expand Down Expand Up @@ -154,7 +155,7 @@ Release Guide:


Verification Datasets Guide:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------

* To add/modify any relevant datasets in an attempt to create a
centralized catalog of verification datasets to provide the model
Expand All @@ -165,7 +166,7 @@ Verification Datasets Guide:
.. _read-the-docs:

Read the Docs METplus Documentation
___________________________________
===================================

The METplus components use `Read the Docs <https://docs.readthedocs.io/>`_ to
build and display the documentation. Read the Docs simplifies the
Expand Down Expand Up @@ -217,7 +218,7 @@ Documentation for each METplus component can be found at the links below:


Building Sphinx Documentation Manually
______________________________________
======================================

Documentation does not have to be built manually as it is automatically
generated by Read The Docs. See the
Expand Down Expand Up @@ -259,7 +260,7 @@ will direct to the home page of the documentation. Click on the links to
navigate to the desired information.

Relevant Documentation for Contributors
_______________________________________
=======================================

The Doxygen tool is employed to create documentation from the source code.
This documentation is useful in generating details about the METplus wrapper
Expand Down
Loading

0 comments on commit 5dca7d4

Please sign in to comment.