diff --git a/src/uwtools/drivers/cdeps.py b/src/uwtools/drivers/cdeps.py index 2a88c3e24..6841c675a 100644 --- a/src/uwtools/drivers/cdeps.py +++ b/src/uwtools/drivers/cdeps.py @@ -93,15 +93,17 @@ def ocn_stream(self): yield file(path=Path(template_file)) self._model_stream_file("ocn_streams", path, template_file) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.cdeps + # Private helper methods + def _model_namelist_file(self, group: str, path: Path) -> None: """ Create an atmosphere or ocean namelist file. diff --git a/src/uwtools/drivers/chgres_cube.py b/src/uwtools/drivers/chgres_cube.py index 6e1e73009..cb110bb8e 100644 --- a/src/uwtools/drivers/chgres_cube.py +++ b/src/uwtools/drivers/chgres_cube.py @@ -89,10 +89,10 @@ def runscript(self): } self._write_runscript(path=path, envvars=envvars) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/drivers/driver.py b/src/uwtools/drivers/driver.py index 7ee057774..681d05683 100644 --- a/src/uwtools/drivers/driver.py +++ b/src/uwtools/drivers/driver.py @@ -57,9 +57,9 @@ def __init__( config_intermediate, _ = walk_key_path(self._config_full, key_path or []) self._platform = config_intermediate.get("platform") try: - self._config: dict = config_intermediate[self._driver_name] + self._config: dict = config_intermediate[self.driver_name] except KeyError as e: - raise UWConfigError("Required '%s' block missing in config" % self._driver_name) from e + raise UWConfigError("Required '%s' block missing in config" % self.driver_name) from e if controller: self._config[STR.rundir] = config_intermediate[controller][STR.rundir] self._validate(schema_file) @@ -75,7 +75,7 @@ def __repr__(self) -> str: return " ".join(filter(None, [str(self), cycle, leadtime, "in", self.config[STR.rundir]])) def __str__(self) -> str: - return self._driver_name + return self.driver_name @property def config(self) -> dict: @@ -111,7 +111,7 @@ def taskname(self, suffix: str) -> str: if cycle and leadtime is not None else cycle.strftime("%Y%m%d %HZ") if cycle else None ) - return " ".join(filter(None, [timestr, self._driver_name, suffix])) + return " ".join(filter(None, [timestr, self.driver_name, suffix])) # Workflow tasks @@ -153,13 +153,17 @@ def _create_user_updated_config( else: log.debug(f"Failed to validate {path}") + # Public helper methods + @property @abstractmethod - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ + # Private helper methods + def _namelist_schema( self, config_keys: Optional[list[str]] = None, schema_keys: Optional[list[str]] = None ) -> dict: @@ -174,12 +178,12 @@ def _namelist_schema( for config_key in config_keys or [STR.namelist]: nmlcfg = nmlcfg[config_key] if nmlcfg.get(STR.validate, True): - schema_file = get_schema_file(schema_name=self._driver_name.replace("_", "-")) + schema_file = get_schema_file(schema_name=self.driver_name.replace("_", "-")) with open(schema_file, "r", encoding="utf-8") as f: schema = json.load(f) for schema_key in schema_keys or [ STR.properties, - self._driver_name, + self.driver_name, STR.properties, STR.namelist, STR.properties, @@ -199,7 +203,7 @@ def _validate(self, schema_file: Optional[Path] = None) -> None: validate_external(schema_file=schema_file, config=self.config_full) else: validate_internal( - schema_name=self._driver_name.replace("_", "-"), config=self.config_full + schema_name=self.driver_name.replace("_", "-"), config=self.config_full ) @@ -460,7 +464,7 @@ def _runscript_path(self) -> Path: """ Returns the path to the runscript. """ - return self.rundir / f"runscript.{self._driver_name}" + return self.rundir / f"runscript.{self.driver_name}" @property def _scheduler(self) -> JobScheduler: @@ -480,7 +484,7 @@ def _validate(self, schema_file: Optional[Path] = None) -> None: validate_external(schema_file=schema_file, config=self.config_full) else: validate_internal( - schema_name=self._driver_name.replace("_", "-"), config=self.config_full + schema_name=self.driver_name.replace("_", "-"), config=self.config_full ) validate_internal(schema_name=STR.platform, config=self.config_full) diff --git a/src/uwtools/drivers/esg_grid.py b/src/uwtools/drivers/esg_grid.py index 39c266421..9b1082056 100644 --- a/src/uwtools/drivers/esg_grid.py +++ b/src/uwtools/drivers/esg_grid.py @@ -49,10 +49,10 @@ def provisioned_rundir(self): self.runscript(), ] - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/drivers/filter_topo.py b/src/uwtools/drivers/filter_topo.py index b447d9b21..3b852a35d 100644 --- a/src/uwtools/drivers/filter_topo.py +++ b/src/uwtools/drivers/filter_topo.py @@ -60,10 +60,10 @@ def provisioned_rundir(self): self.runscript(), ] - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/drivers/fv3.py b/src/uwtools/drivers/fv3.py index 2f58c4af7..9d06e4de5 100644 --- a/src/uwtools/drivers/fv3.py +++ b/src/uwtools/drivers/fv3.py @@ -176,10 +176,10 @@ def runscript(self): } self._write_runscript(path=path, envvars=envvars) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/drivers/global_equiv_resol.py b/src/uwtools/drivers/global_equiv_resol.py index e8e6f4618..58264fdb5 100644 --- a/src/uwtools/drivers/global_equiv_resol.py +++ b/src/uwtools/drivers/global_equiv_resol.py @@ -38,15 +38,17 @@ def provisioned_rundir(self): self.runscript(), ] - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.globalequivresol + # Private helper methods + @property def _runcmd(self): """ diff --git a/src/uwtools/drivers/ioda.py b/src/uwtools/drivers/ioda.py index d2d058d58..1a740506b 100644 --- a/src/uwtools/drivers/ioda.py +++ b/src/uwtools/drivers/ioda.py @@ -29,21 +29,23 @@ def provisioned_rundir(self): self.runscript(), ] - # Private helper methods + # Public helper methods @property - def _config_fn(self) -> str: + def driver_name(self) -> str: """ - Returns the name of the config file used in execution. + Returns the name of this driver. """ - return "ioda.yaml" + return STR.ioda + + # Private helper methods @property - def _driver_name(self) -> str: + def _config_fn(self) -> str: """ - Returns the name of this driver. + Returns the name of the config file used in execution. """ - return STR.ioda + return "ioda.yaml" @property def _runcmd(self) -> str: diff --git a/src/uwtools/drivers/jedi.py b/src/uwtools/drivers/jedi.py index f3a511f80..12acbcf0e 100644 --- a/src/uwtools/drivers/jedi.py +++ b/src/uwtools/drivers/jedi.py @@ -54,21 +54,23 @@ def validate_only(self): logging.info("%s: Config is valid", taskname) a.ready = lambda: True - # Private helper methods + # Public helper methods @property - def _config_fn(self) -> str: + def driver_name(self) -> str: """ - Returns the name of the config file used in execution. + Returns the name of this driver. """ - return "jedi.yaml" + return STR.jedi + + # Private helper methods @property - def _driver_name(self) -> str: + def _config_fn(self) -> str: """ - Returns the name of this driver. + Returns the name of the config file used in execution. """ - return STR.jedi + return "jedi.yaml" @property def _runcmd(self) -> str: diff --git a/src/uwtools/drivers/make_hgrid.py b/src/uwtools/drivers/make_hgrid.py index 7d0986642..78f0f6baa 100644 --- a/src/uwtools/drivers/make_hgrid.py +++ b/src/uwtools/drivers/make_hgrid.py @@ -24,15 +24,17 @@ def provisioned_rundir(self): yield self.taskname("provisioned run directory") yield self.runscript() - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.makehgrid + # Private helper methods + @property def _runcmd(self): """ diff --git a/src/uwtools/drivers/make_solo_mosaic.py b/src/uwtools/drivers/make_solo_mosaic.py index 90832d2f0..5b954333b 100644 --- a/src/uwtools/drivers/make_solo_mosaic.py +++ b/src/uwtools/drivers/make_solo_mosaic.py @@ -32,17 +32,19 @@ def taskname(self, suffix: str) -> str: :param suffix: Log-string suffix. """ - return "%s %s" % (self._driver_name, suffix) + return "%s %s" % (self.driver_name, suffix) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.makesolomosaic + # Private helper methods + @property def _runcmd(self): """ diff --git a/src/uwtools/drivers/mpas.py b/src/uwtools/drivers/mpas.py index dbb30b910..2b250541a 100644 --- a/src/uwtools/drivers/mpas.py +++ b/src/uwtools/drivers/mpas.py @@ -66,15 +66,17 @@ def namelist_file(self): schema=self._namelist_schema(), ) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.mpas + # Private helper methods + @property def _streams_fn(self) -> str: """ diff --git a/src/uwtools/drivers/mpas_init.py b/src/uwtools/drivers/mpas_init.py index 6a48733a4..547e88de3 100644 --- a/src/uwtools/drivers/mpas_init.py +++ b/src/uwtools/drivers/mpas_init.py @@ -68,15 +68,17 @@ def namelist_file(self): schema=self._namelist_schema(), ) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.mpasinit + # Private helper methods + @property def _streams_fn(self) -> str: """ diff --git a/src/uwtools/drivers/orog_gsl.py b/src/uwtools/drivers/orog_gsl.py index 08a8785f3..46d53beac 100644 --- a/src/uwtools/drivers/orog_gsl.py +++ b/src/uwtools/drivers/orog_gsl.py @@ -70,15 +70,17 @@ def topo_data_30s(self): yield asset(dst, dst.is_file) yield symlink(target=src, linkname=dst) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.oroggsl + # Private helper methods + @property def _runcmd(self): """ diff --git a/src/uwtools/drivers/schism.py b/src/uwtools/drivers/schism.py index 84aa0ee7c..76e71525e 100644 --- a/src/uwtools/drivers/schism.py +++ b/src/uwtools/drivers/schism.py @@ -45,10 +45,10 @@ def provisioned_rundir(self): yield self.taskname("provisioned run directory") yield self.namelist_file() - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/drivers/sfc_climo_gen.py b/src/uwtools/drivers/sfc_climo_gen.py index 44422adae..3d1ce53d4 100644 --- a/src/uwtools/drivers/sfc_climo_gen.py +++ b/src/uwtools/drivers/sfc_climo_gen.py @@ -52,10 +52,10 @@ def provisioned_rundir(self): self.runscript(), ] - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/drivers/shave.py b/src/uwtools/drivers/shave.py index 64850d9b7..018d39813 100644 --- a/src/uwtools/drivers/shave.py +++ b/src/uwtools/drivers/shave.py @@ -24,15 +24,17 @@ def provisioned_rundir(self): yield self.taskname("provisioned run directory") yield self.runscript() - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.shave + # Private helper methods + @property def _runcmd(self): """ diff --git a/src/uwtools/drivers/ungrib.py b/src/uwtools/drivers/ungrib.py index 859d67c88..db3b7ab4c 100644 --- a/src/uwtools/drivers/ungrib.py +++ b/src/uwtools/drivers/ungrib.py @@ -102,15 +102,17 @@ def vtable(self): path.parent.mkdir(parents=True, exist_ok=True) path.symlink_to(Path(self.config["vtable"])) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.ungrib + # Private helper methods + @task def _gribfile(self, infile: Path, link: Path): """ diff --git a/src/uwtools/drivers/upp.py b/src/uwtools/drivers/upp.py index 228978eb0..d6fa799b4 100644 --- a/src/uwtools/drivers/upp.py +++ b/src/uwtools/drivers/upp.py @@ -72,15 +72,17 @@ def provisioned_rundir(self): self.runscript(), ] - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ return STR.upp + # Private helper methods + @property def _namelist_path(self) -> Path: """ diff --git a/src/uwtools/drivers/ww3.py b/src/uwtools/drivers/ww3.py index 5dfe00e98..33b9af79c 100644 --- a/src/uwtools/drivers/ww3.py +++ b/src/uwtools/drivers/ww3.py @@ -59,10 +59,10 @@ def restart_directory(self): yield None path.mkdir(parents=True) - # Private helper methods + # Public helper methods @property - def _driver_name(self) -> str: + def driver_name(self) -> str: """ Returns the name of this driver. """ diff --git a/src/uwtools/tests/drivers/test_cdeps.py b/src/uwtools/tests/drivers/test_cdeps.py index 52877ac14..e4ecfd5a6 100644 --- a/src/uwtools/tests/drivers/test_cdeps.py +++ b/src/uwtools/tests/drivers/test_cdeps.py @@ -111,8 +111,8 @@ def test_CDEPS_streams(driverobj, group): assert f.read().strip() == dedent(expected).strip() -def test_CDEPS__driver_name(driverobj): - assert driverobj._driver_name == "cdeps" +def test_CDEPS_driver_name(driverobj): + assert driverobj.driver_name == "cdeps" def test_CDEPS__model_namelist_file(driverobj): diff --git a/src/uwtools/tests/drivers/test_chgres_cube.py b/src/uwtools/tests/drivers/test_chgres_cube.py index eb178e850..66ae79d4f 100644 --- a/src/uwtools/tests/drivers/test_chgres_cube.py +++ b/src/uwtools/tests/drivers/test_chgres_cube.py @@ -147,8 +147,8 @@ def test_ChgresCube_runscript(driverobj): assert [type(runscript.call_args.kwargs[x]) for x in args] == types -def test_ChgresCube__driver_name(driverobj): - assert driverobj._driver_name == "chgres_cube" +def test_ChgresCube_driver_name(driverobj): + assert driverobj.driver_name == "chgres_cube" def test_ChgresCube_taskname(driverobj): diff --git a/src/uwtools/tests/drivers/test_driver.py b/src/uwtools/tests/drivers/test_driver.py index 1334e2742..b52b3d4de 100644 --- a/src/uwtools/tests/drivers/test_driver.py +++ b/src/uwtools/tests/drivers/test_driver.py @@ -40,7 +40,7 @@ def provisioned_rundir(self): pass @property - def _driver_name(self) -> str: + def driver_name(self) -> str: return "concrete" def _validate(self, schema_file: Optional[Path] = None) -> None: @@ -218,7 +218,7 @@ def test_Assets_key_path(config, tmp_path): assetsobj = ConcreteAssetsTimeInvariant( config=config_file, dry_run=False, key_path=["foo", "bar"] ) - assert assetsobj.config == config[assetsobj._driver_name] + assert assetsobj.config == config[assetsobj.driver_name] assert assetsobj._platform == config["platform"] diff --git a/src/uwtools/tests/drivers/test_esg_grid.py b/src/uwtools/tests/drivers/test_esg_grid.py index 8e5962ba4..838c480a5 100644 --- a/src/uwtools/tests/drivers/test_esg_grid.py +++ b/src/uwtools/tests/drivers/test_esg_grid.py @@ -123,5 +123,5 @@ def test_ESGGrid_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_FilterTopo__driver_name(driverobj): - assert driverobj._driver_name == "esg_grid" +def test_FilterTopo_driver_name(driverobj): + assert driverobj.driver_name == "esg_grid" diff --git a/src/uwtools/tests/drivers/test_filter_topo.py b/src/uwtools/tests/drivers/test_filter_topo.py index 0f58e22f0..e02bb24c3 100644 --- a/src/uwtools/tests/drivers/test_filter_topo.py +++ b/src/uwtools/tests/drivers/test_filter_topo.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-function-docstring,protected-access,redefined-outer-name +# pylint: disable=missing-function-docstring,redefined-outer-name """ filter_topo driver tests. """ @@ -100,5 +100,5 @@ def test_FilterTopo_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_FilterTopo__driver_name(driverobj): - assert driverobj._driver_name == "filter_topo" +def test_FilterTopo_driver_name(driverobj): + assert driverobj.driver_name == "filter_topo" diff --git a/src/uwtools/tests/drivers/test_fv3.py b/src/uwtools/tests/drivers/test_fv3.py index 655b607bf..c5997c768 100644 --- a/src/uwtools/tests/drivers/test_fv3.py +++ b/src/uwtools/tests/drivers/test_fv3.py @@ -247,9 +247,9 @@ def test_FV3_runscript(driverobj): assert [type(runscript.call_args.kwargs[x]) for x in args] == types -def test_FV3_taskname(driverobj): - assert driverobj.taskname("foo") == "20240201 18Z fv3 foo" +def test_FV3_driver_name(driverobj): + assert driverobj.driver_name == "fv3" -def test_FV3__driver_name(driverobj): - assert driverobj._driver_name == "fv3" +def test_FV3_taskname(driverobj): + assert driverobj.taskname("foo") == "20240201 18Z fv3 foo" diff --git a/src/uwtools/tests/drivers/test_global_equiv_resol.py b/src/uwtools/tests/drivers/test_global_equiv_resol.py index 5a3309204..678b84bf7 100644 --- a/src/uwtools/tests/drivers/test_global_equiv_resol.py +++ b/src/uwtools/tests/drivers/test_global_equiv_resol.py @@ -83,11 +83,11 @@ def test_GlobalEquivResol_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() +def test_FilterTopo_driver_name(driverobj): + assert driverobj.driver_name == "global_equiv_resol" + + def test_GlobalEquivResol__runcmd(driverobj): cmd = driverobj._runcmd input_file_path = driverobj.config["input_grid_file"] assert cmd == f"/path/to/global_equiv_resol.exe {input_file_path}" - - -def test_FilterTopo__driver_name(driverobj): - assert driverobj._driver_name == "global_equiv_resol" diff --git a/src/uwtools/tests/drivers/test_ioda.py b/src/uwtools/tests/drivers/test_ioda.py index dc128a0c7..2c0442bba 100644 --- a/src/uwtools/tests/drivers/test_ioda.py +++ b/src/uwtools/tests/drivers/test_ioda.py @@ -100,12 +100,12 @@ def test_IODA_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_IODA__config_fn(driverobj): - assert driverobj._config_fn == "ioda.yaml" +def test_IODA_driver_name(driverobj): + assert driverobj.driver_name == "ioda" -def test_IODA__driver_name(driverobj): - assert driverobj._driver_name == "ioda" +def test_IODA__config_fn(driverobj): + assert driverobj._config_fn == "ioda.yaml" def test_IODA__runcmd(driverobj): diff --git a/src/uwtools/tests/drivers/test_jedi.py b/src/uwtools/tests/drivers/test_jedi.py index ac47647ec..5e3ea8e6e 100644 --- a/src/uwtools/tests/drivers/test_jedi.py +++ b/src/uwtools/tests/drivers/test_jedi.py @@ -188,12 +188,12 @@ def file(path: Path): assert regex_logged(caplog, "Config is valid") -def test_JEDI__config_fn(driverobj): - assert driverobj._config_fn == "jedi.yaml" +def test_JEDI_driver_name(driverobj): + assert driverobj.driver_name == "jedi" -def test_JEDI__driver_name(driverobj): - assert driverobj._driver_name == "jedi" +def test_JEDI__config_fn(driverobj): + assert driverobj._config_fn == "jedi.yaml" def test_JEDI__runcmd(driverobj): diff --git a/src/uwtools/tests/drivers/test_make_hgrid.py b/src/uwtools/tests/drivers/test_make_hgrid.py index d1587221a..46a24d02e 100644 --- a/src/uwtools/tests/drivers/test_make_hgrid.py +++ b/src/uwtools/tests/drivers/test_make_hgrid.py @@ -76,8 +76,8 @@ def test_MakeHgrid_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_MakeHgrid__driver_name(driverobj): - assert driverobj._driver_name == "make_hgrid" +def test_MakeHgrid_driver_name(driverobj): + assert driverobj.driver_name == "make_hgrid" def test_MakeHgrid__runcmd(driverobj): diff --git a/src/uwtools/tests/drivers/test_make_solo_mosaic.py b/src/uwtools/tests/drivers/test_make_solo_mosaic.py index 65d95d279..f4fd49339 100644 --- a/src/uwtools/tests/drivers/test_make_solo_mosaic.py +++ b/src/uwtools/tests/drivers/test_make_solo_mosaic.py @@ -70,8 +70,8 @@ def test_MakeSoloMosaic_provisioned_rundir(driverobj): runscript.assert_called_once_with() -def test_MakeSoloMosiac__driver_name(driverobj): - assert driverobj._driver_name == "make_solo_mosaic" +def test_MakeSoloMosaic_driver_name(driverobj): + assert driverobj.driver_name == "make_solo_mosaic" def test_MakeSoloMosaic__runcmd(driverobj): diff --git a/src/uwtools/tests/drivers/test_mpas.py b/src/uwtools/tests/drivers/test_mpas.py index a2c965685..e0b252c49 100644 --- a/src/uwtools/tests/drivers/test_mpas.py +++ b/src/uwtools/tests/drivers/test_mpas.py @@ -236,8 +236,8 @@ def test_MPAS_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_MPAS__driver_name(driverobj): - assert driverobj._driver_name == "mpas" +def test_MPAS_driver_name(driverobj): + assert driverobj.driver_name == "mpas" def test_MPAS_streams_file(config, driverobj): diff --git a/src/uwtools/tests/drivers/test_mpas_init.py b/src/uwtools/tests/drivers/test_mpas_init.py index b5655475b..679267d38 100644 --- a/src/uwtools/tests/drivers/test_mpas_init.py +++ b/src/uwtools/tests/drivers/test_mpas_init.py @@ -211,8 +211,8 @@ def test_MPASInit_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_MPASInit__driver_name(driverobj): - assert driverobj._driver_name == "mpas_init" +def test_MPASInit_driver_name(driverobj): + assert driverobj.driver_name == "mpas_init" def test_MPASInit_streams_file(config, driverobj): diff --git a/src/uwtools/tests/drivers/test_orog_gsl.py b/src/uwtools/tests/drivers/test_orog_gsl.py index 8ede2fc30..875f52fe2 100644 --- a/src/uwtools/tests/drivers/test_orog_gsl.py +++ b/src/uwtools/tests/drivers/test_orog_gsl.py @@ -102,8 +102,8 @@ def test_OrogGSL_topo_data_3os(driverobj): assert path.is_symlink() -def test_OrogGSL__driver_name(driverobj): - assert driverobj._driver_name == "orog_gsl" +def test_OrogGSL_driver_name(driverobj): + assert driverobj.driver_name == "orog_gsl" def test_OrogGSL__runcmd(driverobj): diff --git a/src/uwtools/tests/drivers/test_schism.py b/src/uwtools/tests/drivers/test_schism.py index a30becde1..d58fd0876 100644 --- a/src/uwtools/tests/drivers/test_schism.py +++ b/src/uwtools/tests/drivers/test_schism.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-function-docstring,protected-access,redefined-outer-name +# pylint: disable=missing-function-docstring,redefined-outer-name """ SCHISM driver tests. """ @@ -71,5 +71,5 @@ def test_SCHISM_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_SCHISM__driver_name(driverobj): - assert driverobj._driver_name == "schism" +def test_SCHISM_driver_name(driverobj): + assert driverobj.driver_name == "schism" diff --git a/src/uwtools/tests/drivers/test_sfc_climo_gen.py b/src/uwtools/tests/drivers/test_sfc_climo_gen.py index 7bc934da3..f7e81c088 100644 --- a/src/uwtools/tests/drivers/test_sfc_climo_gen.py +++ b/src/uwtools/tests/drivers/test_sfc_climo_gen.py @@ -138,5 +138,5 @@ def test_SfcClimoGen_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_SfcClimoGen__driver_name(driverobj): - assert driverobj._driver_name == "sfc_climo_gen" +def test_SfcClimoGen_driver_name(driverobj): + assert driverobj.driver_name == "sfc_climo_gen" diff --git a/src/uwtools/tests/drivers/test_shave.py b/src/uwtools/tests/drivers/test_shave.py index c56da6081..ec1ff4cc8 100644 --- a/src/uwtools/tests/drivers/test_shave.py +++ b/src/uwtools/tests/drivers/test_shave.py @@ -80,8 +80,8 @@ def test_Shave_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_Shave__driver_name(driverobj): - assert driverobj._driver_name == "shave" +def test_Shave_driver_name(driverobj): + assert driverobj.driver_name == "shave" def test_Shave__runcmd(driverobj): diff --git a/src/uwtools/tests/drivers/test_support.py b/src/uwtools/tests/drivers/test_support.py index 335a5f55a..aa643e728 100644 --- a/src/uwtools/tests/drivers/test_support.py +++ b/src/uwtools/tests/drivers/test_support.py @@ -60,7 +60,7 @@ def t3(self): "@tasks t3" @property - def _driver_name(self): + def driver_name(self): pass @property diff --git a/src/uwtools/tests/drivers/test_ungrib.py b/src/uwtools/tests/drivers/test_ungrib.py index 1a3717b39..52952fd3b 100644 --- a/src/uwtools/tests/drivers/test_ungrib.py +++ b/src/uwtools/tests/drivers/test_ungrib.py @@ -125,8 +125,8 @@ def test_Ungrib_vtable(driverobj): assert dst.is_symlink() -def test_Ungrib__driver_name(driverobj): - assert driverobj._driver_name == "ungrib" +def test_Ungrib_driver_name(driverobj): + assert driverobj.driver_name == "ungrib" def test_Ungrib__gribfile(driverobj): diff --git a/src/uwtools/tests/drivers/test_upp.py b/src/uwtools/tests/drivers/test_upp.py index fe5780cc2..0747504da 100644 --- a/src/uwtools/tests/drivers/test_upp.py +++ b/src/uwtools/tests/drivers/test_upp.py @@ -167,8 +167,8 @@ def test_UPP_provisioned_rundir(driverobj): mocks[m].assert_called_once_with() -def test_UPP__driver_name(driverobj): - assert driverobj._driver_name == "upp" +def test_UPP_driver_name(driverobj): + assert driverobj.driver_name == "upp" def test_UPP__namelist_path(driverobj): diff --git a/src/uwtools/tests/drivers/test_ww3.py b/src/uwtools/tests/drivers/test_ww3.py index c208d3435..bf97854f9 100644 --- a/src/uwtools/tests/drivers/test_ww3.py +++ b/src/uwtools/tests/drivers/test_ww3.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-function-docstring,protected-access,redefined-outer-name +# pylint: disable=missing-function-docstring,redefined-outer-name """ WaveWatchIII driver tests. """ @@ -79,5 +79,5 @@ def test_WaveWatchIII_restart_directory(driverobj): assert path.is_dir() -def test_WaveWatchIII__driver_name(driverobj): - assert driverobj._driver_name == "ww3" +def test_WaveWatchIII_driver_name(driverobj): + assert driverobj.driver_name == "ww3" diff --git a/src/uwtools/tests/fixtures/testdriver.py b/src/uwtools/tests/fixtures/testdriver.py index 4758bec8a..e0320644a 100644 --- a/src/uwtools/tests/fixtures/testdriver.py +++ b/src/uwtools/tests/fixtures/testdriver.py @@ -18,5 +18,5 @@ def eighty_eight(self): yield None @property - def _driver_name(self): + def driver_name(self): return "testdriver"