diff --git a/CHANGES.rst b/CHANGES.rst index dbbbed452..4e2865383 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -22,6 +22,7 @@ Bug fixes * Optimization of indicators ``huglin_index`` and ``biologically_effective_degree_days`` when used with dask and flox. As a side effect, the indice functions (i.e. under ``xc.indices``) no longer mask incomplete periods. The indicators' output is unchanged under the default "check_missing" setting (:issue:`1494`, :pull:`1495`). * Fixed ``xclim.indices.run_length.lazy_indexing`` which would sometimes trigger the loading of auxiliary coordinates. (:issue:`1483`, :pull:`1484`). * Indicators ``snd_season_length`` and ``snw_season_length`` will return 0 instead of NaN if all inputs have a (non-NaN) zero snow depth (or water-equivalent thickness). (:pull:`1492`, :issue:`1491`) +* Fixed a bug in the `pytest` configuration that could prevent testing data caching from occurring in systems where the platform-dependent cache directory is not found in the user's home. (:issue:`1468`, :pull:`1473`). Breaking changes ^^^^^^^^^^^^^^^^ diff --git a/setup.cfg b/setup.cfg index 04ac2d1dd..e153a6d6a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.45.11-beta +current_version = 0.45.12-beta commit = True tag = False parse = (?P\d+)\.(?P\d+).(?P\d+)(\-(?P[a-z]+))? diff --git a/tests/conftest.py b/tests/conftest.py index c3e5404d2..b1afa8b23 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -450,7 +450,7 @@ def gather_session_data(threadsafe_data_dir, worker_id, xdoctest_namespace): if worker_id in "master": helpers.populate_testing_data(branch=helpers.TESTDATA_BRANCH) else: - _default_cache_dir.mkdir(exist_ok=True) + _default_cache_dir.mkdir(exist_ok=True, parents=True) test_data_being_written = FileLock(_default_cache_dir.joinpath(".lock")) with test_data_being_written as fl: # This flag prevents multiple calls from re-attempting to download testing data in the same pytest run diff --git a/xclim/__init__.py b/xclim/__init__.py index 07780edfd..ab46067ed 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -11,7 +11,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.45.11-beta" +__version__ = "0.45.12-beta" # Load official locales diff --git a/xclim/testing/utils.py b/xclim/testing/utils.py index ecd202c51..b4ca456eb 100644 --- a/xclim/testing/utils.py +++ b/xclim/testing/utils.py @@ -232,7 +232,7 @@ def _get( if not local_file.is_file(): # This will always leave this directory on disk. # We may want to add an option to remove it. - local_file.parent.mkdir(parents=True, exist_ok=True) + local_file.parent.mkdir(exist_ok=True, parents=True) url = "/".join((github_url, "raw", branch, fullname.as_posix())) logger.info(f"Fetching remote file: {fullname.as_posix()}")