From 4c57cf51af8635d26075a2790ab6241e86bf8a1b Mon Sep 17 00:00:00 2001 From: Ian Laflotte Date: Fri, 9 Aug 2024 13:54:34 -0400 Subject: [PATCH] doc strings --- fre/catalog/__init__.py | 2 +- fre/check/__init__.py | 2 ++ fre/cmor/__init__.py | 1 + fre/list/__init__.py | 1 + fre/make/__init__.py | 4 +--- fre/pp/__init__.py | 1 + fre/pp/frepp.py | 4 ++++ fre/pp/install.py | 3 ++- fre/pp/run.py | 4 ++-- fre/pp/status.py | 3 ++- fre/pp/validate.py | 6 ++++-- fre/run/__init__.py | 4 +--- fre/test/__init__.py | 1 + fre/yamltools/__init__.py | 4 +--- 14 files changed, 24 insertions(+), 16 deletions(-) diff --git a/fre/catalog/__init__.py b/fre/catalog/__init__.py index f27d80c0..13e87b07 100644 --- a/fre/catalog/__init__.py +++ b/fre/catalog/__init__.py @@ -1,4 +1,4 @@ -#from .gen_intake_gfdl import build_script +''' for fre.catalog imports ''' from .frecatalog import catalog_cli __all__ = ["catalog_cli"] diff --git a/fre/check/__init__.py b/fre/check/__init__.py index 6803c273..ef351297 100644 --- a/fre/check/__init__.py +++ b/fre/check/__init__.py @@ -1,3 +1,5 @@ +''' for fre.check imports ''' + from .frecheckexample import check_test_function from .frecheck import check_cli diff --git a/fre/cmor/__init__.py b/fre/cmor/__init__.py index e4e4bd51..0f8bd3ff 100644 --- a/fre/cmor/__init__.py +++ b/fre/cmor/__init__.py @@ -1,3 +1,4 @@ +''' for fre.cmor imports ''' from .CMORmixer import cmor_run_subtool from .frecmor import cmor_cli diff --git a/fre/list/__init__.py b/fre/list/__init__.py index 1816ee0f..555dae55 100644 --- a/fre/list/__init__.py +++ b/fre/list/__init__.py @@ -1,3 +1,4 @@ +''' for fre.list imports ''' from .frelistexample import list_test_function from .frelist import list_cli diff --git a/fre/make/__init__.py b/fre/make/__init__.py index d97fbfea..a35633b9 100644 --- a/fre/make/__init__.py +++ b/fre/make/__init__.py @@ -1,6 +1,4 @@ -''' -for proper import of fre make subcommands -''' +''' for fre.make imports ''' from .createCheckout import checkout_create from .createCompile import compile_create diff --git a/fre/pp/__init__.py b/fre/pp/__init__.py index 463d2d8b..14afecca 100644 --- a/fre/pp/__init__.py +++ b/fre/pp/__init__.py @@ -1,3 +1,4 @@ +''' for fre.pp imports ''' from .checkoutScript import checkoutTemplate from .configure_script_yaml import yamlInfo from .configure_script_xml import convert diff --git a/fre/pp/frepp.py b/fre/pp/frepp.py index c552b7ea..7ca8bf61 100644 --- a/fre/pp/frepp.py +++ b/fre/pp/frepp.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +''' fre pp ''' + import click from .checkoutScript import checkoutTemplate from .configure_script_yaml import yamlInfo @@ -256,4 +259,5 @@ def wrapper(context, experiment, platform, target, config_file, branch='main'): context.forward(runFre2pp) if __name__ == "__main__": + ''' entry point for click to fre pp commands ''' pp_cli() diff --git a/fre/pp/install.py b/fre/pp/install.py index d344c5fa..9ffc00ee 100644 --- a/fre/pp/install.py +++ b/fre/pp/install.py @@ -1,6 +1,6 @@ #!/usr/bin/env python +''' fre pp install ''' -import os import subprocess import click @@ -18,4 +18,5 @@ def _install_subtool(experiment, platform, target): @click.command() def install_subtool(experiment, platform, target): + ''' entry point to install for click ''' return _install_subtool(experiment, platform, target) diff --git a/fre/pp/run.py b/fre/pp/run.py index 444d6d5b..57f2c427 100644 --- a/fre/pp/run.py +++ b/fre/pp/run.py @@ -1,10 +1,9 @@ #!/usr/bin/env python +''' fre pp run ''' -import os import subprocess import click - def _pp_run_subtool(experiment, platform, target): """ Start or restart the Cylc workflow identified by: @@ -17,4 +16,5 @@ def _pp_run_subtool(experiment, platform, target): @click.command() def pp_run_subtool(experiment, platform, target): + ''' entry point to run for click ''' return _pp_run_subtool(experiment, platform, target) diff --git a/fre/pp/status.py b/fre/pp/status.py index 0eaa9079..6e2c07e1 100644 --- a/fre/pp/status.py +++ b/fre/pp/status.py @@ -1,6 +1,6 @@ #!/usr/bin/env python +''' fre pp status ''' -import os import subprocess import click @@ -17,4 +17,5 @@ def _status_subtool(experiment, platform, target): @click.command() def status_subtool(experiment, platform, target): + ''' entry point to status for click ''' return _status_subtool(experiment, platform, target) diff --git a/fre/pp/validate.py b/fre/pp/validate.py index 350c3cb3..9c07340f 100644 --- a/fre/pp/validate.py +++ b/fre/pp/validate.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +''' fre pp validate ''' import os import subprocess @@ -16,13 +17,14 @@ def _validate_subtool(experiment, platform, target): os.chdir(directory) # Run the Rose validation macros - cmd = f"rose macro --validate" + cmd = "rose macro --validate" subprocess.run(cmd, shell=True, check=True) # Validate the Cylc configuration - cmd = f"cylc validate ." + cmd = "cylc validate ." subprocess.run(cmd, shell=True, check=True) @click.command() def validate_subtool(experiment, platform, target): + ''' entry point to validate for click ''' return _validate_subtool(experiment, platform, target) diff --git a/fre/run/__init__.py b/fre/run/__init__.py index 161590b7..cdd61f12 100644 --- a/fre/run/__init__.py +++ b/fre/run/__init__.py @@ -1,6 +1,4 @@ -''' -for proper import of fre run subcommands -''' +''' for fre.run imports ''' from .frerunexample import run_test_function from .frerun import run_cli diff --git a/fre/test/__init__.py b/fre/test/__init__.py index c02e069b..0dedd8fe 100644 --- a/fre/test/__init__.py +++ b/fre/test/__init__.py @@ -1,3 +1,4 @@ +''' for fre.test imports ''' from .fretestexample import test_test_function from .fretest import test_cli diff --git a/fre/yamltools/__init__.py b/fre/yamltools/__init__.py index 5e793bee..369b1a42 100644 --- a/fre/yamltools/__init__.py +++ b/fre/yamltools/__init__.py @@ -1,6 +1,4 @@ -''' -for proper import of fre yamltools subcommands -''' +''' for fre.yamltools imports ''' from .freyamltoolsexample import yamltools_test_function from .freyamltools import yamltools_cli