Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: Update code to remove warnings for datetime and pandas. #878

Merged
merged 2 commits into from
Nov 12, 2024
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
4 changes: 2 additions & 2 deletions act/io/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"""

import copy
import datetime as dt
import glob
import json
import re
import tarfile
import tempfile
import urllib
import warnings
from datetime import datetime, timezone
from os import PathLike
from pathlib import Path, PosixPath

Expand Down Expand Up @@ -766,7 +766,7 @@ def write_netcdf(
except KeyError:
pass

current_time = dt.datetime.utcnow().replace(microsecond=0)
current_time = datetime.now(timezone.utc).replace(microsecond=0)
history_value = (
f'Written to file by ACT-{act.__version__} '
f'with write_netcdf() at {current_time} UTC'
Expand Down
2 changes: 1 addition & 1 deletion tests/plotting/test_timeseriesdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def test_xlim_correction_plot():
@pytest.mark.mpl_image_compare(tolerance=10)
def test_plot_stripes():
ds = act.io.read_arm_netcdf(sample_files.EXAMPLE_MET_WILDCARD)
ds = ds.resample(time='1H').mean()
ds = ds.resample(time='1h').mean()
print(ds)
reference_period = ['2019-01-01', '2019-10-02']

Expand Down