Skip to content

Commit

Permalink
Merge branch 'main' into fix/dask_indexing
Browse files Browse the repository at this point in the history
* main: (129 commits)
  docs on specifying chunks in to_zarr encoding arg (pydata#6542)
  [skip-ci] List count under Aggregation (pydata#6711)
  Add `Dataset.dtypes` property (pydata#6706)
  try to import `UndefinedVariableError` from the new location (pydata#6701)
  DOC: note of how `chunks` can be defined (pydata#6696)
  pdyap version dependent client.open_url call (pydata#6656)
  use `pytest-reportlog` to generate upstream-dev CI failure reports (pydata#6699)
  [pre-commit.ci] pre-commit autoupdate (pydata#6694)
  Bump actions/setup-python from 3 to 4 (pydata#6692)
  Fix Dataset.where with drop=True and mixed dims (pydata#6690)
  pass kwargs through from save_mfdataset to to_netcdf (pydata#6686)
  Docs: indexing.rst finetuning (pydata#6685)
  use micromamba instead of mamba (pydata#6674)
  install the development version of `matplotlib` into the upstream-dev CI (pydata#6675)
  Add whatsnew section for v2022.06.0
  release notes for 2022.06.0rc0
  release notes for the pre-release (pydata#6676)
  more testpypi workflow fixes (pydata#6673)
  thin: add examples (pydata#6663)
  Update multidimensional-coords.ipynb (pydata#6672)
  ...
  • Loading branch information
dcherian committed Jun 24, 2022
2 parents a11be00 + ec41d65 commit d5e7646
Show file tree
Hide file tree
Showing 186 changed files with 10,310 additions and 5,764 deletions.
28 changes: 22 additions & 6 deletions .github/ISSUE_TEMPLATE/bugreport.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bug Report
name: 🐛 Bug Report
description: File a bug report to help us improve
labels: [bug, "needs triage"]
body:
Expand Down Expand Up @@ -26,14 +26,24 @@ body:
attributes:
label: Minimal Complete Verifiable Example
description: |
Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report:
Minimal, self-contained copy-pastable example that demonstrates the issue. This will be automatically formatted into code, so no need for markdown backticks.
render: Python

- type: checkboxes
id: mvce-checkboxes
attributes:
label: MVCE confirmation
description: |
Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out:
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
- [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
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
options:
- label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- label: Complete example — the example is self-contained, including all data and the text of any traceback.
- label: Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result.
- label: New issue — a search of GitHub Issues suggests this is not a duplicate.

- type: textarea
id: log-output
Expand All @@ -54,6 +64,12 @@ body:
attributes:
label: Environment
description: |
Paste the output of `xr.show_versions()` here
Paste the output of `xr.show_versions()` between the `<details>` tags, leaving an empty line following the opening tag.
value: |
<details>
</details>
validations:
required: true
8 changes: 7 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Usage question
- 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.
- name: 🗺️ Raster analysis usage question
url: https://github.com/corteva/rioxarray/discussions
about: |
If you are using the rioxarray extension (engine='rasterio'), or have questions about
raster analysis such as geospatial formats, coordinate reprojection, etc.,
please use the rioxarray discussion forum.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/misc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Issue
description: General Issue or discussion topic. For usage questions, please follow the "Usage question" link
name: 📝 Issue
description: General issue, that's not a bug report.
labels: ["needs triage"]
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/newfeature.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Feature Request
name: 💡 Feature Request
description: Suggest an idea for xarray
labels: [enhancement]
body:
Expand Down
12 changes: 7 additions & 5 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 700 # start with a large number and reduce shortly
daysUntilStale: 600 # start with a large number and reduce shortly

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
Expand All @@ -14,10 +14,10 @@ exemptLabels:
- "[Status] Maybe Later"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
exemptProjects: true

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
exemptMilestones: true

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true
Expand All @@ -31,6 +31,9 @@ markComment: |
If this issue remains relevant, please comment here or remove the `stale` label; otherwise it will be marked as closed automatically
closeComment: |
The stalebot didn't hear anything for a while, so it closed this. Please reopen if this is still an issue.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
Expand All @@ -40,8 +43,7 @@ markComment: |
# Your comment here.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 1 # start with a small number

limitPerRun: 2 # start with a small number

# Limit to only `issues` or `pulls`
# only: issues
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
144 changes: 60 additions & 84 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,116 +30,80 @@ jobs:
with:
keyword: "[skip-ci]"

test:
name: ${{ matrix.os }} ${{ matrix.env }}
runs-on: ${{ matrix.os }}
doctest:
name: Doctests
runs-on: "ubuntu-latest"
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:
[
# Minimum python version:
"py38-bare-minimum",
"py38-min-all-deps",

# Latest python version:
"py39-all-but-dask",
"py39-flaky",
]

env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.10"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Set environment variables
- name: set environment variables
run: |
if [[ ${{ matrix.env }} == "py39-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') }}
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- uses: conda-incubator/setup-miniconda@v2
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: xarray-tests
auto-update-conda: false
python-version: 3.9
use-only-tar-bz2: true

- name: Install conda dependencies
run: |
mamba env update -f $CONDA_ENV_FILE
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
python=${{env.PYTHON_VERSION}}
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.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
- name: Run doctests
run: |
python -m pytest -n 4 \
--cov=xarray \
--cov-report=xml \
$PYTEST_EXTRA_FLAGS
python -m pytest --doctest-modules xarray --ignore xarray/tests
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests,${{ matrix.env }}
env_vars: RUNNER_OS
name: codecov-umbrella
fail_ci_if_error: false
doctest:
name: Doctests
mypy:
name: Mypy
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
# temporarily skipping due to https://github.com/pydata/xarray/issues/6551
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.10"

steps:
- uses: actions/checkout@v3
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.9"

- name: Install conda dependencies
- name: set environment variables
run: |
mamba env update -f ci/requirements/environment.yml
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
python=${{env.PYTHON_VERSION}}
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
Expand All @@ -148,9 +112,13 @@ jobs:
conda info -a
conda list
python xarray/util/print_versions.py
- name: Run doctests
- name: Install mypy
run: |
python -m pytest --doctest-modules xarray --ignore xarray/tests
python -m pip install mypy
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive
min-version-policy:
name: Minimum Version Policy
Expand All @@ -161,20 +129,28 @@ jobs:
run:
shell: bash -l {0}

strategy:
matrix:
environment-file: ["bare-minimum", "min-all-deps"]
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- uses: conda-incubator/setup-miniconda@v2

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
with:
environment-name: xarray-tests
environment-file: false
extra-specs: |
python=3.10
pyyaml
conda
python-dateutil
channels: conda-forge
channel-priority: strict
mamba-version: "*"
auto-update-conda: false
python-version: "3.9"

- name: minimum versions policy
run: |
mamba install -y pyyaml conda python-dateutil
python ci/min_deps_check.py ci/requirements/py38-bare-minimum.yml
python ci/min_deps_check.py ci/requirements/py38-min-all-deps.yml
python ci/min_deps_check.py ci/requirements/${{ matrix.environment-file }}.yml
Loading

0 comments on commit d5e7646

Please sign in to comment.