-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into upstream-dev-ci
- Loading branch information
Showing
192 changed files
with
13,884 additions
and
5,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[run] | ||
omit = | ||
xarray/tests/* | ||
xarray/core/dask_array_compat.py | ||
xarray/core/npcompat.py | ||
xarray/core/pdcompat.py | ||
xarray/core/pycompat.py | ||
*/xarray/tests/* | ||
*/xarray/core/dask_array_compat.py | ||
*/xarray/core/npcompat.py | ||
*/xarray/core/pdcompat.py | ||
*/xarray/core/pycompat.py |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ref-names: $Format:%D$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# reduce the number of merge conflicts | ||
doc/whats-new.rst merge=union | ||
# allow installing from git archives | ||
.git_archival.txt export-subst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
blank_issues_enabled: true | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: General Question | ||
url: https://stackoverflow.com/questions/tagged/python-xarray | ||
about: "If you have a question like *How do I append to an xarray.Dataset?* then please ask on Stack Overflow using the #python-xarray tag." | ||
- name: Usage question | ||
url: https://github.com/pydata/xarray/discussions | ||
about: | | ||
Ask questions and discuss with other community members here. | ||
If you have a question like "How do I concatenate a list of datasets?" then | ||
please include a self-contained reproducible example if possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<!-- Feel free to remove check-list items aren't relevant to your change --> | ||
|
||
- [ ] Closes #xxxx | ||
- [ ] Tests added | ||
- [ ] Passes `isort . && black . && mypy . && flake8` | ||
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` | ||
- [ ] New functions/methods are listed in `api.rst` | ||
- [ ] Closes #xxxx | ||
- [ ] Tests added | ||
- [ ] Passes `pre-commit run --all-files` | ||
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` | ||
- [ ] New functions/methods are listed in `api.rst` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,4 +56,4 @@ limitPerRun: 1 # start with a small number | |
|
||
# issues: | ||
# exemptLabels: | ||
# - confirmed | ||
# - confirmed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,233 @@ | ||
name: CI Additional | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
workflow_dispatch: # allows you to trigger manually | ||
|
||
jobs: | ||
detect-ci-trigger: | ||
name: detect ci trigger | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
outputs: | ||
triggered: ${{ steps.detect-trigger.outputs.trigger-found }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
- uses: xarray-contrib/ci-trigger@v1 | ||
id: detect-trigger | ||
with: | ||
keyword: "[skip-ci]" | ||
|
||
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: | ||
[ | ||
"py37-bare-minimum", | ||
"py37-min-all-deps", | ||
"py37-min-nep18", | ||
"py38-all-but-dask", | ||
"py38-backend-api-v2", | ||
"py38-flaky", | ||
] | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/cancel-workflow-action@0.6.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
|
||
- name: Set environment variables | ||
run: | | ||
if [[ ${{ matrix.env }} == "py38-backend-api-v2" ]] ; | ||
then | ||
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV | ||
echo "XARRAY_BACKEND_API=v2" >> $GITHUB_ENV | ||
elif [[ ${{ matrix.env }} == "py38-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@v2 | ||
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.8 | ||
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@v1 | ||
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" | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/cancel-workflow-action@0.6.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
- 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.8" | ||
|
||
- name: Install conda dependencies | ||
run: | | ||
mamba env update -f ci/requirements/environment.yml | ||
- 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: Run doctests | ||
run: | | ||
python -m pytest --doctest-modules xarray --ignore xarray/tests | ||
typing: | ||
name: Type checking (mypy) | ||
runs-on: "ubuntu-latest" | ||
needs: detect-ci-trigger | ||
if: needs.detect-ci-trigger.outputs.triggered == 'false' | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/cancel-workflow-action@0.6.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
- 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.8" | ||
|
||
- name: Install conda dependencies | ||
run: | | ||
mamba env update -f ci/requirements/environment.yml | ||
- name: Install mypy | ||
run: | | ||
mamba install --file ci/requirements/mypy_only | ||
- 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: Run mypy | ||
run: | | ||
python -m mypy xarray | ||
min-version-policy: | ||
name: Minimum Version Policy | ||
runs-on: "ubuntu-latest" | ||
needs: detect-ci-trigger | ||
if: needs.detect-ci-trigger.outputs.triggered == 'false' | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/cancel-workflow-action@0.6.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
channels: conda-forge | ||
channel-priority: strict | ||
mamba-version: "*" | ||
auto-update-conda: false | ||
python-version: "3.8" | ||
|
||
- name: minimum versions policy | ||
run: | | ||
mamba install -y pyyaml conda python-dateutil | ||
python ci/min_deps_check.py ci/requirements/py37-bare-minimum.yml | ||
python ci/min_deps_check.py ci/requirements/py37-min-all-deps.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "pre-commit autoupdate CI" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # every Sunday at 00:00 UTC | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
autoupdate: | ||
name: 'pre-commit autoupdate' | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'pydata/xarray' | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: Cache pip and pre-commit | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/pre-commit | ||
~/.cache/pip | ||
key: ${{ runner.os }}-pre-commit-autoupdate | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
- name: upgrade pip | ||
run: python -m pip install --upgrade pip | ||
- name: install dependencies | ||
run: python -m pip install --upgrade pre-commit pyyaml packaging | ||
- name: version info | ||
run: python -m pip list | ||
- name: autoupdate | ||
uses: technote-space/create-pr-action@837dbe469b39f08d416889369a52e2a993625c84 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
EXECUTE_COMMANDS: | | ||
python -m pre_commit autoupdate | ||
python .github/workflows/sync_linter_versions.py .pre-commit-config.yaml ci/requirements/mypy_only | ||
COMMIT_MESSAGE: 'pre-commit: autoupdate hook versions' | ||
COMMIT_NAME: 'github-actions[bot]' | ||
COMMIT_EMAIL: 'github-actions[bot]@users.noreply.github.com' | ||
PR_TITLE: 'pre-commit: autoupdate hook versions' | ||
PR_BRANCH_PREFIX: 'pre-commit/' | ||
PR_BRANCH_NAME: 'autoupdate-${PR_ID}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: linting | ||
|
||
on: | ||
push: | ||
branches: "*" | ||
pull_request: | ||
branches: "*" | ||
|
||
jobs: | ||
linting: | ||
name: "pre-commit hooks" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/action@v2.0.0 |
Oops, something went wrong.