diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 27c1175b..9bc009cb 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -15,10 +15,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install setuptools setuptools-scm wheel twine check-manifest + python -m pip install build twine check-manifest - name: Build tarball and wheels run: | - python setup.py sdist bdist_wheel + python -m build python -m pip wheel . -w dist --no-deps - name: Test the artifacts run: | @@ -39,10 +39,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install setuptools setuptools-scm wheel twine check-manifest + python -m pip install build twine check-manifest - name: Build tarball and wheels run: | - python setup.py sdist bdist_wheel + python -m build python -m pip wheel . -w dist --no-deps - name: Test the artifacts run: | diff --git a/docs/conf.py b/docs/conf.py index 0b261e58..70482628 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -402,6 +402,18 @@ def update_gallery(app: Sphinx): # add links to ignore during link checking linkcheck_ignore = [r'https://stackoverflow.com/help/*'] +# ignore doi redirect warnings +linkcheck_allowed_redirects = { + "https://doi.org.*": + ".*", + "https://dx.doi.org.*": + ".*", + r"https://github\.com/NCAR/geocat-comp/issues/new*": + r"https://github\.com/login\?return_to=*", + r"https://forms\.gle/*": + r"https://docs\.google\.com/forms*" +} + # Allow for changes to be made to the css in the theme_overrides file def setup(app): diff --git a/docs/contrib.rst b/docs/contrib.rst index 4c8931c1..c29f2db0 100644 --- a/docs/contrib.rst +++ b/docs/contrib.rst @@ -34,9 +34,9 @@ in working on an issue, please comment on the issue to let us know you are working on it. This will help us avoid duplicate work. The code for ``geocat-comp`` is hosted on GitHub. If you do not have one, you -will need to create a `free GitHub account `__. +will need to create a `free GitHub account `__. The `GitHub Quickstart Guide -`__ is a great place to get +`__ is a great place to get started with git and GitHub. ************** @@ -130,7 +130,7 @@ repository. cd geocat-comp git remote add upstream https://github.com/NCAR/geocat-comp.git For more information, see the `GitHub quickstart section on forking a repository -`__. +`__. Create a development environment -------------------------------- @@ -301,7 +301,7 @@ need to modify to incorporate your code into the package. These include: Write and run tests ------------------- -``geocat-comp`` uses `pytest `__ for unit tests, so we +``geocat-comp`` uses `pytest `__ for unit tests, so we encourage you to write new tests using ``pytest`` as well. To run the tests locally, use the following command from the root of the @@ -320,7 +320,7 @@ To run a specific test, use the following command: These tests will also run automatically when you open a pull request using GitHub Actions and the ``.github/workflows/ci.yml`` file. -See the `pytest documentation `__ for more information. +See the `pytest documentation `__ for more information. ************* diff --git a/docs/examples/calendar_average.ipynb b/docs/examples/calendar_average.ipynb index 43c42320..86a6ec40 100644 --- a/docs/examples/calendar_average.ipynb +++ b/docs/examples/calendar_average.ipynb @@ -36,7 +36,7 @@ "\n", "We will get the data from the [geocat-datafiles](https://github.com/NCAR/geocat-datafiles) package. This package contains example data used in many of the examples for geocat packages.\n", "\n", - "Then, we use xarray's [open_dataset](http://xarray.pydata.org/en/stable/generated/xarray.open_dataset.html) function to read the data into an xarray dataset, choose a single model from the ensemble run, and extract its surface temperature data into `temp`" + "Then, we use xarray's [open_dataset](https://docs.xarray.dev/en/stable/generated/xarray.open_dataset.html) function to read the data into an xarray dataset, choose a single model from the ensemble run, and extract its surface temperature data into `temp`" ] }, { diff --git a/docs/examples/climatology_average.ipynb b/docs/examples/climatology_average.ipynb index 22c89009..e041f4ad 100644 --- a/docs/examples/climatology_average.ipynb +++ b/docs/examples/climatology_average.ipynb @@ -35,7 +35,7 @@ "\n", "We will get the data from the [geocat-datafiles](https://github.com/NCAR/geocat-datafiles) package. This package contains example data used in many of the examples for geocat packages.\n", "\n", - "Then, we use xarray's [open_dataset](http://xarray.pydata.org/en/stable/generated/xarray.open_dataset.html) function to read the data into an xarray dataset, choose a single model from the ensemble run, and extract its surface temperature data into `temp`." + "Then, we use xarray's [open_dataset](https://docs.xarray.dev/en/stable/generated/xarray.open_dataset.html) function to read the data into an xarray dataset, choose a single model from the ensemble run, and extract its surface temperature data into `temp`." ] }, { diff --git a/docs/getting_started/overview.rst b/docs/getting_started/overview.rst index fbf9defe..c8351c36 100644 --- a/docs/getting_started/overview.rst +++ b/docs/getting_started/overview.rst @@ -17,14 +17,14 @@ a plethora of scientific analysis packages designed for general use or for niche for learning Python basics and for data analysis workflows. Python also enables scalability through parallel computation which was never possible with NCL, enabling geoscientists to tackle analysis workflows on large volumes of data. -GeoCAT-comp draws from well-established analysis packages like `NumPy `__, `Xarray `__, +GeoCAT-comp draws from well-established analysis packages like `NumPy `__, `Xarray `__, `SciPy `__, and `MetPy `__ to recreate and expand upon NCL functions in pure Python. With so many tools being used under the hood, GeoCAT-comp users have access to geoscience specific computational tools without needing extensive working knowledge of `Pangeo `__ stack. There are syntactical benefits to using the Pangeo stack, one of which is indexing by label. NCL requires the dimensions of input data to be in a particular order. This results in functions with rigid data format requirements and -multiple versions of the same function for different dimension orders. By using `Xarray `__, +multiple versions of the same function for different dimension orders. By using `Xarray `__, GeoCAT-comp avoids those data format requirements. The xarray data structures allow users to `refer to dimensions by label `__ rather than index, thereby removing the need for multiple versions of the same function. This makes it easier for the @@ -42,4 +42,4 @@ GeoCAT-f2py While our goal is to recreate NCL functions in pure Python, translating some NCL routines is challenging and time consuming. To ensure GeoCAT users have access to those functions while we work on full Python versions, the Fortran code they are based upon is wrapped in Python in the GeoCAT-f2py package. Information about -GeoCAT-f2py can be found on the `package's homepage `__. +GeoCAT-f2py can be found on the `package's homepage `__. diff --git a/docs/installation.rst b/docs/installation.rst index 7fa36128..9909349d 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -13,7 +13,7 @@ Installing GeoCAT-comp via Conda in a New Environment ----------------------------------------------------- The easiest way to install GeoCAT-comp is using -`Conda `__:: +`Conda `__:: conda create -n geocat -c conda-forge geocat-comp diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 325876ae..64d8f2a3 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,6 +5,14 @@ Release Notes ============= +v2024.04.0 (Unreleased) +----------------------- +Upcoming release + +Internal Changes +^^^^^^^^^^^^^^^^ +* Reduce DeprecationWarnings in testing by `Cora Schneck`_ in (:pr:`582`) + v2024.03.0 (March 29, 2024) --------------------------- This release includes a bug fix for ``delta_pressure``. @@ -138,7 +146,7 @@ Contributor's Guide to the documentation. New Features ^^^^^^^^^^^^ * User-defined seasonal boundaries, ``custom_seasons``, enabled for - ``climatology_average`` by `Julia Kent`_ in (:pr:`441`) + ``climatology_average`` by `Julia Kent`_ in (:pr:`411`) Bug Fixes ^^^^^^^^^ @@ -183,7 +191,7 @@ Breaking Changes Bug Fixes ^^^^^^^^^ -* Fix bug in ``_temp_extrapolate`` used by ``interp_hybrid_to_pressure`` by `Katelyn FitzGerald`_ in (:pr:`422`) +* Fix bug in ``_temp_extrapolate`` used by ``interp_hybrid_to_pressure`` by `Katelyn FitzGerald`_ in (:pr:`424`) v2023.05.0 (4 May 2023) diff --git a/docs/user_api/index.rst b/docs/user_api/index.rst index bd170f30..1dd7c68f 100644 --- a/docs/user_api/index.rst +++ b/docs/user_api/index.rst @@ -40,7 +40,7 @@ Gradient gradient Interpolation -^^^^^^^^^^^^ +^^^^^^^^^^^^^ .. currentmodule:: geocat.comp.interpolation .. autosummary:: :nosignatures: diff --git a/geocat/comp/climatologies.py b/geocat/comp/climatologies.py index 7010e748..6e5a2425 100644 --- a/geocat/comp/climatologies.py +++ b/geocat/comp/climatologies.py @@ -86,7 +86,7 @@ def _calculate_center_of_time_bounds( Notes ----- - See `xarray.cftime_range `__ for accepted values for `freq` and `calendar`. + See `xarray.cftime_range `__ for accepted values for `freq` and `calendar`. """ time_bounds = xr.cftime_range(start, end, freq=freq, calendar=calendar) diff --git a/geocat/comp/interpolation.py b/geocat/comp/interpolation.py index f3185e6f..32e3de37 100644 --- a/geocat/comp/interpolation.py +++ b/geocat/comp/interpolation.py @@ -136,7 +136,7 @@ def _vertical_remap(func_interpolate, new_levels, xcoords, data, interp_axis=0): def _temp_extrapolate(data, lev_dim, lev, p_sfc, ps, phi_sfc): r"""This helper function extrapolates temperature below ground using the ECMWF formulation described in `Vertical Interpolation and Truncation of - Model-Coordinate Data `__ by Trenberth, + Model-Coordinate Data `__ by Trenberth, Berry, & Buja [NCAR/TN-396, 1993]. Specifically equation 16 is used: .. math:: @@ -191,7 +191,7 @@ def _temp_extrapolate(data, lev_dim, lev, p_sfc, ps, phi_sfc): def _geo_height_extrapolate(t_bot, lev, p_sfc, ps, phi_sfc): r"""This helper function extrapolates geopotential height below ground using the ECMWF formulation described in `Vertical Interpolation and Truncation - of Model-Coordinate Data `__ by + of Model-Coordinate Data `__ by Trenberth, Berry, & Buja [NCAR/TN-396, 1993]. Specifically equation 15 is used: @@ -358,7 +358,7 @@ def interp_hybrid_to_pressure(data: xr.DataArray, extrapolate : bool, optional If True, below ground extrapolation for ``variable`` will be done using - an `ECMWF formulation `__. Defaults + an `ECMWF formulation `__. Defaults to False. variable : str, optional