Skip to content

Commit

Permalink
Add 3.12 support, remove deps no longer used (#78)
Browse files Browse the repository at this point in the history
* Add 3.12 support, remove deps no longer used

* appease lint

* Remove more rioxarray relics
  • Loading branch information
mpiannucci committed Sep 3, 2024
1 parent b8c40ba commit 931dd3f
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[settings]
known_third_party = numpy,pytest,requests,setuptools,xpublish,xarray,shapely,fastapi,pydantic,cf_xarray,rioxarray,Pillow,matplotlib
known_third_party = numpy,pytest,requests,setuptools,xpublish,xarray,shapely,fastapi,pydantic,cf_xarray,Pillow,matplotlib
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "xpublish_wms"
authors = [{ name = "Matthew Iannucci", email = "[email protected]" }]
description = "WMS plugin for xpublish"
readme = "README.md"
requires-python = ">=3.9,<3.12"
requires-python = ">=3.9,<3.13"
keywords = ["xarray", "xpublish", "wms"]
license = { file = "LICENSE.txt" }

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ cf_xarray
datashader
matplotlib
Pillow
rioxarray>=0.12.2
scikit-learn
xarray
xpublish>=0.3.0,<0.4.0
18 changes: 0 additions & 18 deletions xpublish_wms/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import math
from typing import Union

import cartopy.geodesic
import numpy as np
Expand Down Expand Up @@ -49,23 +48,6 @@ def speed_and_dir_for_uv(u, v):
return [speed, dir]


def ensure_crs(
ds: Union[xr.Dataset, xr.DataArray],
default_crs: str = "EPSG:4326",
) -> Union[xr.Dataset, xr.DataArray]:
"""
Ensure our dataset has a CRS
:param ds:
:param default_crs:
:return:
"""
# logger.debug(f"CRS found in dataset : {ds.rio.crs}")
if not ds.rio.crs:
logger.debug(f"Settings default CRS : {default_crs}")
ds.rio.write_crs(default_crs, inplace=True)
return ds


def lnglat_to_cartesian(longitude, latitude):
"""
Converts latitude and longitude to cartesian coordinates
Expand Down
1 change: 0 additions & 1 deletion xpublish_wms/wms/get_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import matplotlib.cm as cm
import numpy as np
import pandas as pd
import rioxarray # noqa
import xarray as xr
from fastapi.responses import StreamingResponse

Expand Down

0 comments on commit 931dd3f

Please sign in to comment.