Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dist/neonutilities-1.1.1-py3-none-any.whl
Binary file not shown.
Binary file modified dist/neonutilities-1.1.1.tar.gz
Binary file not shown.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ version = "1.1.1"
authors = [
{name="Claire Lunch", email="clunch@battelleecology.org"},
{name="Bridget Hass", email="bhass@battelleecology.org"},
{name="Zachary Nickerson", email="nickerson@battelleecology.org"}
{name="Zachary Nickerson", email="nickerson@battelleecology.org"},
{name="Michelle Sunderman", email="sunderman@battelleecology.org"}
]
description="A package for accessing and wrangling data generated and published by the National Ecological Observatory Network."
readme = "README.md"
Expand All @@ -20,7 +21,8 @@ dependencies = [
"pyarrow",
"pyproj",
"requests",
"tqdm"
"tqdm",
"h5py"
]

[project.license]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pyarrow>=16.0.0
pyproj>=3.6.1
requests>=2.31.0
tqdm>=4.66.2
google_crc32c>=1.7.0
h5py>=3.14.0
google_crc32c>=1.7.0
3 changes: 2 additions & 1 deletion src/neonutilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
stack_by_table,
load_by_product,
dataset_query,
)
)
from .stack_eddy import stack_eddy
11 changes: 8 additions & 3 deletions src/neonutilities/get_issue_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def get_change_log_df(dpid, token=None):
return None
all_product_info = pd.json_normalize(req.json()["data"])
change_log_df = pd.DataFrame(all_product_info["changeLogs"][0])
if not change_log_df.empty:
change_log_df = change_log_df.astype({'id': 'int32', 'parentIssueID': 'str', 'issueDate': 'str',
'resolvedDate': 'str', 'dateRangeStart': 'str', 'dateRangeEnd': 'str',
'locationAffected': 'str', 'issue': 'str', 'resolution': 'str'})

return change_log_df

Expand Down Expand Up @@ -108,13 +112,14 @@ def get_eddy_issue_log(dpid, token=None):

eddy_issue_log_list = []

for dpid in bundle_dps:
change_log_df = get_change_log_df(dpid, token=token)
for dp in bundle_dps:
change_log_df = get_change_log_df(dp, token=token)
if change_log_df is not None and not change_log_df.empty:
change_log_df["dpid"] = dpid
change_log_df.insert(loc=0, column="dpid", value=dp)
eddy_issue_log_list.append(change_log_df)

eddy_issue_log_df = pd.concat(eddy_issue_log_list, ignore_index=True)
eddy_issue_log_df = eddy_issue_log_df.drop_duplicates()

return eddy_issue_log_df

Expand Down
Loading