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

Add python 3.12/drop 3.7 #69

Merged
merged 4 commits into from
Aug 28, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
fail-fast: [false]

steps:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ platforms = any
classifiers =
Development Status :: 4 - Beta
Programming Language :: Python
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Expand Down
3 changes: 0 additions & 3 deletions src/pywaterinfo/waterinfo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pkg_resources

import datetime
import logging
import pandas as pd
Expand Down Expand Up @@ -30,7 +28,6 @@
VMM_AUTH = "http://download.waterinfo.be/kiwis-auth/token"
HIC_BASE = "https://hicws.vlaanderen.be/KiWIS/KiWIS"
HIC_AUTH = "https://hicwsauth.vlaanderen.be/auth"
DATA_PATH = pkg_resources.resource_filename(__name__, "./data")

# Custom hard-coded fix for the decoding issue #1 of given returnfields
DECODE_ERRORS = ["AV Quality Code Color", "RV Quality Code Color"]
Expand Down
8 changes: 3 additions & 5 deletions tests/test_waterinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import pandas as pd
import pytz
import sys
from pandas.api import types
from pandas.api.types import is_datetime64tz_dtype

from pywaterinfo import HIC_BASE, VMM_BASE, Waterinfo
from pywaterinfo.waterinfo import WaterinfoException
Expand Down Expand Up @@ -217,14 +215,14 @@ def test_utc_default_return(self, connection, df_timeseries): # noqa
"""Check that the returned dates are UTC aware and according to the user
input in UTC
"""
assert is_datetime64tz_dtype(df_timeseries["Timestamp"])
assert isinstance(df_timeseries["Timestamp"].dtype, pd.DatetimeTZDtype)
assert df_timeseries.loc[0, "Timestamp"] == pd.to_datetime(
"2019-05-01T00:00:00.000Z"
)
assert df_timeseries["Timestamp"].min() == pd.to_datetime(
"2019-05-01T00:00:00.000Z"
)
assert types.is_datetime64tz_dtype(pd.to_datetime(df_timeseries["Timestamp"]))
assert isinstance(df_timeseries["Timestamp"].dtype, pd.DatetimeTZDtype)
assert (
pd.to_datetime(df_timeseries.loc[0, "Timestamp"]).tz
== datetime.timezone.utc
Expand Down Expand Up @@ -477,7 +475,7 @@ def test_datetime_conversion(self, connection, request):
df = connection.get_timeseries_values(
ts_id="60992042,60968042", start="20190501 14:05", end="20190501 14:10"
)
assert pd.core.dtypes.common.is_datetime64tz_dtype(df["Timestamp"])
assert isinstance(df["Timestamp"].dtype, pd.DatetimeTZDtype)


@pytest.mark.parametrize("connection", ["vmm_connection", "vmm_cached_connection"])
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = pywaterinfo

[tox]
minversion = 3.15
envlist = py{37,38,39,310,311}
envlist = py{38,39,310,311,312}
skip_missing_interpreters=true


Expand Down
Loading