From 4f02c2eee2cf56cc10f6dd662c5850f49607814c Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Fri, 26 Jul 2024 11:03:16 -0400 Subject: [PATCH] chore: update doc strings --- python/hypy/hydrolocation/hydrolocation.py | 2 +- python/hypy/hydrolocation/nwis_location.py | 10 +++++----- python/hypy/nexus.py | 6 ++++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/python/hypy/hydrolocation/hydrolocation.py b/python/hypy/hydrolocation/hydrolocation.py index 5d4066d..773a525 100644 --- a/python/hypy/hydrolocation/hydrolocation.py +++ b/python/hypy/hydrolocation/hydrolocation.py @@ -76,7 +76,7 @@ def realized_nexus(self) -> str: @property def geometry(self) -> Point | tuple[float, float]: """ - Geometric coordinates of the location as a `Point` or two-Tuple + Geodetic coordinates of the location as a `Point` or tuple of two floats """ return self._shape diff --git a/python/hypy/hydrolocation/nwis_location.py b/python/hypy/hydrolocation/nwis_location.py index 016b427..ac9a581 100644 --- a/python/hypy/hydrolocation/nwis_location.py +++ b/python/hypy/hydrolocation/nwis_location.py @@ -12,7 +12,7 @@ from shapely.geometry import Point class NWISLocation(HydroLocation): """ - An NWIS subclass of HydroLocation + An NWIS subclass of HydroLocation """ def __init__(self, station_id: str, @@ -24,7 +24,7 @@ def __init__(self, Parameters ---------- - shape: Union[Point, Tuple] + shape: Point | Tuple a shapely point geometry or two-tuple defining the coordinates of this location station_id: str NWIS station identifier @@ -35,11 +35,11 @@ def __init__(self, """ super().__init__(realized_nexus, shape, HydroLocationType.hydrometricStation, referenced_position) self._station_id = station_id - #self._nwis = nwis_client.IVDataService() + @property def station_id(self) -> str: """ - NWIS station identifier + NWIS station identifier """ return self._station_id @@ -48,6 +48,6 @@ def get_data(self, end: str | datetime | datetime64 | Timestamp | None = None ) -> DataFrame: """ - Get observation data from nwis + Get observation data from NWIS """ return nwis_client.IVDataService().get(self._station_id, startDT=start, endDT=end) diff --git a/python/hypy/nexus.py b/python/hypy/nexus.py index 4df7cd9..b9ea39f 100644 --- a/python/hypy/nexus.py +++ b/python/hypy/nexus.py @@ -26,6 +26,8 @@ def __init__(self, ---------- nexus_id: str The identifier string for this nexus + hydro_location: HydroLocation + HydroLocation associated with this nexus receiving_catchments: Catchments_Collection The catchment object(s) that receive(s) water from this nexus contributing_catchments: Catchments_Collection @@ -54,7 +56,7 @@ def receiving_catchments (self) -> tuple[Catchment, ...]: Returns ------- - Tuple['Catchment', ...] + tuple[Catchment, ...] Tuple of Catchment object(s) receiving water from nexus """ return self._receiving_catchments @@ -65,7 +67,7 @@ def contributing_catchments (self) -> tuple[Catchment, ...]: Returns ------- - Tuple['Catchment', ...] + tuple[Catchment, ...] Tuple of Catchment object(s) contributing water to nexus """ return self._contributing_catchments