You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add default instance @property method output() to Driver base class.
Define uwtools.exceptions.UWNotImplemented and raise it from the default output().
Test default output() via ConcreteDriver* test subclass(es) in test_driver.py.
Add unit test to each existing driver test module (test_chgres_cube.py et al.) where the tested driver subclasses Driver. The test should call output() and assert that the expected exception is raised.
Update all driver unit tests to include output in the list of methods inherited from the base class.
Description
This method will serve as the default behavior for when a subclass has not yet implemented its own output(). It will report to the user that the method hasn't yet been implemented and will raise a UWNotImplemented exception.
Consider implementing, in addition to the API-callable output() method, something like
that can be called from the CLI to show the output() results on stdout. This could then be called as part of the CLI documentation generation to show example output in the CLI docs. (The doc would should be done in per-driver tickets, not here.) The output might look something like
This way, users could use the CLI to see what the output of their driver invocation will look like, and examples can be programmatically included in our CLI docs.
The text was updated successfully, but these errors were encountered:
AC
@property
methodoutput()
toDriver
base class.uwtools.exceptions.UWNotImplemented
and raise it from the defaultoutput()
.output()
viaConcreteDriver*
test subclass(es) intest_driver.py
.test_chgres_cube.py
et al.) where the tested driver subclassesDriver
. The test should calloutput()
and assert that the expected exception is raised.output
in the list of methods inherited from the base class.Description
This method will serve as the default behavior for when a subclass has not yet implemented its own
output()
. It will report to the user that the method hasn't yet been implemented and will raise aUWNotImplemented
exception.Consider implementing, in addition to the API-callable
output()
method, something likethat can be called from the CLI to show the
output()
results onstdout
. This could then be called as part of the CLI documentation generation to show example output in the CLI docs. (The doc would should be done in per-driver tickets, not here.) The output might look something likeThis way, users could use the CLI to see what the output of their driver invocation will look like, and examples can be programmatically included in our CLI docs.
The text was updated successfully, but these errors were encountered: