Skip to content

Commit

Permalink
Merge branch 'main' into fix-6220-use-fast-path-when-grouping-unique-…
Browse files Browse the repository at this point in the history
…monotonic-variable

* main: (995 commits)
  Adding `open_datatree` backend-specific keyword arguments (pydata#9199)
  [pre-commit.ci] pre-commit autoupdate (pydata#9202)
  Restore ability to specify _FillValue as Python native integers (pydata#9258)
  add backend intro and how-to diagram (pydata#9175)
  Fix copybutton for multi line examples in double digit ipython cells (pydata#9264)
  Update signature for _arrayfunction.__array__ (pydata#9237)
  Add encode_cf_datetime benchmark (pydata#9262)
  groupby, resample: Deprecate some positional args (pydata#9236)
  Delete ``base`` and ``loffset`` parameters to resample (pydata#9233)
  Update dropna docstring (pydata#9257)
  Grouper, Resampler as public api (pydata#8840)
  Fix mypy on main (pydata#9252)
  fix fallback isdtype method (pydata#9250)
  Enable pandas type checking (pydata#9213)
  Per-variable specification of boolean parameters in open_dataset (pydata#9218)
  test push
  Added a space to the documentation (pydata#9247)
  Fix typing for test_plot.py (pydata#9234)
  Allow mypy to run in vscode (pydata#9239)
  Revert "Test main push"
  ...
  • Loading branch information
dcherian committed Jul 25, 2024
2 parents bed344c + d0048ef commit 93de184
Show file tree
Hide file tree
Showing 321 changed files with 48,782 additions and 16,598 deletions.
9 changes: 3 additions & 6 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: xarray-examples
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.10
- boto3
- bottleneck
- cartopy
- cdms2
- cfgrib
- cftime
- coveralls
Expand All @@ -25,11 +24,10 @@ dependencies:
- numpy
- packaging
- pandas
- pint
- pint>=0.22
- pip
- pooch
- pydap
- pynio
- rasterio
- scipy
- seaborn
Expand All @@ -38,5 +36,4 @@ dependencies:
- toolz
- xarray
- zarr
- pip:
- numbagg
- numbagg
34 changes: 28 additions & 6 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
codecov:
ci:
# by default, codecov doesn't recognize azure as a CI provider
- dev.azure.com
require_ci_to_pass: yes
require_ci_to_pass: true

coverage:
status:
project:
default:
# Require 1% coverage, i.e., always succeed
target: 1
target: 1%
flags:
- unittests
paths:
- "!xarray/tests/"
unittests:
target: 90%
flags:
- unittests
paths:
- "!xarray/tests/"
mypy:
target: 20%
flags:
- mypy
patch: false
changes: false

comment: off
comment: false

flags:
unittests:
paths:
- "xarray"
- "!xarray/tests"
carryforward: false
mypy:
paths:
- "xarray"
carryforward: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bugreport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ body:
- 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.
- label: Recent environment — the issue occurs with the latest version of xarray and its dependencies.

- type: textarea
id: log-output
Expand Down
23 changes: 23 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the [Contributing Guide](https://docs.xarray.dev/en/latest/contributing.html) for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our [contributing guidelines](http://docs.xarray.dev/en/stable/contributing.html).
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Congratulations on completing your first pull request! Welcome to Xarray!
We are proud of you, and hope to see you again!
![celebration gif](https://media.giphy.com/media/umYMU8G2ixG5mJBDo5/giphy.gif)
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ updates:
schedule:
# Check for updates once a week
interval: 'weekly'
groups:
actions:
patterns:
- "*"
82 changes: 0 additions & 82 deletions .github/labeler.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
79 changes: 79 additions & 0 deletions .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Benchmark compare last release

on:
push:
branches:
- main
workflow_dispatch:

jobs:
benchmark:
name: Linux
runs-on: ubuntu-20.04
env:
ASV_DIR: "./asv_bench"
CONDA_ENV_FILE: ci/requirements/environment.yml

steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
create-args: >-
asv
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
# with:
# fallback: 1.0.0 # Optional fallback tag to use when no tag can be found

- name: Run benchmarks
shell: bash -l {0}
id: benchmark
env:
OPENBLAS_NUM_THREADS: 1
MKL_NUM_THREADS: 1
OMP_NUM_THREADS: 1
ASV_FACTOR: 1.5
ASV_SKIP_SLOW: 1
run: |
set -x
# ID this runner
asv machine --yes
echo "Baseline: ${{ steps.previoustag.outputs.tag }} "
echo "Contender: ${{ github.sha }}"
# Use mamba for env creation
# export CONDA_EXE=$(which mamba)
export CONDA_EXE=$(which conda)
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
asv continuous $ASV_OPTIONS ${{ steps.previoustag.outputs.tag }} ${{ github.sha }} \
| sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \
| tee benchmarks.log
# Report and export results for subsequent steps
if grep "Traceback \|failed\|PERFORMANCE DECREASED" benchmarks.log > /dev/null ; then
exit 1
fi
working-directory: ${{ env.ASV_DIR }}

- name: Add instructions to artifact
if: always()
run: |
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v4
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
path: ${{ env.ASV_DIR }}/.asv/results
20 changes: 10 additions & 10 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
benchmark:
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || contains( github.event.pull_request.labels.*.name, 'topic-performance') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
name: Linux
runs-on: ubuntu-20.04
env:
Expand All @@ -17,19 +17,22 @@ jobs:
steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up conda environment
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
extra-specs: |
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
# add "build" because of https://github.com/airspeed-velocity/asv/issues/1385
create-args: >-
asv
build
mamba
- name: Run benchmarks
Expand All @@ -47,9 +50,6 @@ jobs:
asv machine --yes
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
echo "Contender: ${GITHUB_SHA} (${{ github.event.pull_request.head.label }})"
# Use mamba for env creation
# export CONDA_EXE=$(which mamba)
export CONDA_EXE=$(which conda)
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \
Expand All @@ -67,7 +67,7 @@ jobs:
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
Loading

0 comments on commit 93de184

Please sign in to comment.