Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cumulative examples #7152

Merged
merged 44 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7e2f12a
Added file to generate docs for cumulatives. generate_cumulatives.py …
patrick-naylor Oct 8, 2022
d3c05eb
Fixed mypy issues
patrick-naylor Oct 8, 2022
ae513d9
Updated cumulatives to fix mypy issues
patrick-naylor Oct 10, 2022
e9ba30e
Merge branch 'main' into cumulative_examples
patrick-naylor Oct 10, 2022
b774ddb
Added keep_attrs to groupby funcs
patrick-naylor Oct 10, 2022
804d960
commited merge
patrick-naylor Oct 10, 2022
7d95f1d
Combined cumulatives and reductions and aggregations and modified dat…
patrick-naylor Oct 14, 2022
330dce8
Merged cumulatives and reductions into aggregations
patrick-naylor Oct 19, 2022
af5573c
Removed test print from dataset.py
patrick-naylor Oct 19, 2022
42c4990
Removed generate_cumulatives and generate_reductions
patrick-naylor Oct 19, 2022
d9e5267
Merge branch 'main' into cumulative_examples
patrick-naylor Oct 19, 2022
4e611cf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2022
441450b
Updated _aggregations with docstring changes
patrick-naylor Oct 19, 2022
2eac348
Merged origin
patrick-naylor Oct 19, 2022
8f4d798
Updated generate_aggregations.py with suggestions from @dcherian. Rem…
patrick-naylor Oct 21, 2022
bb16d01
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 21, 2022
0bfded1
Removed unecessary function from dataset.py
patrick-naylor Oct 21, 2022
adc8e9f
Merge branch 'cumulative_examples' of https://github.com/patrick-nayl…
patrick-naylor Oct 21, 2022
558fbf0
Removed unecessary function from dataset.py
patrick-naylor Oct 21, 2022
35f438a
Merge branch 'main' into cumulative_examples
patrick-naylor Oct 21, 2022
a9e6f4a
Updated api.rst, whats-new.rst and added a cumprod test to test_group…
patrick-naylor Oct 21, 2022
29f3238
Merge branch 'cumulative_examples' of https://github.com/patrick-nayl…
patrick-naylor Oct 21, 2022
9ba655b
Fixed accidental edit to test_dataset.py
patrick-naylor Oct 21, 2022
d24ba77
Apply suggestions from code review
Illviljan Oct 22, 2022
31876a5
Merge and rename reductions and cumulatives to aggregations
Illviljan Oct 22, 2022
d0ff135
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 22, 2022
4baa9f7
minor tweaks
Illviljan Oct 22, 2022
9b71aad
Merge branch 'cumulative_examples' of https://github.com/patrick-nayl…
Illviljan Oct 22, 2022
acb0637
Update computation.py
Illviljan Oct 22, 2022
47b80f3
Update generate_aggregations.py
Illviljan Oct 22, 2022
4994a07
Update .pre-commit-config.yaml
Illviljan Oct 22, 2022
29dd1eb
fix mypy
Illviljan Oct 22, 2022
b12dd5a
use _group_dim in resample?
Illviljan Oct 22, 2022
b4ce34d
Update resample.py
Illviljan Oct 22, 2022
a2d9e93
Manually fix docstring
Illviljan Oct 22, 2022
061ceaf
Merge branch 'main' into pr/7152
Illviljan Oct 23, 2022
2134bcf
Apply suggestions from code review
Illviljan Oct 24, 2022
f6e18cc
Use TEMPLATE_SEE_ALSO
Illviljan Oct 24, 2022
23df2eb
Merge branch 'cumulative_examples' of https://github.com/patrick-nayl…
Illviljan Oct 24, 2022
ec5062a
use default example
Illviljan Oct 24, 2022
1a7ccf4
add resample test
Illviljan Oct 24, 2022
66e7390
remove cumulative function in ops
Illviljan Oct 24, 2022
7bc95ec
Revert "remove cumulative function in ops"
Illviljan Oct 24, 2022
21e040c
Add numeric_only=True
Illviljan Oct 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
rev: v0.3.7
hooks:
- id: blackdoc
exclude: "generate_reductions.py"
exclude: "generate_aggregations.py"
additional_dependencies: ["black==22.10.0"]
- id: blackdoc-autoupdate-black
- repo: https://github.com/PyCQA/flake8
Expand Down
2 changes: 2 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ Dataset
DatasetGroupBy.any
DatasetGroupBy.count
DatasetGroupBy.cumsum
DatasetGroupBy.cumprod
DatasetGroupBy.max
DatasetGroupBy.mean
DatasetGroupBy.median
Expand Down Expand Up @@ -784,6 +785,7 @@ DataArray
DataArrayGroupBy.any
DataArrayGroupBy.count
DataArrayGroupBy.cumsum
DataArrayGroupBy.cumprod
DataArrayGroupBy.max
DataArrayGroupBy.mean
DataArrayGroupBy.median
Expand Down
5 changes: 5 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ New Features
- Display the indexes in a new section of the text and HTML reprs
(:pull:`6795`, :pull:`7183`, :pull:`7185`)
By `Justus Magin <https://github.com/keewis>`_ and `Benoît Bovy <https://github.com/benbovy>`_.
- Added methods :py:meth:`DataArrayGroupBy.cumprod` and :py:meth:`DatasetGroupBy.cumprod`.
(:pull:`5816`)
By `Patrick Naylor <https://github.com/patrick-naylor>`_

Breaking changes
~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -62,6 +65,8 @@ Documentation
Add :py:meth:`__str__` to surface the new :py:class:`BackendEntrypoint` ``description``
and ``url`` attributes. (:issue:`6577`, :pull:`7000`)
By `Jessica Scheick <https://github.com/jessicas11>`_.
- Created docstring examples for :py:meth:`DataArray.cumsum`, :py:meth:`DataArray.cumprod`, :py:meth:`Dataset.cumsum`, :py:meth:`Dataset.cumprod`, :py:meth:`DatasetGroupBy.cumsum`, :py:meth:`DataArrayGroupBy.cumsum`. (:issue:`5816`, :pull:`7152`)
By `Patrick Naylor <https://github.com/patrick-naylor>`_
- Add example of using :py:meth:`DataArray.coarsen.construct` to User Guide. (:pull:`7192`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Rename ``axes`` to ``axs`` in plotting to align with ``matplotlib.pyplot.subplots``. (:pull:`7194`)
Expand Down
Loading