From f616b2b1a7c993f3b9bdd879588a6d87c163b471 Mon Sep 17 00:00:00 2001 From: Paul Madden Date: Tue, 28 Jan 2025 03:48:56 +0000 Subject: [PATCH 1/3] Tooling updates --- .github/CODEOWNERS | 2 +- format | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d24f98cf1..167df3213 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ # See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners -* @Byrnetp @NaureenBharwaniNOAA @christinaholtNOAA @elcarpenterNOAA @maddenp-noaa +* @NaureenBharwaniNOAA @christinaholtNOAA @elcarpenterNOAA @maddenp-noaa diff --git a/format b/format index 826f96323..a143e693d 100755 --- a/format +++ b/format @@ -10,6 +10,7 @@ echo "=> Running docformatter" (cd src && docformatter . || test $? -eq 3) echo "=> Running jq" -for a in $(find src -not -path "*/.*" -type f -name "*.json*"); do - b=$(jq -S . $a) && echo "$b" >$a || (echo " in $a"; false) +for f in $(find src -not -path "*/.*" -type f -name "*.json" -o -name "*.jsonschema"); do + jq -S . $f >$f.new || (echo " in $f" && rm $f.new && false) + cmp --quiet $f.new $f && rm $f.new || mv $f.new $f done From 7006742aa45860183a8df227d8cbca3e1f80751a Mon Sep 17 00:00:00 2001 From: Paul Madden Date: Tue, 28 Jan 2025 20:26:06 +0000 Subject: [PATCH 2/3] Update meta.json with == --- recipe/meta.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/recipe/meta.json b/recipe/meta.json index c6c597cb0..e3ab93adc 100644 --- a/recipe/meta.json +++ b/recipe/meta.json @@ -4,36 +4,36 @@ "name": "uwtools", "packages": { "dev": [ - "black =24.8.*", - "docformatter =1.7.*", - "f90nml =1.4.*", - "iotaa =0.8.*", - "isort =5.13.*", - "jinja2 =3.1.*", - "jq =1.7.*", + "black ==24.8.*", + "docformatter ==1.7.*", + "f90nml ==1.4.*", + "iotaa ==0.8.*", + "isort ==5.13.*", + "jinja2 ==3.1.*", + "jq ==1.7.*", "jsonschema >=4.18,<4.24", - "lxml =5.3.*", - "make =4.4.*", - "mypy =1.11.*", + "lxml ==5.3.*", + "make ==4.4.*", + "mypy ==1.11.*", "pip", - "pylint =3.2.*", - "pytest =8.3.*", - "pytest-cov =5.0.*", - "pytest-xdist =3.6.*", + "pylint ==3.2.*", + "pytest ==8.3.*", + "pytest-cov ==5.0.*", + "pytest-xdist ==3.6.*", "python >=3.9,<3.13", - "pyyaml =6.0.*", - "requests =2.32.*", + "pyyaml ==6.0.*", + "requests ==2.32.*", "setuptools" ], "run": [ - "f90nml =1.4.*", - "iotaa =0.8.*", - "jinja2 =3.1.*", + "f90nml ==1.4.*", + "iotaa ==0.8.*", + "jinja2 ==3.1.*", "jsonschema >=4.18,<4.24", - "lxml =5.3.*", + "lxml ==5.3.*", "python >=3.9,<3.13", - "pyyaml =6.0.*", - "requests =2.32.*" + "pyyaml ==6.0.*", + "requests ==2.32.*" ] }, "version": "2.6.0" From 85e92a5aec9574f1e59a36c31300a40ca071f965 Mon Sep 17 00:00:00 2001 From: Paul Madden Date: Tue, 28 Jan 2025 20:31:42 +0000 Subject: [PATCH 3/3] Remove troublesome gnu.org link from docs --- docs/conf.py | 1 - docs/sections/user_guide/cli/tools/config.rst | 10 +++++----- docs/sections/user_guide/cli/tools/template.rst | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e8f721ed2..0c7dacd15 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,7 +63,6 @@ "rtd": ("https://readthedocs.org/projects/uwtools/%s", "%s"), "schism": ("https://schism-dev.github.io/schism/master/%s", "%s"), "sfc-climo-gen": ("https://ufs-community.github.io/UFS_UTILS/sfc_climo_gen/%s", "%s"), - "shell-redirection": ("https://www.gnu.org/software/bash/manual/html_node/Redirections.html%s", "%s"), "ufs": ("https://ufs.epic.noaa.gov/%s", "%s"), "ufs-utils": ("https://noaa-emcufs-utils.readthedocs.io/en/latest/ufs_utils.html#%s", "%s"), "ufs-weather-model": ("https://github.com/ufs-community/ufs-weather-model/%s", "%s"), diff --git a/docs/sections/user_guide/cli/tools/config.rst b/docs/sections/user_guide/cli/tools/config.rst index f86ce8c16..d5b3498af 100644 --- a/docs/sections/user_guide/cli/tools/config.rst +++ b/docs/sections/user_guide/cli/tools/config.rst @@ -72,7 +72,7 @@ The examples that follow use identical namelist files ``a.nml`` and ``b.nml`` wi .. literalinclude:: config/compare-verbose.out :language: text - Note that ``uw`` logs to ``stderr``. Use :shell-redirection:`shell redirection<>` as needed. + Note that ``uw`` logs to ``stderr``. Use shell redirection as needed. .. note:: Comparisons are supported only for configs of the same format, e.g. YAML vs YAML, Fortran namelist vs Fortran namelist, etc. ``uw`` will flag invalid comparisons: @@ -123,7 +123,7 @@ and YAML file ``update.yaml`` with contents: .. literalinclude:: config/realize-stdout.out :language: text - :shell-redirection:`Shell redirection<>` may also be used to stream output to a file, another process, etc. + Shell redirection may also be used to stream output to a file, another process, etc. * Values in the input file can be updated via an optional update file: @@ -264,7 +264,7 @@ and YAML file ``update.yaml`` with contents: .. literalinclude:: config/realize-verbose.out :language: text - Note that ``uw`` logs to ``stderr`` and writes non-log output to ``stdout``, so the streams can be redirected separately via :shell-redirection:`shell redirection<>`. + Note that ``uw`` logs to ``stderr`` and writes non-log output to ``stdout``, so the streams can be redirected separately via shell redirection. .. _cli_config_validate_examples: @@ -300,7 +300,7 @@ and the YAML file ``values.yaml`` with contents: .. literalinclude:: config/validate-pass.out :language: text - :shell-redirection:`Shell redirection<>` may also be used to stream output to a file, another process, etc. + Shell redirection may also be used to stream output to a file, another process, etc. * To read the *config* from ``stdin`` and print validation results to ``stdout``: @@ -328,4 +328,4 @@ and the YAML file ``values.yaml`` with contents: .. literalinclude:: config/validate-verbose.out :language: text - Note that ``uw`` logs to ``stderr``, so the stream can be :shell-redirection:`redirected<>`. + Note that ``uw`` logs to ``stderr``, so the stream can be redirected. diff --git a/docs/sections/user_guide/cli/tools/template.rst b/docs/sections/user_guide/cli/tools/template.rst index cd931e50f..97a6d56f0 100644 --- a/docs/sections/user_guide/cli/tools/template.rst +++ b/docs/sections/user_guide/cli/tools/template.rst @@ -49,7 +49,7 @@ and a YAML file called ``values.yaml`` with contents: .. literalinclude:: template/render-exec-stdout.out :language: text - :shell-redirection:`Shell redirection<>` may also be used to stream output to a file, another process, etc. + Shell redirection may also be used to stream output to a file, another process, etc. * To render the template to a file via command-line argument: @@ -99,7 +99,7 @@ and a YAML file called ``values.yaml`` with contents: .. literalinclude:: template/render-exec-verbose.out :language: text - Note that ``uw`` logs to ``stderr``. Use :shell-redirection:`shell redirection<>` as needed. + Note that ``uw`` logs to ``stderr``. Use shell redirection as needed. * The following examples use the YAML file ``greeting.yaml`` with contents: @@ -213,7 +213,7 @@ The examples in this section use atparse-formatted template file ``atparse.txt`` .. literalinclude:: template/translate-exec-stdout.out :language: text - :shell-redirection:`Shell redirection<>` may also be used to stream output to a file, another process, etc. + Shell redirection may also be used to stream output to a file, another process, etc. * To convert the template to a file via command-line argument: