Skip to content

Commit

Permalink
doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaflott committed Aug 9, 2024
1 parent 1c626bb commit 4c57cf5
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion fre/catalog/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#from .gen_intake_gfdl import build_script
''' for fre.catalog imports '''
from .frecatalog import catalog_cli

__all__ = ["catalog_cli"]
2 changes: 2 additions & 0 deletions fre/check/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
''' for fre.check imports '''

from .frecheckexample import check_test_function
from .frecheck import check_cli

Expand Down
1 change: 1 addition & 0 deletions fre/cmor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
''' for fre.cmor imports '''
from .CMORmixer import cmor_run_subtool
from .frecmor import cmor_cli

Expand Down
1 change: 1 addition & 0 deletions fre/list/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
''' for fre.list imports '''
from .frelistexample import list_test_function
from .frelist import list_cli

Expand Down
4 changes: 1 addition & 3 deletions fre/make/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions fre/pp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
''' for fre.pp imports '''
from .checkoutScript import checkoutTemplate
from .configure_script_yaml import yamlInfo
from .configure_script_xml import convert
Expand Down
4 changes: 4 additions & 0 deletions fre/pp/frepp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python3
''' fre pp '''

import click
from .checkoutScript import checkoutTemplate
from .configure_script_yaml import yamlInfo
Expand Down Expand Up @@ -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()
3 changes: 2 additions & 1 deletion fre/pp/install.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
''' fre pp install '''

import os
import subprocess
import click

Expand All @@ -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)
4 changes: 2 additions & 2 deletions fre/pp/run.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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)
3 changes: 2 additions & 1 deletion fre/pp/status.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
''' fre pp status '''

import os
import subprocess
import click

Expand All @@ -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)
6 changes: 4 additions & 2 deletions fre/pp/validate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
''' fre pp validate '''

import os
import subprocess
Expand All @@ -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)
4 changes: 1 addition & 3 deletions fre/run/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions fre/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
''' for fre.test imports '''
from .fretestexample import test_test_function
from .fretest import test_cli

Expand Down
4 changes: 1 addition & 3 deletions fre/yamltools/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 4c57cf5

Please sign in to comment.