Skip to content

Commit 6f4d067

Browse files
committed
update documentation on get_aop_dpids and validate_aop_l3_dpid functions
1 parent dcafe1d commit 6f4d067

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/neonutilities/aop_download.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,15 @@ def validate_dpid(dpid):
233233

234234
def get_aop_dpids():
235235
"""
236-
This function retrieves all active NEON data product IDs from the NEON API.
236+
This function retrieves all active and inactive NEON data product IDs from the NEON API.
237237
238238
Returns
239239
-------
240240
active_dpids: list
241241
A list of all active NEON data product IDs.
242+
243+
inactive_dpids: list
244+
A list of all inactive NEON data product IDs (productStatus = "FUTURE" / suspended products)
242245
243246
Raises
244247
------
@@ -312,13 +315,15 @@ def validate_aop_dpid(dpid):
312315

313316
def validate_aop_l3_dpid(dpid):
314317
"""
315-
Validates the given AOP data product ID against a pattern and a list of valid Level 3 AOP IDs.
318+
Validates the given AOP data product ID against expected pattern to check if it is downloadable by tile.
319+
If the dpid does not match the expected pattern or is not in the list of active Level 3 AOP data product IDs,
320+
it will raise a value error with a descriptive message.
316321
317322
Parameters:
318323
- dpid (str): The data product ID to validate.
319324
320325
Raises:
321-
- ValueError: If the dpid does not start with DP3 or is not in the list of valid Level 3 AOP data product IDs.
326+
- ValueError: If the dpid is not in the list of AOP data product IDs that are downloadable by tile.
322327
"""
323328
# Check if the dpid starts with DP3 or is DP1.30003.001
324329
if not (dpid.startswith("DP3") or dpid == "DP1.30003.001"):
@@ -1238,7 +1243,7 @@ def get_buffer_coords(easting, northing, buffer):
12381243
input(
12391244
f"Continuing will download {num_files} NEON data files totaling approximately {download_size}. Do you want to proceed? (y/n) "
12401245
)
1241-
!= "y"
1246+
!= ("y" or "Y")
12421247
):
12431248
print("Download halted")
12441249
return

0 commit comments

Comments
 (0)