Skip to content

Commit

Permalink
Merge branch 'main' into sum_fillvalue
Browse files Browse the repository at this point in the history
  • Loading branch information
pnuu committed Dec 15, 2023
2 parents f2e171b + a5bc062 commit f4e0f69
Show file tree
Hide file tree
Showing 174 changed files with 17,338 additions and 8,201 deletions.
3 changes: 3 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[bandit]
skips: B506
exclude: pyresample/test,pyresample/version.py,versioneer.py
36 changes: 0 additions & 36 deletions .bumpversion.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
```
#### Problem description

[this should also explain **why** the current behaviour is a problem and why the
[this should also explain **why** the current behaviour is a problem and why the
expected output is a better solution.]

#### Expected Output
Expand Down
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"
22 changes: 13 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: CI
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
# https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types#pullrequestevent
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
cancel-in-progress: true

on: [push, pull_request]

Expand All @@ -10,10 +15,10 @@ jobs:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.7", "3.8"]
python-version: ["3.9", "3.11", "3.12"]
experimental: [false]
include:
- python-version: "3.8"
- python-version: "3.12"
os: "ubuntu-latest"
experimental: true

Expand All @@ -25,15 +30,15 @@ jobs:

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

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
environment-file: continuous_integration/environment.yaml
activate-environment: test-environment

Expand Down Expand Up @@ -75,7 +80,7 @@ jobs:
cd docs && mkdir doctest && sphinx-build -E -n -b doctest ./source ./doctest && cd ..
- name: Upload unittest coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
flags: unittests
file: ./coverage.xml
Expand All @@ -96,4 +101,3 @@ jobs:
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true

91 changes: 43 additions & 48 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Deploy sdist and wheels
name: Build sdist and wheels
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
# https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types#pullrequestevent
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
cancel-in-progress: true

on:
push:
tags:
- v*
pull_request:
release:
types:
- published
Expand All @@ -13,93 +17,83 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create sdist
shell: bash -l {0}
# For non-tags/releases this won't produce a valid version number in the package
# We'd have to download the entire git history which is wasteful in CI
run: |
python -m pip install -q build
python -m build -s
- name: Upload sdist to build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*.tar.gz


build_wheels:
name: "Build wheels on ${{ matrix.os }} ${{ matrix.cibw_archs }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
include:
# Using pythons inside a docker image to provide all the Linux
# python-versions permutations.
- name: manylinux 64-bit
os: ubuntu-latest
python-version: 3.8
docker-image: manylinux1_x86_64
- name: manylinux 32-bit
os: ubuntu-latest
python-version: 3.8
docker-image: manylinux1_i686
- os: windows-2019
cibw_archs: "AMD64 ARM64"
- os: macos-11
cibw_archs: "x86_64 arm64"
- os: "ubuntu-20.04"
cibw_archs: "aarch64"
- os: "ubuntu-20.04"
cibw_archs: "x86_64"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
git fetch --prune --unshallow
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
python-version: ${{ matrix.python-version }}
platforms: all

- name: Install dependencies
run: |
python -m pip install -U -q pip Cython wheel setuptools twine numpy build
- name: Build and install macOS/Windows wheel
if: matrix.os != 'ubuntu-latest'
run: |
python -m build -w
pip install --find-links=./dist/ pyresample
- name: Build Linux wheels inside docker
if: matrix.os == 'ubuntu-latest'
run: |
docker run \
-e PLAT=${{ matrix.docker-image }} \
-e USE_OMP=1 \
-v `pwd`:/io \
quay.io/pypa/${{ matrix.docker-image }} \
/io/continuous_integration/build-manylinux-wheels.sh
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_SKIP: "cp36-* cp37-* cp38-* pp* *i686 *-musllinux* cp312-*"
CIBW_ARCHS: "${{ matrix.cibw_archs }}"
CIBW_TEST_COMMAND: "python -c \"import pyresample; assert 'unknown' not in pyresample.__version__, 'incorrect version found'\""
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"

- name: Upload wheel(s) as build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
path: ./wheelhouse/*.whl

upload_test_pypi:
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- name: Download sdist artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: sdist
path: dist
- name: Download wheels artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- 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.11
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
Expand All @@ -110,18 +104,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download sdist artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: sdist
path: dist
- name: Download wheels artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- 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.11
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip_existing: true
46 changes: 41 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
exclude: '^$'
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.7'
hooks:
- id: ruff
# once https://github.com/astral-sh/ruff/issues/2402 is fully resolved then we can get rid of flake8:
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.6' # Update me!
hooks:
- id: bandit
args: [--ini, .bandit]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.7.1' # Use the sha / tag you want to point at
hooks:
- id: mypy
additional_dependencies:
- types-docutils
- types-pkg-resources
- types-PyYAML
- types-requests
- type_extensions
args: ["--python-version", "3.9", "--ignore-missing-imports"]
- repo: https://github.com/pycqa/isort
rev: 5.13.0
hooks:
- id: isort
language_version: python3
ci:
# To trigger manually, comment on a pull request with "pre-commit.ci autofix"
autofix_prs: false
skip: [bandit]
16 changes: 14 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
fail_on_warning: true

conda:
environment: docs/environment.yml

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
system_packages: true
Loading

0 comments on commit f4e0f69

Please sign in to comment.