Skip to content

Commit

Permalink
Merge branch 'main' into groupby-aggs-using-numpy-groupies
Browse files Browse the repository at this point in the history
* main: (68 commits)
  Bump actions/setup-python from 2 to 3 (pydata#6338)
  Bump actions/checkout from 2 to 3 (pydata#6337)
  In documentation on adding a new backend, add missing import and tweak headings (pydata#6330)
  Lengthen underline, correct spelling, and reword (pydata#6326)
  quantile: use skipna=None (pydata#6303)
  New whatsnew section
  v2022.03.0 release notes (pydata#6319)
  fix typos (using codespell) (pydata#6316)
  Add General issue template (pydata#6314)
  Disable CI runs on forks (pydata#6315)
  Enable running sphinx-build on Windows (pydata#6237)
  Fix class attributes versus init parameters (pydata#6312)
  On Windows, enable successful test of opening a dataset containing a cftime index (pydata#6305)
  from_dict: doctest (pydata#6302)
  Drop duplicates over multiple dims, and add Dataset.drop_duplicates (pydata#6307)
  Amended docs on how to add a new backend (pydata#6292)
  Adding the new wrapper gsw-xarray (pydata#6294)
  Amended docstring to reflect the actual behaviour of Dataset.map (pydata#6232)
  Align language def in bugreport.yml with schema (pydata#6290)
  Move Zarr up in io.rst (pydata#6289)
  ...
  • Loading branch information
dcherian committed Mar 9, 2022
2 parents 3f3a197 + d293f50 commit e348c76
Show file tree
Hide file tree
Showing 129 changed files with 3,746 additions and 5,584 deletions.
1 change: 1 addition & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- netcdf4
- numba
- numpy
- packaging
- pandas
- pint
- pip
Expand Down
14 changes: 6 additions & 8 deletions .github/ISSUE_TEMPLATE/bugreport.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Bug Report
description: File a bug report to help us improve
title: '[Bug]: '
labels: [bug, 'needs triage']
assignees: []
labels: [bug, "needs triage"]
body:
- type: textarea
id: what-happened
Expand Down Expand Up @@ -35,14 +33,14 @@ body:
Bug reports that follow these guidelines are easier to diagnose, and so are often handled much more quickly.
This will be automatically formatted into code, so no need for markdown backticks.
render: python
render: Python

- type: textarea
id: log-output
attributes:
label: Relevant log output
description: Please copy and paste any relevant output. This will be automatically formatted into code, so no need for markdown backticks.
render: python
render: Python

- type: textarea
id: extra
Expand All @@ -54,8 +52,8 @@ body:
- type: textarea
id: show-versions
attributes:
label: Environment
description: |
Paste the output of `xr.show_versions()` here
label: Environment
description: |
Paste the output of `xr.show_versions()` here
validations:
required: true
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Issue
description: General Issue or discussion topic. For usage questions, please follow the "Usage question" link
labels: ["needs triage"]
body:
- type: markdown
attributes:
value: |
Please describe your issue here.
- type: textarea
id: issue-description
attributes:
label: What is your issue?
description: |
Thank you for filing an issue! Please give us further information on how we can help you.
placeholder: Please describe your issue.
validations:
required: true
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/newfeature.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Feature Request
description: Suggest an idea for xarray
title: '[FEATURE]: '
labels: [enhancement]
assignees: []
body:
- type: textarea
id: description
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/cancel-duplicate-runs.yaml

This file was deleted.

14 changes: 9 additions & 5 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- "*"
workflow_dispatch: # allows you to trigger manually

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
detect-ci-trigger:
name: detect ci trigger
Expand All @@ -18,7 +22,7 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1.1
Expand Down Expand Up @@ -49,7 +53,7 @@ jobs:
"py39-flaky",
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

Expand Down Expand Up @@ -115,13 +119,13 @@ jobs:
doctest:
name: Doctests
runs-on: "ubuntu-latest"
if: github.repository == 'pydata/xarray'
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -158,7 +162,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- "*"
workflow_dispatch: # allows you to trigger manually

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
detect-ci-trigger:
name: detect ci trigger
Expand All @@ -18,7 +22,7 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1.1
Expand All @@ -38,9 +42,9 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
# Bookend python versions
python-version: ["3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
Expand Down Expand Up @@ -111,6 +115,7 @@ jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
if: github.repository == 'pydata/xarray'
steps:
- name: Upload
uses: actions/upload-artifact@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish-test-results:
name: Publish test results
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'pydata/xarray'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: 3.8
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: 3.8
Expand All @@ -62,6 +62,14 @@ jobs:
run: |
ls -ltrh
ls -ltrh dist
- name: Verify the built dist/wheel is valid
if: github.event_name == 'push'
run: |
python -m pip install --upgrade pip
python -m pip install dist/xarray*.whl
python -m xarray.util.print_versions
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.5.0
Expand All @@ -71,13 +79,6 @@ jobs:
repository_url: https://test.pypi.org/legacy/
verbose: true

- name: Check uploaded package
if: github.event_name == 'push'
run: |
sleep 3
python -m pip install --upgrade pip
python -m pip install --extra-index-url https://test.pypi.org/simple --upgrade xarray
python -m xarray.util.print_versions

upload-to-pypi:
needs: test-built-dist
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- cron: "0 0 * * *" # Daily “At 00:00” UTC
workflow_dispatch: # allows you to trigger the workflow run manually

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
detect-ci-trigger:
name: detect upstream-dev ci trigger
Expand All @@ -20,7 +24,7 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1.1
Expand All @@ -44,11 +48,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.10"]
outputs:
artifacts_availability: ${{ steps.status.outputs.ARTIFACTS_AVAILABLE }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -106,8 +110,8 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.x"
- uses: actions/download-artifact@v2
Expand All @@ -122,7 +126,7 @@ jobs:
shopt -s globstar
python .github/workflows/parse_logs.py logs/**/*-log
- name: Report failures
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ __pycache__
.hypothesis/

# temp files from docs build
doc/*.nc
doc/auto_gallery
doc/example.nc
doc/rasm.zarr
doc/savefig

# C extensions
Expand Down Expand Up @@ -72,4 +73,3 @@ xarray/tests/data/*.grib.*.idx
Icon*

.ipynb_checkpoints
doc/rasm.zarr
34 changes: 20 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,27 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
# isort should run before black as black sometimes tweaks the isort output
- id: debug-statements
- id: mixed-line-ending
# This wants to go before isort & flake8
- repo: https://github.com/myint/autoflake
rev: "v1.4"
hooks:
- id: autoflake # isort should run before black as black sometimes tweaks the isort output
args: ["--in-place", "--ignore-init-module-imports"]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args:
- "--py38-plus"
# https://github.com/python/black#version-control-integration
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.1.0
hooks:
- id: black
- id: black-jupyter
Expand All @@ -35,9 +48,11 @@ repos:
rev: v0.931
hooks:
- id: mypy
# `properies` & `asv_bench` are copied from setup.cfg.
# `_typed_ops.py` is added since otherwise mypy will complain (but notably only in pre-commit)
exclude: "properties|asv_bench|_typed_ops.py"
# Copied from setup.cfg
exclude: "properties|asv_bench"
# This is slow and so we take it out of the fast-path; requires passing
# `--hook-stage manual` to pre-commit
stages: [manual]
additional_dependencies: [
# Type stubs
types-python-dateutil,
Expand All @@ -47,12 +62,3 @@ repos:
typing-extensions==3.10.0.0,
numpy,
]
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
# - repo: https://github.com/asottile/pyupgrade
# rev: v1.22.1
# hooks:
# - id: pyupgrade
# args:
# - "--py3-only"
# # remove on f-strings in Py3.7
# - "--keep-percent-format"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Xarray's contributor guidelines [can be found in our online documentation](http://xarray.pydata.org/en/stable/contributing.html)
Xarray's contributor guidelines [can be found in our online documentation](http://docs.xarray.dev/en/stable/contributing.html)

0 comments on commit e348c76

Please sign in to comment.