From abbd14a6022737ca4cb44b7b1fde96728cabd541 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Mon, 8 Apr 2024 21:15:45 +0200 Subject: [PATCH 1/2] update pre-commits --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 67987f8..3710506 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: check-ast @@ -27,7 +27,7 @@ repos: - id: blackdoc - repo: https://github.com/econchick/interrogate - rev: 1.5.0 + rev: 1.7.0 hooks: - id: interrogate exclude: ^(docs|tests) From 2797c636986ad03feb0ce2001c6b8c9e5791227a Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Mon, 8 Apr 2024 21:16:09 +0200 Subject: [PATCH 2/2] use ERDDAP default format --- gliderpy/fetchers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gliderpy/fetchers.py b/gliderpy/fetchers.py index 009d915..8afe13e 100644 --- a/gliderpy/fetchers.py +++ b/gliderpy/fetchers.py @@ -47,7 +47,10 @@ def standardise_df(glider_df: pd.DataFrame, dataset_url: str) -> pd.DataFrame: glider_df.columns = glider_df.columns.str.lower() glider_df = glider_df.set_index("time (utc)") glider_df = glider_df.rename(columns=server_parameter_rename) - glider_df.index = pd.to_datetime(glider_df.index) + glider_df.index = pd.to_datetime( + glider_df.index, + format="%Y-%m-%dT%H:%M:%SZ", + ) # We need to sort b/c of the non-sequential submission of files due to # the nature of glider data transmission. glider_df = glider_df.sort_index()