@@ -22,7 +22,7 @@ The {py:meth}`mpas_tools.config.MpasConfigParser.add_from_package()` method can
2222be used to add the contents of a config file within a package to the config
2323options. Examples of this can be found in many tasks as well as in the
2424` polaris.setup ` module. Here is a typical example from
25- {py: class }` polaris.ocean. tasks.inertial_gravity_wave.InertialGravityWave ` :
25+ {py: class }` polaris.tasks.ocean .inertial_gravity_wave.InertialGravityWave ` :
2626
2727``` python
2828from polaris import Task
@@ -33,11 +33,11 @@ class InertialGravityWave(Task):
3333 name = ' inertial_gravity_wave'
3434 subdir = f ' planar/ { name} '
3535 super ().__init__ (component = component, name = name, subdir = subdir)
36-
36+
3737 ...
3838
3939 self .config.add_from_package(
40- ' polaris.ocean. tasks.inertial_gravity_wave' ,
40+ ' polaris.tasks.ocean .inertial_gravity_wave' ,
4141 ' inertial_gravity_wave.cfg' )
4242```
4343
@@ -48,8 +48,8 @@ the file is in the path `polaris/ocean/tasks/baroclinic_channel`
4848that the config file should always exist, so we would like the code to raise
4949an exception (` exception=True ` ) if the file is not found. This is the
5050default behavior. In some cases, you would like the code to add the config
51- options if the config file exists and do nothing if it does not. In this
52- example from {py: func }` polaris.setup.setup_task() ` , there may not be a config
51+ options if the config file exists and do nothing if it does not. In this
52+ example from {py: func }` polaris.setup.setup_task() ` , there may not be a config
5353file for the particular machine we're on, and that's fine:
5454
5555``` python
@@ -81,30 +81,30 @@ of functions (`range()`, {py:meth}`numpy.linspace()`,
8181
8282## Shared config files
8383
84- Often, it makes sense for many tasks and steps to share the same config
84+ Often, it makes sense for many tasks and steps to share the same config
8585options. The default behavior is for a task and its "owned" steps to share
86- a config file in the task's work directory called ` {task.name}.cfg ` and
86+ a config file in the task's work directory called ` {task.name}.cfg ` and
8787symlinks with that same name in each step's work directory. The default for
8888a shared step is to have its own ` {step.name}.cfg ` in its work directory.
8989
9090Developers can create shared config parsers that define the location of the
9191shared config file and add them to tasks and steps using
92- {py: meth }` polaris.Task.set_shared_config() ` and
92+ {py: meth }` polaris.Task.set_shared_config() ` and
9393{py: meth }` polaris.Step.set_shared_config() ` . The location of the shared
9494config file should be intuitive to users but local symlinks will also make
9595it easy to modify the shared config options from within any of the tasks and
9696steps that use them.
9797
98- As an example, the baroclinic channel tasks share a single
98+ As an example, the baroclinic channel tasks share a single
9999` baroclinic_channel.cfg ` config file for each resolution that resides in the
100100resolution's work directory:
101101
102102``` python
103103from polaris.config import PolarisConfigParser
104104from polaris.ocean.resolution import resolution_to_subdir
105- from polaris.ocean. tasks.baroclinic_channel.default import Default
106- from polaris.ocean. tasks.baroclinic_channel.init import Init
107- from polaris.ocean. tasks.baroclinic_channel.rpe import Rpe
105+ from polaris.tasks.ocean .baroclinic_channel.default import Default
106+ from polaris.tasks.ocean .baroclinic_channel.init import Init
107+ from polaris.tasks.ocean .baroclinic_channel.rpe import Rpe
108108
109109
110110def add_baroclinic_channel_tasks (component ):
@@ -114,7 +114,7 @@ def add_baroclinic_channel_tasks(component):
114114
115115 config_filename = ' baroclinic_channel.cfg'
116116 config = PolarisConfigParser(filepath = f ' { resdir} / { config_filename} ' )
117- config.add_from_package(' polaris.ocean. tasks.baroclinic_channel' ,
117+ config.add_from_package(' polaris.tasks.ocean .baroclinic_channel' ,
118118 ' baroclinic_channel.cfg' )
119119
120120 init = Init(component = component, resolution = resolution, indir = resdir)
@@ -126,7 +126,7 @@ def add_baroclinic_channel_tasks(component):
126126 component.add_task(default)
127127
128128 ...
129-
129+
130130 component.add_task(Rpe(component = component, resolution = resolution,
131131 indir = resdir, init = init, config = config))
132132```
@@ -140,8 +140,8 @@ added as follows:
140140
141141``` python
142142from polaris import Task
143- from polaris.ocean. tasks.baroclinic_channel.forward import Forward
144- from polaris.ocean. tasks.baroclinic_channel.rpe.analysis import Analysis
143+ from polaris.tasks.ocean .baroclinic_channel.forward import Forward
144+ from polaris.tasks.ocean .baroclinic_channel.rpe.analysis import Analysis
145145
146146
147147class Rpe (Task ):
@@ -171,7 +171,7 @@ class Rpe(Task):
171171 resolution = resolution, nu = nu)
172172
173173 step.add_yaml_file(
174- ' polaris.ocean. tasks.baroclinic_channel.rpe' ,
174+ ' polaris.tasks.ocean .baroclinic_channel.rpe' ,
175175 ' forward.yaml' )
176176 self .add_step(step)
177177
0 commit comments