Skip to content

Commit

Permalink
Update python/idsse_common/idsse/common/protocol_utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Geary Layne <[email protected]>
  • Loading branch information
paulhamer-noaa and Geary-Layne authored Dec 3, 2024
1 parent e198139 commit 2f16100
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions python/idsse_common/idsse/common/protocol_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ def __init__(self,
file_ext: str) -> None:
self.path_builder = PathBuilder(basedir, subdir, file_base, file_ext)

def get_path(self, issue: datetime, valid: datetime) -> str:
"""Delegates to instant PathBuilder to get full path given issue and valid
Args:
issue (datetime): Issue date time
valid (datetime): Valid date time
Returns:
str: Absolute path to file or object
"""
lead = TimeDelta(valid-issue)
return self.path_builder.build_path(issue=issue, valid=valid, lead=lead)

# pylint: disable=invalid-name
@abstractmethod
def ls(self, path: str, prepend_path: bool = True) -> Sequence[str]:
Expand All @@ -54,6 +41,19 @@ def ls(self, path: str, prepend_path: bool = True) -> Sequence[str]:
Returns:
Sequence[str]: The results sent to stdout from executing a 'ls' on passed path
"""

def get_path(self, issue: datetime, valid: datetime) -> str:
"""Delegates to instant PathBuilder to get full path given issue and valid
Args:
issue (datetime): Issue date time
valid (datetime): Valid date time
Returns:
str: Absolute path to file or object
"""
lead = TimeDelta(valid-issue)
return self.path_builder.build_path(issue=issue, valid=valid, lead=lead)


def check_for(self, issue: datetime, valid: datetime) -> tuple[datetime, str] | None:
Expand Down

0 comments on commit 2f16100

Please sign in to comment.