From f4b90e9da64be3713b3d9abfaa3e57b97be6eb6c Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 15 Aug 2023 09:22:00 -0500 Subject: [PATCH 1/5] Slim down CI for easier debugging --- .github/workflows/ci.yaml | 66 +++------------------------------------ 1 file changed, 4 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ebbe68f0c..477930cba6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,36 +11,15 @@ env: CACHE_NUMBER: 1 jobs: - lint: - name: lint and style checks - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 flake8-docstrings flake8-debugger flake8-bugbear pytest - - name: Install Satpy - run: | - pip install -e . - - name: Run linting - run: | - flake8 satpy/ test: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} - needs: [lint] strategy: fail-fast: true matrix: - os: ["windows-latest", "ubuntu-latest", "macos-latest"] - python-version: ["3.9", "3.10", "3.11"] + os: ["ubuntu-latest"] + python-version: ["3.11"] experimental: [false] include: - python-version: "3.11" @@ -89,12 +68,12 @@ jobs: # We must get LD_PRELOAD for stdlibc++ or else the manylinux wheels # may break the conda-forge libraries trying to use newer glibc versions run: | - python -m pip install --pre --upgrade --no-deps numpy; \ python -m pip install \ --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ --trusted-host pypi.anaconda.org \ --no-deps --pre --upgrade \ matplotlib \ + numpy \ pandas \ scipy; \ python -m pip install \ @@ -119,41 +98,4 @@ jobs: shell: bash -l {0} run: | export LD_PRELOAD=${{ env.LD_PRELOAD }}; - pytest --cov=satpy satpy/tests --cov-report=xml --cov-report= - - - name: Upload unittest coverage to Codecov - uses: codecov/codecov-action@v3 - with: - flags: unittests - file: ./coverage.xml - env_vars: OS,PYTHON_VERSION,UNSTABLE - - - name: Coveralls Parallel - uses: AndreMiras/coveralls-python-action@develop - with: - flag-name: run-${{ matrix.test_number }} - parallel: true - if: runner.os == 'Linux' - - - name: Run behaviour tests - shell: bash -l {0} - run: | - export LD_PRELOAD=${{ env.LD_PRELOAD }}; - coverage run --source=satpy -m behave satpy/tests/features --tags=-download - coverage xml - - - name: Upload behaviour test coverage to Codecov - uses: codecov/codecov-action@v3 - with: - flags: behaviourtests - file: ./coverage.xml - env_vars: OS,PYTHON_VERSION,UNSTABLE - - coveralls: - needs: [test] - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: AndreMiras/coveralls-python-action@develop - with: - parallel-finished: true + pytest satpy/tests From 5705f4db4e1e67eb8a37028442da63a7e7641d9f Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 15 Aug 2023 10:10:16 -0500 Subject: [PATCH 2/5] Try just viirs compact tests --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 477930cba6..03f0a88016 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -98,4 +98,4 @@ jobs: shell: bash -l {0} run: | export LD_PRELOAD=${{ env.LD_PRELOAD }}; - pytest satpy/tests + pytest satpy/tests/reader_tests/test_viirs_compact.py From 326b4df7e440cc5188832db9a29de47bc72a5264 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 15 Aug 2023 10:18:58 -0500 Subject: [PATCH 3/5] Remove bokeh upper limit from CI environment --- continuous_integration/environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/environment.yaml b/continuous_integration/environment.yaml index 48976401a2..e1b52b384e 100644 --- a/continuous_integration/environment.yaml +++ b/continuous_integration/environment.yaml @@ -55,7 +55,7 @@ dependencies: - xarray-datatree - pint-xarray - ephem - - bokeh<3 + - bokeh - pip: - trollsift - trollimage>=1.20 From 91310cc8e57f106d8b92cefb119b615891c0561c Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 15 Aug 2023 10:46:28 -0500 Subject: [PATCH 4/5] Revert changes to ci.yaml --- .github/workflows/ci.yaml | 64 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 03f0a88016..faa0aea2cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,15 +11,36 @@ env: CACHE_NUMBER: 1 jobs: + lint: + name: lint and style checks + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 flake8-docstrings flake8-debugger flake8-bugbear pytest + - name: Install Satpy + run: | + pip install -e . + - name: Run linting + run: | + flake8 satpy/ test: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} + needs: [lint] strategy: fail-fast: true matrix: - os: ["ubuntu-latest"] - python-version: ["3.11"] + os: ["windows-latest", "ubuntu-latest", "macos-latest"] + python-version: ["3.9", "3.10", "3.11"] experimental: [false] include: - python-version: "3.11" @@ -98,4 +119,41 @@ jobs: shell: bash -l {0} run: | export LD_PRELOAD=${{ env.LD_PRELOAD }}; - pytest satpy/tests/reader_tests/test_viirs_compact.py + pytest --cov=satpy satpy/tests --cov-report=xml --cov-report= + + - name: Upload unittest coverage to Codecov + uses: codecov/codecov-action@v3 + with: + flags: unittests + file: ./coverage.xml + env_vars: OS,PYTHON_VERSION,UNSTABLE + + - name: Coveralls Parallel + uses: AndreMiras/coveralls-python-action@develop + with: + flag-name: run-${{ matrix.test_number }} + parallel: true + if: runner.os == 'Linux' + + - name: Run behaviour tests + shell: bash -l {0} + run: | + export LD_PRELOAD=${{ env.LD_PRELOAD }}; + coverage run --source=satpy -m behave satpy/tests/features --tags=-download + coverage xml + + - name: Upload behaviour test coverage to Codecov + uses: codecov/codecov-action@v3 + with: + flags: behaviourtests + file: ./coverage.xml + env_vars: OS,PYTHON_VERSION,UNSTABLE + + coveralls: + needs: [test] + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: AndreMiras/coveralls-python-action@develop + with: + parallel-finished: true From 4d54512565ebd3ffaf9f4c5e35252295ac29ac42 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 15 Aug 2023 10:56:21 -0500 Subject: [PATCH 5/5] Reset CI cache number to force updating packages --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index faa0aea2cc..b2b53c691b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ concurrency: on: [push, pull_request] env: - CACHE_NUMBER: 1 + CACHE_NUMBER: 0 jobs: lint: