Skip to content

Commit acfd0ec

Browse files
committed
Merge branch 'main' into numbagg
* main: Smol docstring improvement [pre-commit.ci] auto fixes from pre-commit.com hooks Add aggregation as top-level import Updates to notebook Add custom aggregations user story Add user stories (#81) Add ignore_old_chunks for rechunk_for_cohorts Skip reindexing in finalize_results if reindex is True Fix multiple grouper, same dim Pass reindex to _reduce_blockwise Better IntervalIndex creation Fix tests Multiple groupers v3 (#76) More consistent fill_value handling. isnull instead of isnan Add funding badge (#77) Handle sorting in factorize_ Handle reindex in factorize_ Small refactor Extra test and comment
2 parents 05dca1c + d895625 commit acfd0ec

18 files changed

+2253
-258
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: check-docstring-first
1111

1212
- repo: https://github.com/psf/black
13-
rev: 22.1.0
13+
rev: 22.3.0
1414
hooks:
1515
- id: black
1616

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![GitHub Workflow CI Status](https://img.shields.io/github/workflow/status/dcherian/flox/CI?logo=github&style=flat)](https://github.com/dcherian/flox/actions)[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/dcherian/flox/main.svg)](https://results.pre-commit.ci/latest/github/dcherian/flox/main)[![image](https://img.shields.io/codecov/c/github/dcherian/flox.svg?style=flat)](https://codecov.io/gh/dcherian/flox)[![PyPI](https://img.shields.io/pypi/v/flox.svg?style=flat)](https://pypi.org/project/flox/)[![Conda-forge](https://img.shields.io/conda/vn/conda-forge/flox.svg?style=flat)](https://anaconda.org/conda-forge/flox)[![Documentation Status](https://readthedocs.org/projects/flox/badge/?version=latest)](https://flox.readthedocs.io/en/latest/?badge=latest)
1+
[![GitHub Workflow CI Status](https://img.shields.io/github/workflow/status/dcherian/flox/CI?logo=github&style=flat)](https://github.com/dcherian/flox/actions)[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/dcherian/flox/main.svg)](https://results.pre-commit.ci/latest/github/dcherian/flox/main)[![image](https://img.shields.io/codecov/c/github/dcherian/flox.svg?style=flat)](https://codecov.io/gh/dcherian/flox)[![PyPI](https://img.shields.io/pypi/v/flox.svg?style=flat)](https://pypi.org/project/flox/)[![Conda-forge](https://img.shields.io/conda/vn/conda-forge/flox.svg?style=flat)](https://anaconda.org/conda-forge/flox)[![Documentation Status](https://readthedocs.org/projects/flox/badge/?version=latest)](https://flox.readthedocs.io/en/latest/?badge=latest)[![NASA-80NSSC18M0156](https://img.shields.io/badge/NASA-80NSSC18M0156-blue)](https://earthdata.nasa.gov/esds/competitive-programs/access/pangeo-ml)
22

33
# flox
44

ci/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ dependencies:
88
- numpydoc
99
- numpy_groupies
1010
- toolz
11+
- matplotlib-base
1112
- myst-parser
13+
- myst-nb
1214
- sphinx
1315
- furo
16+
- ipykernel
17+
- jupyter
1418
- pip:
1519
- git+https://github.com/dcherian/flox

docs/source/_static/style.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.xr-wrap {
2+
font-size: 0.85em;
3+
margin-left: 1.25em;
4+
padding-left: 1.25em;
5+
border-left: thin var(--color-foreground-muted) solid;
6+
}
7+
.xr-array-wrap, .xr-var-data, .xr-var-preview {
8+
font-size: 0.9em;
9+
}
10+
.gp {
11+
color: darkorange;
12+
}

docs/source/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ Aggregation Objects
3939
.. autosummary::
4040
:toctree: generated/
4141

42-
aggregations.Aggregation
43-
aggregations.sum
42+
Aggregation
43+
aggregations.sum_
4444
aggregations.nansum

docs/source/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
import sys
1717

1818
import flox
19+
import flox.aggregations
20+
import flox.visualize
21+
import flox.xarray
1922

2023
# If extensions (or modules to document with autodoc) are in another directory,
2124
# add these directories to sys.path here. If the directory is relative to the
@@ -29,14 +32,14 @@
2932

3033
# -- General configuration -----------------------------------------------------
3134
extensions = [
32-
"myst_parser",
3335
"sphinx.ext.autodoc",
3436
"sphinx.ext.viewcode",
3537
"sphinx.ext.autosummary",
3638
"sphinx.ext.intersphinx",
3739
"sphinx.ext.extlinks",
3840
"numpydoc",
3941
"sphinx.ext.napoleon",
42+
"myst_nb",
4043
]
4144

4245
extlinks = {
@@ -45,7 +48,7 @@
4548
}
4649

4750
templates_path = ["_templates"]
48-
source_suffix = [".rst", ".md"]
51+
source_suffix = [".rst"]
4952
master_doc = "index"
5053
language = "en"
5154

@@ -117,7 +120,8 @@
117120
# Add any paths that contain custom static files (such as style sheets) here,
118121
# relative to this directory. They are copied after the builtin static files,
119122
# so a file named "default.css" will overwrite the builtin "default.css".
120-
# html_static_path = ["_static"]
123+
html_static_path = ["_static"]
124+
html_css_files = ["style.css"]
121125

122126
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
123127
# using the given strftime format.

docs/source/custom.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
It also allows you to specify a custom Aggregation (again inspired by dask.dataframe),
55
though this might not be fully functional at the moment. See `aggregations.py` for examples.
66

7+
See the ["Custom Aggregations"](user-stories/custom-aggregations.ipynb) user story for a more user-friendly example.
8+
79
```python
810
mean = Aggregation(
911
# name used for dask tasks

docs/source/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ It was motivated by many discussions in the [Pangeo](https://pangeo.io) communit
5050
implementation.md
5151
custom.md
5252
api.rst
53+
user-stories.md
5354
```

docs/source/user-stories.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# User Stories
2+
3+
```{eval-rst}
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
user-stories/climatology.ipynb
8+
user-stories/custom-aggregations.ipynb
9+
```

0 commit comments

Comments
 (0)