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

Reduce DeprecationWarnings in Testing #582

Merged
merged 23 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
55db30c
set data.chunks inputs to include dims
cyschneck Mar 22, 2024
619b888
filter invalid sqrt warning
cyschneck Mar 25, 2024
c7f76e2
Merge branch 'NCAR:main' into deprecation_477
cyschneck Mar 25, 2024
21a842c
update release-notes.rst
cyschneck Mar 26, 2024
2d36ce5
Merge branch 'NCAR:main' into deprecation_477
cyschneck Mar 28, 2024
57f5ac8
Merge branch 'NCAR:main' into deprecation_477
cyschneck Mar 29, 2024
50bd77e
update release-notes.rst
cyschneck Mar 29, 2024
8bb8c84
filter out of bounds warning
cyschneck Mar 30, 2024
44b7e94
Merge branch 'NCAR:main' into deprecation_477
cyschneck Apr 2, 2024
cf42ec0
revert interpolation to data.chunk
cyschneck Apr 3, 2024
f18214c
remove interpolation filter warning
cyschneck Apr 4, 2024
db18810
Merge branch 'NCAR:main' into deprecation_477
cyschneck Apr 9, 2024
f8165dd
remove directly invoking setup.py
cyschneck Apr 9, 2024
ccd10d9
Update docs/release-notes.rst
cyschneck Apr 9, 2024
fc0dc5a
update redirect links, fix PR links
cyschneck Apr 10, 2024
4f7a45a
Merge branch 'deprecation_477' of https://github.com/cyschneck/geocat…
cyschneck Apr 10, 2024
3fc4aaa
Update docs/contrib.rst
cyschneck Apr 16, 2024
244c594
Merge branch 'NCAR:main' into deprecation_477
cyschneck Apr 16, 2024
00c9903
ignore redirects from doi
cyschneck Apr 16, 2024
a594df9
Merge branch 'deprecation_477' of https://github.com/cyschneck/geocat…
cyschneck Apr 16, 2024
3cb90e0
ignore redirects for google forms, update docs for stable URL
cyschneck Apr 16, 2024
b75a39f
github.com issues redirect regex
cyschneck Apr 16, 2024
bffe381
remove filter warnings with heat_index negative sqrt
cyschneck Apr 16, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
kafitzgerald marked this conversation as resolved.
Show resolved Hide resolved
- 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: |
Expand All @@ -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: |
Expand Down
12 changes: 12 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 5 additions & 5 deletions docs/contrib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/signup/free>`__.
will need to create a `free GitHub account <https://github.com/signup>`__.
The `GitHub Quickstart Guide
<https://docs.github.com/en/get-started/quickstart>`__ is a great place to get
<https://docs.github.com/en/get-started/start-your-journey>`__ is a great place to get
started with git and GitHub.

**************
Expand Down Expand Up @@ -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
<https://docs.github.com/en/get-started/quickstart/fork-a-repo>`__.
<https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo>`__.

Create a development environment
--------------------------------
Expand Down Expand Up @@ -301,7 +301,7 @@ need to modify to incorporate your code into the package. These include:
Write and run tests
-------------------

``geocat-comp`` uses `pytest <https://pytest.org/>`__ for unit tests, so we
``geocat-comp`` uses `pytest <https://docs.pytest.org/en/stable/>`__ 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
Expand All @@ -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 <https://pytest.org/>`__ for more information.
See the `pytest documentation <https://docs.pytest.org/en/stable/>`__ for more information.


*************
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/calendar_average.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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`"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/climatology_average.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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`."
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://numpy.org/>`__, `Xarray <https://docs.xarray.dev/>`__,
GeoCAT-comp draws from well-established analysis packages like `NumPy <https://numpy.org/>`__, `Xarray <https://docs.xarray.dev/en/stable/>`__,
`SciPy <https://scipy.org/>`__, and `MetPy <https://unidata.github.io/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 <https://pangeo.io/>`__ 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 <https://docs.xarray.dev/>`__,
multiple versions of the same function for different dimension orders. By using `Xarray <https://docs.xarray.dev/en/stable/>`__,
GeoCAT-comp avoids those data format requirements. The xarray data structures allow users to
`refer to dimensions by label <https://docs.xarray.dev/en/stable/getting-started-guide/why-xarray.html#what-labels-enable>`__
rather than index, thereby removing the need for multiple versions of the same function. This makes it easier for the
Expand All @@ -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 <https://geocat-f2py.readthedocs.io/>`__.
GeoCAT-f2py can be found on the `package's homepage <https://geocat-f2py.readthedocs.io/en/latest/>`__.
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Installing GeoCAT-comp via Conda in a New Environment
-----------------------------------------------------

The easiest way to install GeoCAT-comp is using
`Conda <http://conda.pydata.org/docs/>`__::
`Conda <https://docs.conda.io/projects/conda/en/latest/>`__::

conda create -n geocat -c conda-forge geocat-comp

Expand Down
12 changes: 10 additions & 2 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down Expand Up @@ -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`)
cyschneck marked this conversation as resolved.
Show resolved Hide resolved

Bug Fixes
^^^^^^^^^
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/user_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Gradient
gradient

Interpolation
^^^^^^^^^^^^
^^^^^^^^^^^^^
.. currentmodule:: geocat.comp.interpolation
.. autosummary::
:nosignatures:
Expand Down
2 changes: 1 addition & 1 deletion geocat/comp/climatologies.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _calculate_center_of_time_bounds(

Notes
-----
See `xarray.cftime_range <http://xarray.pydata.org/en/stable/generated/xarray.cftime_range.html>`__ for accepted values for `freq` and `calendar`.
See `xarray.cftime_range <https://docs.xarray.dev/en/stable/generated/xarray.cftime_range.html>`__ for accepted values for `freq` and `calendar`.
"""

time_bounds = xr.cftime_range(start, end, freq=freq, calendar=calendar)
Expand Down
6 changes: 3 additions & 3 deletions geocat/comp/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://dx.doi.org/10.5065/D6HX19NH>`__ by Trenberth,
Model-Coordinate Data <https://dx.doi.org/10.5065/D6HX19NH>`__ by Trenberth,
Berry, & Buja [NCAR/TN-396, 1993]. Specifically equation 16 is used:

.. math::
Expand Down Expand Up @@ -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 <http://dx.doi.org/10.5065/D6HX19NH>`__ by
of Model-Coordinate Data <https://dx.doi.org/10.5065/D6HX19NH>`__ by
Trenberth, Berry, & Buja [NCAR/TN-396, 1993]. Specifically equation 15 is
used:

Expand Down Expand Up @@ -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 <http://dx.doi.org/10.5065/D6HX19NH>`__. Defaults
an `ECMWF formulation <https://dx.doi.org/10.5065/D6HX19NH>`__. Defaults
to False.

variable : str, optional
Expand Down
Loading