Skip to content

Commit ee1939f

Browse files
committed
Update the docs to use Tranche instead of MpasConfigParser
1 parent a905972 commit ee1939f

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
'python': ('https://docs.python.org', None),
7777
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
7878
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
79-
'xarray': ('https://xarray.pydata.org/en/stable', None)
79+
'xarray': ('https://xarray.pydata.org/en/stable', None),
80+
'tranche': ('https://xylar.github.io/tranche/', None),
8081
}
8182

8283
# -- MyST settings ---------------------------------------------------

docs/developers_guide/framework/config.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
# Config files
44

5-
The primary documentation for the config parser is in
6-
[MPAS-Tools config parser](http://mpas-dev.github.io/MPAS-Tools/stable/config.html).
5+
The primary documentation for the config parser is in the
6+
[tranche documentation](https://xylar.github.io/tranche/).
77
Here, we include some specific details relevant to using the
8-
{py:class}`mpas_tools.config.MpasConfigParser` in polaris.
8+
{py:class}`tranche.Tranche` in polaris.
99

1010
Here, we provide the {py:class}`polaris.config.PolarisConfigParser` that has
1111
almost the same functionality but also ensures that certain relative paths are
@@ -18,7 +18,7 @@ options) as part of setting up polaris tasks and steps. These features are
1818
included to accommodate sharing config options across shared steps and/or
1919
multiple tasks.
2020

21-
The {py:meth}`mpas_tools.config.MpasConfigParser.add_from_package()` method can
21+
The {py:meth}`tranche.Tranche.add_from_package()` method can
2222
be used to add the contents of a config file within a package to the config
2323
options. Examples of this can be found in many tasks as well as in the
2424
`polaris.setup` module. Here is a typical example from
@@ -71,11 +71,12 @@ for use by the framework rather than individual tasks.
7171
Other methods for the `MpasConfigParser` are similar to those for
7272
{py:class}`configparser.ConfigParser`. In addition to `get()`,
7373
`getinteger()`, `getfloat()` and `getboolean()` methods, this class
74-
implements {py:meth}`mpas_tools.config.MpasConfigParser.getlist()`, which
74+
implements {py:meth}`tranche.Tranche.getlist()`, which
7575
can be used to parse a config value separated by spaces and/or commas into
76-
a list of strings, floats, integers, booleans, etc. Another useful method
77-
is {py:meth}`mpas_tools.config.MpasConfigParser.getexpression()`, which can
78-
be used to get python dictionaries, lists and tuples as well as a small set
76+
a list of strings, floats, integers, booleans, etc. Other useful methods
77+
are {py:meth}`tranche.Tranche.getexpression()`, which can
78+
be used to get python dictionaries, lists, and tuples, and
79+
{py:meth}`tranche.Tranche.getnumpy()`, which also suppports a small set
7980
of functions (`range()`, {py:meth}`numpy.linspace()`,
8081
{py:meth}`numpy.arange()`, and {py:meth}`numpy.array()`)
8182

@@ -182,9 +183,10 @@ class Rpe(Task):
182183

183184
## Comments in config files
184185

185-
One of the main advantages of {py:class}`mpas_tools.config.MpasConfigParser`
186+
One of the main advantages of {py:class}`tranche.Tranche`
186187
over {py:class}`configparser.ConfigParser` is that it keeps track of comments
187188
that are associated with config sections and options.
188189

189-
See [comments in config files](http://mpas-dev.github.io/MPAS-Tools/stable/config.html#config_comments)
190-
in MPAS-Tools for more details.
190+
Comments must begin with the `#` character. They must be placed *before* the
191+
config section or option in question (preferably without blank lines between).
192+
The comments can be any number of lines long.

0 commit comments

Comments
 (0)