From 83ca120b721d5abc9e01c2c8db50e6164b1435a3 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Wed, 27 Apr 2022 23:41:30 -0700 Subject: [PATCH 1/5] Remove duplicate tests Merge this in a few days when we know nothing is missing --- .github/workflows/ci-additional.yaml | 88 ---------------------------- 1 file changed, 88 deletions(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 323875aecc5..a45e8261820 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -30,94 +30,6 @@ jobs: with: keyword: "[skip-ci]" - # This job is deprecated and can be removed soon. It's still here in case the - # move consolidate with `ci.yaml` missed something which the existing test - # picks up. - test: - name: ${{ matrix.os }} ${{ matrix.env }} - runs-on: ${{ matrix.os }} - needs: detect-ci-trigger - if: needs.detect-ci-trigger.outputs.triggered == 'false' - defaults: - run: - shell: bash -l {0} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest"] - env: [ - # Minimum python version: - "py38-bare-minimum", - "py38-min-all-deps", - - # Latest python version: - "py39-all-but-dask", - "py39-flaky", - ] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Fetch all history for all branches and tags. - - - name: Set environment variables - run: | - if [[ ${{ matrix.env }} == "py39-flaky" ]] ; - then - echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV - echo "PYTEST_EXTRA_FLAGS=--run-flaky --run-network-tests" >> $GITHUB_ENV - - else - echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV - fi - - - name: Cache conda - uses: actions/cache@v3 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ matrix.env }}-${{ - hashFiles('ci/requirements/**.yml') }} - - - uses: conda-incubator/setup-miniconda@v2 - with: - channels: conda-forge - channel-priority: strict - mamba-version: "*" - activate-environment: xarray-tests - auto-update-conda: false - python-version: 3.9 - use-only-tar-bz2: true - - - name: Install conda dependencies - run: | - mamba env update -f $CONDA_ENV_FILE - - - name: Install xarray - run: | - python -m pip install --no-deps -e . - - - name: Version info - run: | - conda info -a - conda list - python xarray/util/print_versions.py - - name: Import xarray - run: | - python -c "import xarray" - - name: Run tests - run: | - python -m pytest -n 4 \ - --cov=xarray \ - --cov-report=xml \ - $PYTEST_EXTRA_FLAGS - - - name: Upload code coverage to Codecov - uses: codecov/codecov-action@v3.1.0 - with: - file: ./coverage.xml - flags: unittests,${{ matrix.env }} - env_vars: RUNNER_OS - name: codecov-umbrella - fail_ci_if_error: false doctest: name: Doctests runs-on: "ubuntu-latest" From f08f2cffa60a5d7e705a63e5c5e1bbe0ce210333 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Thu, 28 Apr 2022 18:43:22 -0700 Subject: [PATCH 2/5] Add env to cache key --- .github/workflows/ci.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 53db5d9066d..89083adeb7b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,8 +88,7 @@ jobs: uses: actions/cache@v3 with: path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ - hashFiles('ci/requirements/**.yml') }} + key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('ci/requirements/**.yml') }}-${{ matrix.env }} - uses: conda-incubator/setup-miniconda@v2 with: @@ -106,8 +105,7 @@ jobs: uses: actions/cache@v3 with: path: /usr/share/miniconda/envs/xarray-tests - key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ - hashFiles('ci/requirements/**.yml') }} + key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('ci/requirements/**.yml') }}-${{ matrix.env }} - name: Install conda dependencies run: | From da6925cfb35d8a9b21960f733cd7ac6c59267984 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Thu, 28 Apr 2022 23:07:22 -0700 Subject: [PATCH 3/5] --- .github/workflows/ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89083adeb7b..b3820493a15 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: with: keyword: "[skip-ci]" test: - name: ${{ matrix.os }} py${{ matrix.python-version }} + name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.env }} runs-on: ${{ matrix.os }} needs: detect-ci-trigger if: needs.detect-ci-trigger.outputs.triggered == 'false' @@ -46,17 +46,17 @@ jobs: include: # Minimum python version: - env: "py38-bare-minimum" - python-version: 3.8 + python-version: "3.8" os: ubuntu-latest - env: "py38-min-all-deps" - python-version: 3.8 + python-version: "3.8" os: ubuntu-latest # Latest python version: - env: "py39-all-but-dask" - python-version: 3.9 + python-version: "3.9" os: ubuntu-latest - env: "py39-flaky" - python-version: 3.9 + python-version: "3.9" os: ubuntu-latest steps: - uses: actions/checkout@v3 From 5251c85801773da5730c5fb27a9ffb80ebcc0fc5 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Thu, 28 Apr 2022 23:14:22 -0700 Subject: [PATCH 4/5] --- .github/workflows/ci.yaml | 14 +++++++------- .../{py39-all-but-dask.yml => all-but-dask.yml} | 6 +++--- .../{py38-bare-minimum.yml => bare-minimum.yml} | 0 .../{py38-min-all-deps.yml => min-all-deps.yml} | 0 4 files changed, 10 insertions(+), 10 deletions(-) rename ci/requirements/{py39-all-but-dask.yml => all-but-dask.yml} (90%) rename ci/requirements/{py38-bare-minimum.yml => bare-minimum.yml} (100%) rename ci/requirements/{py38-min-all-deps.yml => min-all-deps.yml} (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b3820493a15..b6979dc58cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,18 +45,18 @@ jobs: python-version: ["3.8", "3.10"] include: # Minimum python version: - - env: "py38-bare-minimum" + - env: "bare-minimum" python-version: "3.8" os: ubuntu-latest - - env: "py38-min-all-deps" + - env: "min-all-deps" python-version: "3.8" os: ubuntu-latest # Latest python version: - - env: "py39-all-but-dask" - python-version: "3.9" + - env: "all-but-dask" + python-version: "3.10" os: ubuntu-latest - - env: "py39-flaky" - python-version: "3.9" + - env: "flaky" + python-version: "3.10" os: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -69,7 +69,7 @@ jobs: echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV elif [[ "${{ matrix.env }}" != "" ]] ; then - if [[ "${{ matrix.env }}" == "py39-flaky" ]] ; + if [[ "${{ matrix.env }}" == "flaky" ]] ; then echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV echo "PYTEST_EXTRA_FLAGS=--run-flaky --run-network-tests" >> $GITHUB_ENV diff --git a/ci/requirements/py39-all-but-dask.yml b/ci/requirements/all-but-dask.yml similarity index 90% rename from ci/requirements/py39-all-but-dask.yml rename to ci/requirements/all-but-dask.yml index 9c42d5f3b73..cb9ec8d3bc5 100644 --- a/ci/requirements/py39-all-but-dask.yml +++ b/ci/requirements/all-but-dask.yml @@ -3,7 +3,7 @@ channels: - conda-forge - nodefaults dependencies: - - python=3.9 + - python=3.10 - black - aiobotocore - boto3 @@ -17,7 +17,7 @@ dependencies: - h5py - hdf5 - hypothesis - - lxml # Optional dep of pydap + - lxml # Optional dep of pydap - matplotlib-base - nc-time-axis - netcdf4 @@ -42,4 +42,4 @@ dependencies: - typing_extensions - zarr - pip: - - numbagg + - numbagg diff --git a/ci/requirements/py38-bare-minimum.yml b/ci/requirements/bare-minimum.yml similarity index 100% rename from ci/requirements/py38-bare-minimum.yml rename to ci/requirements/bare-minimum.yml diff --git a/ci/requirements/py38-min-all-deps.yml b/ci/requirements/min-all-deps.yml similarity index 100% rename from ci/requirements/py38-min-all-deps.yml rename to ci/requirements/min-all-deps.yml From 88f1e11c24a892715d9767972b9a988f00c3f879 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Thu, 28 Apr 2022 23:24:20 -0700 Subject: [PATCH 5/5] --- .github/workflows/ci-additional.yaml | 4 ++-- doc/getting-started-guide/installing.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 4be8e24f6cb..358f85298c3 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -132,5 +132,5 @@ jobs: - name: minimum versions policy run: | mamba install -y pyyaml conda python-dateutil - python ci/min_deps_check.py ci/requirements/py38-bare-minimum.yml - python ci/min_deps_check.py ci/requirements/py38-min-all-deps.yml + python ci/min_deps_check.py ci/requirements/bare-minimum.yml + python ci/min_deps_check.py ci/requirements/min-all-deps.yml diff --git a/doc/getting-started-guide/installing.rst b/doc/getting-started-guide/installing.rst index 6177ba0aaac..0668853946f 100644 --- a/doc/getting-started-guide/installing.rst +++ b/doc/getting-started-guide/installing.rst @@ -102,7 +102,7 @@ release is guaranteed to work. You can see the actual minimum tested versions: -``_ +``_ .. _installation-instructions: