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

Disable upstream numpy until numba supports it, use raw.githubusercontent #1961

Merged
merged 4 commits into from
Oct 17, 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: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ Internal changes
* Adjusted `mypy` checks to be more standardized.
* Renamed annual deprecated frequency alias `"A"` to `"Y"` (:pull:`1930`).
* The ``indices`` documentation now includes the members of ``xclim.indices.stats``. (:issue:`1913`, :pull:`1958`).
* The default URL for fetching testing data is now set to the ``raw.githubusercontent.com`` mirror of `xclim-testdata`. (:pull:`1961`).
* The ``upstream`` `tox` environment has been updated to not install the latest `numpy` until `numba` supports it. (:pull:`1961`).

CI changes
^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion CI/requirements_upstream.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bottleneck @ git+https://github.com/pydata/bottleneck.git@master
cftime @ git+https://github.com/Unidata/cftime.git@master
flox @ git+https://github.com/xarray-contrib/flox.git@main
numpy @ git+https://github.com/numpy/numpy.git@main
# numpy @ git+https://github.com/numpy/numpy.git@main
xarray @ git+https://github.com/pydata/xarray.git@main
2 changes: 2 additions & 0 deletions tests/test_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ class TestStandardizedIndices:
# Repeated tests with lower tolerance means we want a more precise comparison, so we compare
# the current version of XClim with the version where the test was implemented
@pytest.mark.slow
@pytest.mark.filterwarnings("ignore:dt.weekofyear and dt.week have been deprecated")
@pytest.mark.parametrize(
"freq, window, dist, method, values, diff_tol",
[
Expand Down Expand Up @@ -2227,6 +2228,7 @@ def test_static_freeze_thaw_cycles(self, tasmin_series, tasmax_series):


class TestTemperatureSeasonality:

def test_simple(self, tas_series):
a = np.zeros(365)
a = tas_series(a + K2C, start="1971-01-01")
Expand Down
8 changes: 5 additions & 3 deletions xclim/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
default_testdata_version = "v2024.8.23"
"""Default version of the testing data to use when fetching datasets."""

default_testdata_repo_url = "https://github.com/Ouranosinc/xclim-testdata"
default_testdata_repo_url = (
"https://raw.githubusercontent.com/Ouranosinc/xclim-testdata/"
)
"""Default URL of the testing data repository to use when fetching datasets."""

try:
Expand Down Expand Up @@ -433,7 +435,7 @@ def load_registry(
dict
Dictionary of filenames and hashes.
"""
remote_registry = audit_url(f"{repo}/raw/{branch}/data/registry.txt")
remote_registry = audit_url(f"{repo}/{branch}/data/registry.txt")

if branch != default_testdata_version:
custom_registry_folder = Path(
Expand Down Expand Up @@ -510,7 +512,7 @@ def nimbus( # noqa: PR01
"You can install it with `pip install pooch` or `pip install xclim[dev]`."
)

remote = audit_url(f"{repo}/raw/{branch}/data")
remote = audit_url(f"{repo}/{branch}/data")
return pooch.create(
path=cache_dir,
base_url=remote,
Expand Down
Loading