Skip to content

Commit

Permalink
Merge pull request #1444 from dopplershift/0.12-backports
Browse files Browse the repository at this point in the history
0.12 Backports
  • Loading branch information
dopplershift authored Aug 5, 2020
2 parents c3df3bc + c813544 commit 1e3e962
Show file tree
Hide file tree
Showing 51 changed files with 733 additions and 307 deletions.
59 changes: 0 additions & 59 deletions .appveyor.yml

This file was deleted.

8 changes: 1 addition & 7 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ coverage:
patch:
default:
target: '80'
if_no_uploads: error
if_not_found: success
if_ci_failed: failure
project:
default: false
library:
target: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: failure
threshold: 0.1%
paths:
- "src/metpy/.*"

Expand Down
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2

updates:
- package-ecosystem: pip
directory: "/ci"
schedule:
interval: daily
time: "06:00"
timezone: "America/Denver"

allow:
- dependency-type: all

open-pull-requests-limit: 10
pull-request-branch-name:
separator: "-"
labels:
- "Type: Maintenance"
commit-message:
prefix: "MNT: "
include: "scope"

- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"

allow:
- dependency-type: all

open-pull-requests-limit: 10
pull-request-branch-name:
separator: "-"
labels:
- "Type: Maintenance"
commit-message:
prefix: "MNT: "
include: "scope"
46 changes: 46 additions & 0 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Code Analysis"

on:
push:
branches: [0.12.x]
pull_request:
schedule:
- cron: '0 8 * * 6'

jobs:
CodeQL:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
111 changes: 111 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Build Docs

# We don't want pushes (or PRs) to gh-pages to kick anything off
on:
push:
branches: [ 0.12.x ]
pull_request:

jobs:
#
# Build our docs on Linux against multiple Pythons, including pre-releases
#
Docs:
name: ${{ matrix.python-version }} ${{ matrix.dep-versions }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7]
linkcheck: ['']
dep-versions: [Current.txt]
git-versions: ['']
experimental: [false]
include:
- python-version: 3.8
linkcheck: linkcheck
dep-versions: Current.txt
git-versions: ''
experimental: false
- python-version: 3.8
linkcheck: ''
dep-versions: Prerelease
git-versions: 'git+git://github.com/hgrecco/pint@master#egg=pint git+git://github.com/pydata/xarray@master#egg=xarray'
experimental: true

steps:
# We check out only a limited depth and then pull tags to save time
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 100

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# This uses pip to find the right cache dir and then sets up caching for it
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Setup pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }}
restore-keys: |
pip-docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }}
pip-docs-${{ runner.os }}-${{ matrix.python-version }}-
pip-docs-${{ runner.os }}-
pip-docs-
# This installs the stuff needed to build and install Shapely and CartoPy from source.
# Need to install numpy first to make CartoPy happy.
- name: Install dependencies (PyPI)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install libgeos-dev libproj-dev
python -m pip install --upgrade pip setuptools
python -m pip install --no-binary :all: shapely
python -m pip install -c ci/${{ matrix.dep-versions }} numpy
python -m pip install -r ci/doc_requirements.txt -r ci/extra_requirements.txt -c ci/${{ matrix.dep-versions }} ${{ matrix.git-versions }}
python -m pip install -f https://unidata-python.s3.amazonaws.com/wheelhouse/index.html sphinx_rtd_theme==0.2.5b1.post1
# This imports CartoPy to find its map data cache directory
- name: Get CartoPy maps dir
id: cartopy-cache
run: echo "::set-output name=dir::$(python -c 'import cartopy;print(cartopy.config["data_dir"])')"

- name: Setup mapdata caching
uses: actions/cache@v2
env:
# Increase to reset cache of map data
CACHE_NUMBER: 0
with:
path: ${{ steps.cartopy-cache.outputs.dir }}
key: cartopy-${{ env.CACHE_NUMBER }}
restore-keys: cartopy-

- name: Install self
run: python -m pip install -c ci/${{ matrix.dep-versions }} .

- name: Build docs
run: |
export TEST_DATA_DIR=$GITHUB_WORKSPACE/staticdata
pushd docs
make overridecheck html ${{ matrix.linkcheck }} O=-W
popd
- name: Upload docs as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.python-version }}-docs
path: |
docs/build/html
!docs/_static/*.pdf
42 changes: 42 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Linting
on:
push:
branches: [master]
pull_request:

jobs:
flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python 3
uses: actions/setup-python@v1
with:
python-version: 3.x

- name: Install flake8
run: python -m pip install -r ci/linting_requirements.txt

- name: Set up reviewdog
run: |
mkdir -p $HOME/bin
curl -sfL \
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
sh -s -- -b $HOME/bin
echo ::add-path::$HOME/bin
- name: Run flake8
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
flake8 | reviewdog -f=pep8 -name=flake8 -reporter=github-check -filter-mode=nofilter
- name: Run doc8
# Don't skip doc8 if flake8 fails
if: ${{ always() }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
doc8 docs | reviewdog -efm='%f:%l: %m' -name=doc8 -reporter=github-check -filter-mode=nofilter
Loading

0 comments on commit 1e3e962

Please sign in to comment.