From b3d7bea59e66f46e2f1c3587aff88711d0b27b4c Mon Sep 17 00:00:00 2001 From: Bill Little Date: Wed, 7 Apr 2021 13:38:01 +0100 Subject: [PATCH] linux kernel version fix for conda 4.10+ --- .cirrus.yml | 7 +++++++ lib/iris/fileformats/netcdf.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ca569feb63..250e9c37c9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -63,7 +63,9 @@ linux_task_template: &LINUX_TASK_TEMPLATE - echo "${CIRRUS_OS} $(sha256sum miniconda.sh)" - echo "${CONDA_CACHE_PACKAGES}" - echo "$(date +%Y).$(expr $(date +%U) / ${CACHE_PERIOD}):${CONDA_CACHE_BUILD}" + - uname -r populate_script: + - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - bash miniconda.sh -b -p ${HOME}/miniconda - conda config --set always_yes yes --set changeps1 no - conda config --set show_channel_urls True @@ -146,6 +148,7 @@ test_minimal_task: memory: 4G << : *LINUX_TASK_TEMPLATE tests_script: + - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - echo "[Resources]" > ${SITE_CFG} - echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG} - nox --session tests -- --verbose @@ -172,6 +175,7 @@ test_full_task: << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: + - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - echo "[Resources]" > ${SITE_CFG} - echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG} - echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG} @@ -195,6 +199,7 @@ gallery_task: << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: + - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - echo "[Resources]" > ${SITE_CFG} - echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG} - echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG} @@ -221,6 +226,7 @@ doctest_task: << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: + - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - echo "[Resources]" > ${SITE_CFG} - echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG} - echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG} @@ -249,6 +255,7 @@ linkcheck_task: MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc << : *LINUX_TASK_TEMPLATE tests_script: + - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - mkdir -p ${MPL_RC_DIR} - echo "backend : agg" > ${MPL_RC_FILE} - echo "image.cmap : viridis" >> ${MPL_RC_FILE} diff --git a/lib/iris/fileformats/netcdf.py b/lib/iris/fileformats/netcdf.py index bb7a870d58..def393f0a3 100644 --- a/lib/iris/fileformats/netcdf.py +++ b/lib/iris/fileformats/netcdf.py @@ -1043,7 +1043,7 @@ def write( dtype(i.e. 'i2', 'short', 'u4') or a dict of packing parameters as described below. This provides support for netCDF data packing as described in - http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#bp_Packed-Data-Values + http://www.unidata.ucar.edu/software/netcdf/documentation/NUG/best_practices.html#bp_Packed-Data-Values If this argument is a type (or type string), appropriate values of scale_factor and add_offset will be automatically calculated based on `cube.data` and possible masking. For more control, pass a dict @@ -2589,7 +2589,7 @@ def save( (i.e. 'i2', 'short', 'u4') or a dict of packing parameters as described below or an iterable of such types, strings, or dicts. This provides support for netCDF data packing as described in - http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#bp_Packed-Data-Values + http://www.unidata.ucar.edu/software/netcdf/documentation/NUG/best_practices.html#bp_Packed-Data-Values If this argument is a type (or type string), appropriate values of scale_factor and add_offset will be automatically calculated based on `cube.data` and possible masking. For more control, pass a dict with