Skip to content

Commit

Permalink
Merge branch 'main' into driver-base-classes-to-api
Browse files Browse the repository at this point in the history
  • Loading branch information
maddenp-noaa committed Jul 9, 2024
2 parents 0d2b782 + 2119d54 commit 61870b2
Show file tree
Hide file tree
Showing 25 changed files with 394 additions and 581 deletions.
7 changes: 0 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Code owners:

* @NaureenBharwaniNOAA @christinaholtNOAA @elcarpenterNOAA @fgabelmannjr @maddenp-noaa @weirae

# Documentation owners:

.readthedocs.yaml @christinaholtNOAA @jprestop @maddenp-noaa
docs/* @christinaholtNOAA @jprestop @maddenp-noaa
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
with open("../recipe/meta.json", "r", encoding="utf-8") as f:
_metadata = json.loads(f.read())

autoclass_content = "both"
autodoc_mock_imports = ["f90nml", "iotaa", "jsonschema", "lxml", "referencing"]
copyright = str(dt.datetime.now().year)
extensions = ["sphinx.ext.autodoc", "sphinx.ext.extlinks", "sphinx.ext.intersphinx"]
Expand Down
36 changes: 2 additions & 34 deletions src/uwtools/drivers/chgres_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,21 @@
A driver for chgres_cube.
"""

from datetime import datetime
from pathlib import Path
from typing import Optional

from iotaa import asset, task, tasks

from uwtools.config.formats.nml import NMLConfig
from uwtools.drivers.driver import Driver
from uwtools.drivers.driver import DriverCycleBased
from uwtools.strings import STR
from uwtools.utils.tasks import file


class ChgresCube(Driver):
class ChgresCube(DriverCycleBased):
"""
A driver for chgres_cube.
"""

def __init__(
self,
cycle: datetime,
config: Optional[Path] = None,
dry_run: bool = False,
batch: bool = False,
key_path: Optional[list[str]] = None,
):
"""
The driver.
:param cycle: The cycle.
:param config: Path to config file (read stdin if missing or None).
:param dry_run: Run in dry-run mode?
:param batch: Run component via the batch system?
:param key_path: Keys leading through the config to the driver's configuration block.
"""
super().__init__(
config=config, dry_run=dry_run, batch=batch, cycle=cycle, key_path=key_path
)
self._cycle = cycle

# Workflow tasks

@task
Expand Down Expand Up @@ -107,11 +83,3 @@ def _driver_name(self) -> str:
Returns the name of this driver.
"""
return STR.chgrescube

def _taskname(self, suffix: str) -> str:
"""
Returns a common tag for graph-task log messages.
:param suffix: Log-string suffix.
"""
return self._taskname_with_cycle(self._cycle, suffix)
Loading

0 comments on commit 61870b2

Please sign in to comment.