From 258fb58209d68f2bee93a40aab97e1c6266c3899 Mon Sep 17 00:00:00 2001 From: Zach Sherman <19153455+zssherman@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:28:05 -0500 Subject: [PATCH] MNT: Attempt to remove pinning and fixes for ruff errors. (#1666) * MNT: Remove pinning from requirements. * MNT: Remove pinning from environment file. * STY: PEP8 fixes. * STY: Fix for misordered imports. * STY: Revert old check. * CI: Update wheels.yml to use latest OS. --- .github/workflows/wheels.yml | 4 ++-- continuous_integration/environment-ci.yml | 2 +- examples/plotting/radar-cross-section.ipynb | 1 + pyart/graph/radarmapdisplay_basemap.py | 2 +- requirements.txt | 6 +++--- tests/io/test_cfradial.py | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8fbc410482d..044ba2d8fe5 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -26,8 +26,8 @@ jobs: strategy: matrix: os: [ - ubuntu-20.04, - windows-2019, + ubuntu-latest, + windows-latest, macos-14, macos-13, ] diff --git a/continuous_integration/environment-ci.yml b/continuous_integration/environment-ci.yml index a0e9c5b81e2..cc74e5e51e3 100644 --- a/continuous_integration/environment-ci.yml +++ b/continuous_integration/environment-ci.yml @@ -24,7 +24,7 @@ dependencies: - cftime - setuptools - shapely - - ruff==0.4.2 + - ruff - mda-xdrlib - xradar - pooch diff --git a/examples/plotting/radar-cross-section.ipynb b/examples/plotting/radar-cross-section.ipynb index 4fe48a2ca0a..36c8cacd27f 100644 --- a/examples/plotting/radar-cross-section.ipynb +++ b/examples/plotting/radar-cross-section.ipynb @@ -7,6 +7,7 @@ "metadata": {}, "outputs": [], "source": [ + "import cartopy.crs as ccrs\n", "import matplotlib.pyplot as plt\n", "\n", "import pyart\n", diff --git a/pyart/graph/radarmapdisplay_basemap.py b/pyart/graph/radarmapdisplay_basemap.py index d0972771f3d..50582b67016 100644 --- a/pyart/graph/radarmapdisplay_basemap.py +++ b/pyart/graph/radarmapdisplay_basemap.py @@ -288,7 +288,7 @@ def plot_ppi_map( data = np.ma.masked_outside(data, vmin, vmax) # create the basemap if not provided - if type(basemap) != Basemap: + if not isinstance(basemap, Basemap): using_corners = None not in [min_lon, min_lat, max_lon, max_lat] if using_corners: basemap = Basemap( diff --git a/requirements.txt b/requirements.txt index 736c3569c00..cec082875de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ numpy scipy -netCDF4>=1.7.0 +netCDF4 matplotlib pooch cftime fsspec s3fs open_radar_data -xradar>=0.5.0 +xradar pandas mda-xdrlib -xarray!=0.21.0 +xarray cartopy pint diff --git a/tests/io/test_cfradial.py b/tests/io/test_cfradial.py index 443100bf5b0..6b6115dc50e 100644 --- a/tests/io/test_cfradial.py +++ b/tests/io/test_cfradial.py @@ -486,7 +486,7 @@ def attribute_equal(class1, class2, key, allow_str_case_diff=True): a1 = getattr(class1, key) a2 = getattr(class2, key) - assert type(a1) == type(a2) + assert type(a1) == type(a2) # noqa if isinstance(a1, str) and allow_str_case_diff: assert a1.upper() == a2.upper()