diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8f968ec8e..7091369ae 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 ^^^^^^^^^^ diff --git a/CI/requirements_upstream.txt b/CI/requirements_upstream.txt index 9650a59df..fdda5324c 100644 --- a/CI/requirements_upstream.txt +++ b/CI/requirements_upstream.txt @@ -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 diff --git a/tests/test_indices.py b/tests/test_indices.py index 2b707f8c1..28f5032a5 100644 --- a/tests/test_indices.py +++ b/tests/test_indices.py @@ -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", [ @@ -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") diff --git a/xclim/testing/utils.py b/xclim/testing/utils.py index e710f9314..dad66b212 100644 --- a/xclim/testing/utils.py +++ b/xclim/testing/utils.py @@ -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: @@ -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( @@ -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,