Skip to content

Commit

Permalink
Merge remote-tracking branch 'base/maint/0.43' into satpy-0.43.0post0
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzodonini committed Sep 21, 2023
2 parents 5b9c8cf + 335cfbc commit 47970c5
Show file tree
Hide file tree
Showing 446 changed files with 53,421 additions and 17,005 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
77 changes: 36 additions & 41 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ concurrency:

on: [push, pull_request]

env:
CACHE_NUMBER: 1

jobs:
lint:
name: lint and style checks
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -29,37 +32,6 @@ jobs:
run: |
flake8 satpy/
website:
name: build website
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: "3.8"
environment-file: continuous_integration/environment.yaml
activate-environment: test-environment

- name: Install Satpy
shell: bash -l {0}
run: |
pip install sphinx sphinx_rtd_theme sphinxcontrib-apidoc; \
pip install --no-deps -e .
- name: Run Sphinx Build
shell: bash -l {0}
run: |
cd doc; \
make html SPHINXOPTS="-W"
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
Expand All @@ -68,10 +40,10 @@ jobs:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.9", "3.10", "3.11"]
experimental: [false]
include:
- python-version: "3.8"
- python-version: "3.11"
os: "ubuntu-latest"
experimental: true

Expand All @@ -83,7 +55,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
Expand All @@ -92,12 +64,30 @@ jobs:
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: continuous_integration/environment.yaml
activate-environment: test-environment

- name: Set cache environment variables
shell: bash -l {0}
run: |
echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
CONDA_PREFIX=$(python -c "import sys; print(sys.prefix)")
echo "CONDA_PREFIX=$CONDA_PREFIX" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: ${{ env.CONDA_PREFIX }}
key: ${{ matrix.os }}-${{matrix.python-version}}-conda-${{ hashFiles('continuous_integration/environment.yaml') }}-${{ env.DATE }}-${{matrix.experimental}}-${{ env.CACHE_NUMBER }}
id: cache

- name: Update environment
run: mamba env update -n test-environment -f continuous_integration/environment.yaml
if: steps.cache.outputs.cache-hit != 'true'

- name: Install unstable dependencies
if: matrix.experimental == true
shell: bash -l {0}
# 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 \
--index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple/ \
Expand All @@ -113,9 +103,12 @@ jobs:
git+https://github.com/dask/distributed \
git+https://github.com/zarr-developers/zarr \
git+https://github.com/Unidata/cftime \
git+https://github.com/mapbox/rasterio \
git+https://github.com/rasterio/rasterio \
git+https://github.com/pydata/bottleneck \
git+https://github.com/pydata/xarray;
git+https://github.com/pydata/xarray \
git+https://github.com/astropy/astropy;
LD_PRELOAD=$(python -c "import sys; print(sys.prefix)")/lib/libstdc++.so
echo "LD_PRELOAD=${LD_PRELOAD}" >> $GITHUB_ENV
- name: Install satpy
shell: bash -l {0}
Expand All @@ -125,10 +118,11 @@ jobs:
- name: Run unit tests
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@v1
uses: codecov/codecov-action@v3
with:
flags: unittests
file: ./coverage.xml
Expand All @@ -144,11 +138,12 @@ jobs:
- 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@v2
uses: codecov/codecov-action@v3
with:
flags: behaviourtests
file: ./coverage.xml
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/deploy-sdist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create sdist
shell: bash -l {0}
run: python setup.py sdist
run: |
python -m pip install -q build
python -m build -s
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.8.7
with:
user: __token__
password: ${{ secrets.pypi_password }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ doc/source/_build/*
# this should be generated automatically when installed
satpy/version.py
doc/source/api/*.rst
doc/source/reader_table.rst
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,35 @@ exclude: '^$'
fail_fast: false
repos:
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear, mccabe]
args: [--max-complexity, "10"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.1' # Update me!
rev: '1.7.5' # Update me!
hooks:
- id: bandit
args: [--ini, .bandit]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.930' # Use the sha / tag you want to point at
rev: 'v1.4.1' # Use the sha / tag you want to point at
hooks:
- id: mypy
additional_dependencies:
- types-docutils
- types-pkg-resources
- types-PyYAML
- types-requests
args: ["--python-version", "3.8", "--ignore-missing-imports"]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
language_version: python3
Expand Down
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"
conda:
environment: doc/rtd_environment.yml
4 changes: 0 additions & 4 deletions .stickler.yml

This file was deleted.

90 changes: 0 additions & 90 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 47970c5

Please sign in to comment.