Skip to content

Commit

Permalink
split up tmy.py. split tmy_cli test into cli and regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Jul 3, 2024
1 parent f0b7168 commit da32685
Show file tree
Hide file tree
Showing 9 changed files with 1,273 additions and 1,248 deletions.
15 changes: 4 additions & 11 deletions nsrdb/cli.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# -*- coding: utf-8 -*-
"""NSRDB Command Line Interface (CLI).
Created on Mon Oct 21 15:39:01 2019
@author: gbuster
"""
"""NSRDB Command Line Interface (CLI)."""

import itertools
import json
Expand All @@ -20,7 +14,7 @@

from nsrdb import __version__
from nsrdb.nsrdb import NSRDB
from nsrdb.tmy.tmy import TmyRunner
from nsrdb.tmy import TmyRunner
from nsrdb.utilities import ModuleName
from nsrdb.utilities.cli import BaseCLI
from nsrdb.utilities.file_utils import ts_freq_check
Expand Down Expand Up @@ -52,9 +46,7 @@ def convert(value, param, ctx):
if value is None:
return None
raise TypeError(
'Cannot recognize input type: {} {} {} {}'.format(
value, type(value), param, ctx
)
f'Cannot recognize input type: {value} {type(value)} {param} {ctx}'
)


Expand Down Expand Up @@ -763,6 +755,7 @@ def tmy(ctx, config, verbose=False, pipeline_step=None, collect=False):
}
""" # noqa : D301

init_logger('nsrdb.tmy', log_level=ctx.obj['LOG_LEVEL'])
mod_name = ModuleName.COLLECT_TMY if collect else ModuleName.TMY
config = BaseCLI.from_config_preflight(
ctx=ctx,
Expand Down
9 changes: 5 additions & 4 deletions nsrdb/tmy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
"""NSRDB TMY Processing.
@author: gbuster
"""
"""NSRDB TMY Processing."""

from .cdf import Cdf
from .tmy import Tmy
from .tmy_runner import TmyRunner
Loading

0 comments on commit da32685

Please sign in to comment.