Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --schema-file option to internal drivers #592

Merged
merged 34 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
eaed5d5
WIP
maddenp-noaa Aug 25, 2024
72d3c9f
Move cdeps.rst down
maddenp-noaa Aug 25, 2024
a5194ac
Rename cdeps.rst index.rst
maddenp-noaa Aug 25, 2024
1c0d717
Remove cdeps/ prefix
maddenp-noaa Aug 25, 2024
c671c47
Move .rst files down
maddenp-noaa Aug 25, 2024
88fd138
Update index.rst
maddenp-noaa Aug 25, 2024
93f86f6
Remove drivername/ prefixes
maddenp-noaa Aug 25, 2024
3bcae52
WIP
maddenp-noaa Aug 25, 2024
3e2631c
DRY out help examples
maddenp-noaa Aug 25, 2024
24e14af
WIP
maddenp-noaa Aug 25, 2024
9cbbdac
WIP
maddenp-noaa Aug 25, 2024
0b13be9
WIP
maddenp-noaa Aug 25, 2024
7db88e9
Doc update
maddenp-noaa Aug 25, 2024
0c1b873
Add unit test
maddenp-noaa Aug 25, 2024
f45178e
Merge branch 'main' into schema-file-all-drivers
maddenp-noaa Aug 26, 2024
883d3d1
Debug logging in bundle()
maddenp-noaa Aug 26, 2024
effacd0
Use 'internal' instead of 'built-in'
maddenp-noaa Aug 26, 2024
a93b6ad
get_schema_file() -> get_internal_schema_file()
maddenp-noaa Aug 26, 2024
95c4a65
get_internal_schema_file() -> internal_schema_file()
maddenp-noaa Aug 26, 2024
b4a1ebc
Better logging about config validation
maddenp-noaa Aug 26, 2024
a5584d0
WIP
maddenp-noaa Aug 26, 2024
cc738a2
WIP
maddenp-noaa Aug 26, 2024
656ef27
WIP
maddenp-noaa Aug 26, 2024
7c6ce27
Clarify Rocoto XML validation message
maddenp-noaa Aug 26, 2024
65b1d7d
Doc updates
maddenp-noaa Aug 26, 2024
fc20034
Do not print path to internal schemas
maddenp-noaa Aug 26, 2024
f10cbd5
Make Assets.namelist_schema() public
maddenp-noaa Aug 26, 2024
56c49b1
Let namelist_schema() use external schema if provided
maddenp-noaa Aug 26, 2024
45f5526
Update unit test
maddenp-noaa Aug 27, 2024
0ad68c8
Merge branch 'main' into schema-file-all-drivers
maddenp-noaa Aug 27, 2024
b365c41
Move orog.rst -> orog/index.rst
maddenp-noaa Aug 27, 2024
de0d5e8
Update docs
maddenp-noaa Aug 27, 2024
770e649
Update docs
maddenp-noaa Aug 27, 2024
7ce437a
Improve docstrings
maddenp-noaa Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
autodoc_mock_imports = ["f90nml", "iotaa", "jsonschema", "lxml", "referencing"]
autodoc_typehints = "description"
copyright = str(dt.datetime.now().year)
exclude_patterns = ["**/shared/*.rst"]
maddenp-noaa marked this conversation as resolved.
Show resolved Hide resolved
extensions = ["sphinx.ext.autodoc", "sphinx.ext.extlinks", "sphinx.ext.intersphinx"]
extlinks_detect_hardcoded_links = True
html_logo = os.path.join("static", "ufs.png")
Expand Down
2 changes: 1 addition & 1 deletion docs/sections/user_guide/cli/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d)
SUBDIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d | sort)

maddenp-noaa marked this conversation as resolved.
Show resolved Hide resolved
.PHONY: all $(SUBDIRS)

Expand Down
1 change: 0 additions & 1 deletion docs/sections/user_guide/cli/drivers/Makefile
maddenp-noaa marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

8 changes: 8 additions & 0 deletions docs/sections/user_guide/cli/drivers/Makefile
maddenp-noaa marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUBDIRS = $(filter-out ./shared,$(shell find . -maxdepth 1 -mindepth 1 -type d | sort))

.PHONY: all $(SUBDIRS)

all: $(SUBDIRS)

$(SUBDIRS):
$(MAKE) -C $@ -j
1 change: 1 addition & 0 deletions docs/sections/user_guide/cli/drivers/cdeps/help.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
``cdeps``
=========

.. include:: /shared/idempotent.rst
.. include:: ../shared/idempotent.rst
maddenp-noaa marked this conversation as resolved.
Show resolved Hide resolved

The ``uw`` mode for configuring and running the :CDEPS:`cdeps<>` component.

.. literalinclude:: cdeps/help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: cdeps/help.out
:language: text

All tasks take the same arguments. For example:

.. literalinclude:: cdeps/run-help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: cdeps/run-help.out
:language: text
maddenp-noaa marked this conversation as resolved.
Show resolved Hide resolved
.. include:: help.rst

Examples
^^^^^^^^
Expand Down Expand Up @@ -45,10 +33,4 @@ Its contents are described in depth in section :ref:`cdeps_yaml`. Each of the va

.. include:: /shared/key_path.rst

* Specifying the ``--show-schema`` flag, with no other options, prints the driver's schema:

.. literalinclude:: cdeps/show-schema.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: cdeps/show-schema.out
:language: text
.. include:: schema-options.rst
4 changes: 3 additions & 1 deletion docs/sections/user_guide/cli/drivers/cdeps/run-help.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: uw cdeps atm --cycle CYCLE [-h] [--version] [--config-file PATH]
[--dry-run] [--graph-file PATH] [--key-path KEY[.KEY...]]
[--quiet] [--verbose]
[--schema-file PATH] [--quiet] [--verbose]

The data atmosphere configuration with all required content

Expand All @@ -22,6 +22,8 @@ Optional arguments:
--key-path KEY[.KEY...]
Dot-separated path of keys leading through the config to the driver's
configuration block
--schema-file PATH
Path to schema file to use for validation
--quiet, -q
Print no logging messages
--verbose, -v
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
``chgres_cube``
===============

.. include:: /shared/idempotent.rst
.. include:: ../shared/idempotent.rst

The ``uw`` mode for configuring and running the :ufs-utils:`chgres_cube<chgres-cube>` component.

.. literalinclude:: chgres_cube/help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: chgres_cube/help.out
:language: text

All tasks take the same arguments. For example:

.. literalinclude:: chgres_cube/run-help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: chgres_cube/run-help.out
:language: text
.. include:: help.rst

Examples
^^^^^^^^
Expand Down Expand Up @@ -59,10 +47,4 @@ Its contents are described in depth in section :ref:`chgres_cube_yaml`. Each of

$ uw chgres_cube provisioned_rundir --config-file config.yaml --cycle 2023-12-15T18 --batch

* Specifying the ``--show-schema`` flag, with no other options, prints the driver's schema:

.. literalinclude:: chgres_cube/show-schema.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: chgres_cube/show-schema.out
:language: text
.. include:: schema-options.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
usage: uw chgres_cube run --cycle CYCLE [-h] [--version] [--config-file PATH]
[--batch] [--dry-run] [--graph-file PATH]
[--key-path KEY[.KEY...]] [--quiet] [--verbose]
[--key-path KEY[.KEY...]] [--schema-file PATH]
[--quiet] [--verbose]

A run

Expand All @@ -24,6 +25,8 @@ Optional arguments:
--key-path KEY[.KEY...]
Dot-separated path of keys leading through the config to the driver's
configuration block
--schema-file PATH
Path to schema file to use for validation
--quiet, -q
Print no logging messages
--verbose, -v
Expand Down
1 change: 1 addition & 0 deletions docs/sections/user_guide/cli/drivers/esg_grid/help.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
``esg_grid``
============

.. include:: /shared/idempotent.rst
.. include:: ../shared/idempotent.rst

The ``uw`` mode for configuring and running the :ufs-utils:`regional_esg_grid<regional-esg-grid>` component.

.. literalinclude:: esg_grid/help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: esg_grid/help.out
:language: text

All tasks take the same arguments. For example:

.. literalinclude:: esg_grid/run-help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: esg_grid/run-help.out
:language: text
.. include:: help.rst

Examples
^^^^^^^^
Expand Down Expand Up @@ -59,10 +47,4 @@ The driver creates a ``runscript.esg_grid`` file in the directory specified by `

$ uw esg_grid provisioned_rundir --config-file config.yaml --batch

* Specifying the ``--show-schema`` flag, with no other options, prints the driver's schema:

.. literalinclude:: esg_grid/show-schema.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: esg_grid/show-schema.out
:language: text
.. include:: schema-options.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
usage: uw esg_grid run [-h] [--version] [--config-file PATH] [--batch]
[--dry-run] [--graph-file PATH]
[--key-path KEY[.KEY...]] [--quiet] [--verbose]
[--key-path KEY[.KEY...]] [--schema-file PATH]
[--quiet] [--verbose]

A run

Expand All @@ -20,6 +21,8 @@ Optional arguments:
--key-path KEY[.KEY...]
Dot-separated path of keys leading through the config to the driver's
configuration block
--schema-file PATH
Path to schema file to use for validation
--quiet, -q
Print no logging messages
--verbose, -v
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
``filter_topo``
===============

.. include:: /shared/idempotent.rst
.. include:: ../shared/idempotent.rst

The ``uw`` mode for configuring and running the UFS Utils preprocessing component ``filter_topo``. Documentation for this UFS Utils component is :ufs-utils:`here <filter-topo>`.

.. literalinclude:: filter_topo/help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: filter_topo/help.out
:language: text

All tasks take the same arguments. For example:

.. literalinclude:: filter_topo/run-help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: filter_topo/run-help.out
:language: text
.. include:: help.rst

Examples
^^^^^^^^
Expand Down Expand Up @@ -53,10 +41,4 @@ Its contents are described in section :ref:`filter_topo_yaml`.

.. include:: /shared/key_path.rst

* Specifying the ``--show-schema`` flag, with no other options, prints the driver's schema:

.. literalinclude:: filter_topo/show-schema.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: filter_topo/show-schema.out
:language: text
.. include:: schema-options.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
usage: uw filter_topo run [-h] [--version] [--config-file PATH] [--batch]
[--dry-run] [--graph-file PATH]
[--key-path KEY[.KEY...]] [--quiet] [--verbose]
[--key-path KEY[.KEY...]] [--schema-file PATH]
[--quiet] [--verbose]

A run

Expand All @@ -20,6 +21,8 @@ Optional arguments:
--key-path KEY[.KEY...]
Dot-separated path of keys leading through the config to the driver's
configuration block
--schema-file PATH
Path to schema file to use for validation
--quiet, -q
Print no logging messages
--verbose, -v
Expand Down
1 change: 1 addition & 0 deletions docs/sections/user_guide/cli/drivers/fv3/help.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
``fv3``
=======

.. include:: /shared/idempotent.rst
.. include:: ../shared/idempotent.rst

The ``uw`` mode for configuring and running FV3.

.. literalinclude:: fv3/help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: fv3/help.out
:language: text

All tasks take the same arguments. For example:

.. literalinclude:: fv3/run-help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: fv3/run-help.out
:language: text
.. include:: help.rst

Examples
^^^^^^^^
Expand Down Expand Up @@ -54,10 +42,4 @@ The examples use a configuration file named ``config.yaml``. Its contents are de

$ uw fv3 provisioned_rundir --config-file config.yaml --cycle 2024-02-11T12 --batch

* Specifying the ``--show-schema`` flag, with no other options, prints the driver's schema:

.. literalinclude:: fv3/show-schema.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: fv3/show-schema.out
:language: text
.. include:: schema-options.rst
2 changes: 2 additions & 0 deletions docs/sections/user_guide/cli/drivers/fv3/run-help.out
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Optional arguments:
--key-path KEY[.KEY...]
Dot-separated path of keys leading through the config to the driver's
configuration block
--schema-file PATH
Path to schema file to use for validation
--quiet, -q
Print no logging messages
--verbose, -v
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
``global_equiv_resol``
======================

.. include:: /shared/idempotent.rst
.. include:: ../shared/idempotent.rst

The ``uw`` mode for configuring and running the UFS Utils preprocessing component ``global_equiv_resol``. Documentation for this UFS Utils component is :ufs-utils:`here <global-equiv-resol>`.

.. literalinclude:: global_equiv_resol/help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: global_equiv_resol/help.out
:language: text

All tasks take the same arguments. For example:

.. literalinclude:: global_equiv_resol/run-help.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: global_equiv_resol/run-help.out
:language: text
.. include:: help.rst

Examples
^^^^^^^^
Expand Down Expand Up @@ -53,10 +41,4 @@ Its contents are described in section :ref:`global_equiv_resol_yaml`.

.. include:: /shared/key_path.rst

* Specifying the ``--show-schema`` flag, with no other options, prints the driver's schema:

.. literalinclude:: global_equiv_resol/show-schema.cmd
:language: text
:emphasize-lines: 1
.. literalinclude:: global_equiv_resol/show-schema.out
:language: text
.. include:: schema-options.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
usage: uw global_equiv_resol run [-h] [--version] [--config-file PATH]
[--batch] [--dry-run] [--graph-file PATH]
[--key-path KEY[.KEY...]] [--quiet]
[--verbose]
[--key-path KEY[.KEY...]]
[--schema-file PATH] [--quiet] [--verbose]

A run

Expand All @@ -21,6 +21,8 @@ Optional arguments:
--key-path KEY[.KEY...]
Dot-separated path of keys leading through the config to the driver's
configuration block
--schema-file PATH
Path to schema file to use for validation
--quiet, -q
Print no logging messages
--verbose, -v
Expand Down
Loading
Loading