Skip to content
forked from pydata/xarray

Commit 142bc69

Browse files
committed
Merge branch 'main' into grouper-objects
* main: Bump codecov/codecov-action from 3.1.2 to 3.1.3 (pydata#7781) Fix whats-new [skip-ci] dev whats-new (pydata#7775) [skip-ci] Release 2023.04.2 (pydata#7774) Fix groupby_bins when labels are specified (pydata#7769) Docstrings examples for string methods (pydata#7669) Add dev whats-new Add benchmark against latest release on main. (pydata#7753)
2 parents fe0e421 + 2657787 commit 142bc69

File tree

7 files changed

+543
-23
lines changed

7 files changed

+543
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Benchmark compare last release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
benchmark:
11+
name: Linux
12+
runs-on: ubuntu-20.04
13+
env:
14+
ASV_DIR: "./asv_bench"
15+
CONDA_ENV_FILE: ci/requirements/environment.yml
16+
17+
steps:
18+
# We need the full repo to avoid this issue
19+
# https://github.com/actions/checkout/issues/23
20+
- uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up conda environment
25+
uses: mamba-org/provision-with-micromamba@v15
26+
with:
27+
environment-file: ${{env.CONDA_ENV_FILE}}
28+
environment-name: xarray-tests
29+
cache-env: true
30+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
31+
extra-specs: |
32+
asv
33+
34+
- name: 'Get Previous tag'
35+
id: previoustag
36+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
37+
# with:
38+
# fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
39+
40+
- name: Run benchmarks
41+
shell: bash -l {0}
42+
id: benchmark
43+
env:
44+
OPENBLAS_NUM_THREADS: 1
45+
MKL_NUM_THREADS: 1
46+
OMP_NUM_THREADS: 1
47+
ASV_FACTOR: 1.5
48+
ASV_SKIP_SLOW: 1
49+
run: |
50+
set -x
51+
# ID this runner
52+
asv machine --yes
53+
echo "Baseline: ${{ steps.previoustag.outputs.tag }} "
54+
echo "Contender: ${{ github.sha }}"
55+
# Use mamba for env creation
56+
# export CONDA_EXE=$(which mamba)
57+
export CONDA_EXE=$(which conda)
58+
# Run benchmarks for current commit against base
59+
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
60+
asv continuous $ASV_OPTIONS ${{ steps.previoustag.outputs.tag }} ${{ github.sha }} \
61+
| sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \
62+
| tee benchmarks.log
63+
# Report and export results for subsequent steps
64+
if grep "Traceback \|failed\|PERFORMANCE DECREASED" benchmarks.log > /dev/null ; then
65+
exit 1
66+
fi
67+
working-directory: ${{ env.ASV_DIR }}
68+
69+
- name: Add instructions to artifact
70+
if: always()
71+
run: |
72+
cp benchmarks/README_CI.md benchmarks.log .asv/results/
73+
working-directory: ${{ env.ASV_DIR }}
74+
75+
- uses: actions/upload-artifact@v3
76+
if: always()
77+
with:
78+
name: asv-benchmark-results-${{ runner.os }}
79+
path: ${{ env.ASV_DIR }}/.asv/results

.github/workflows/ci-additional.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
127127
128128
- name: Upload mypy coverage to Codecov
129-
uses: codecov/[email protected].2
129+
uses: codecov/[email protected].3
130130
with:
131131
file: mypy_report/cobertura.xml
132132
flags: mypy
@@ -180,7 +180,7 @@ jobs:
180180
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
181181
182182
- name: Upload mypy coverage to Codecov
183-
uses: codecov/[email protected].2
183+
uses: codecov/[email protected].3
184184
with:
185185
file: mypy_report/cobertura.xml
186186
flags: mypy39

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
path: pytest.xml
140140

141141
- name: Upload code coverage to Codecov
142-
uses: codecov/[email protected].2
142+
uses: codecov/[email protected].3
143143
with:
144144
file: ./coverage.xml
145145
flags: unittests

doc/whats-new.rst

+49
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,55 @@ What's New
1515
np.random.seed(123456)
1616
1717
18+
.. _whats-new.2023.05.0:
19+
20+
v2023.05.0 (unreleased)
21+
-----------------------
22+
23+
New Features
24+
~~~~~~~~~~~~
25+
26+
27+
Breaking changes
28+
~~~~~~~~~~~~~~~~
29+
30+
31+
Deprecations
32+
~~~~~~~~~~~~
33+
34+
35+
Bug fixes
36+
~~~~~~~~~
37+
38+
39+
Documentation
40+
~~~~~~~~~~~~~
41+
42+
43+
Internal Changes
44+
~~~~~~~~~~~~~~~~
45+
46+
47+
.. _whats-new.2023.04.2:
48+
49+
v2023.04.2 (April 20, 2023)
50+
---------------------------
51+
52+
This is a patch release to fix a bug with binning (:issue:`7766`)
53+
54+
Bug fixes
55+
~~~~~~~~~
56+
57+
- Fix binning when ``labels`` is specified. (:issue:`7766`).
58+
By `Deepak Cherian <https://github.com/dcherian>`_.
59+
60+
61+
Documentation
62+
~~~~~~~~~~~~~
63+
- Added examples to docstrings for :py:meth:`xarray.core.accessor_str.StringAccessor` methods.
64+
(:pull:`7669`) .
65+
By `Mary Gathoni <https://github.com/remigathoni>`_.
66+
1867

1968
.. _whats-new.2023.04.1:
2069

0 commit comments

Comments
 (0)