Skip to content

Commit

Permalink
docs: Update existing docs (#655)
Browse files Browse the repository at this point in the history
Tweak wording on a few pages.
Make sure all the methods are documented.

Use poetry groups for dependencies in noxfile.
  • Loading branch information
bjchambers authored Aug 10, 2023
1 parent 30e2dd4 commit 880936c
Show file tree
Hide file tree
Showing 22 changed files with 680 additions and 269 deletions.
2 changes: 1 addition & 1 deletion sparrow-py/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_build
.jupyter_cache
jupyter_execute
source/reference/**/api
source/reference/apidocs
5 changes: 4 additions & 1 deletion sparrow-py/docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

.. currentmodule:: {{ module }}

.. auto{{ objtype }}:: {{ objname }}
.. auto{{ objtype }}:: {{ objname }}
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions sparrow-py/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
],
"primary_sidebar_end": ["indices.html"],
"show_toc_level": 2
}

templates_path = ["_templates"]
Expand Down
18 changes: 9 additions & 9 deletions sparrow-py/docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@ title: Kaskada Timestreams

<div class="px-4 py-5 my-5 text-center">
<img class="d-block mx-auto mb-4" src="_static/kaskada.svg" alt="" width="auto">
<h1 class="display-5 fw-bold">Event-processing without the fuss.</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">Real-time and historic event processing in Python.
<h1 class="display-5 fw-bold">Event-processing for AI applications.</h1>
<div class="col-lg-7 mx-auto">
<p class="lead mb-4">Next-generation, real-time and historic event processing.
</p>
</div>
</div>

```{gallery-grid}
:grid-columns: 1 2 2 3
- header: "{fas}`timeline;pst-color-primary` Real-time processing for all events"
content: "Quickly process structured events so you can respond in real-time."
- header: "{fas}`timeline;pst-color-primary` Real-time processing for all"
content: "Quickly process events so you can respond in real-time."
link: ".#stream"
- header: "{fab}`python;pst-color-primary` Python-native"
content: "Use Python so you can load data, process it, and train and serve models from one place."
link: ".#python"
- header: "{fas}`gauge-high;pst-color-primary` Get started immediately"
content: "No infrastructure to deploy let's you jump right in."
content: "No infrastructure to provision let's you jump right in."
link: ".#get-started"
- header: "{fas}`rocket;pst-color-primary` Local, Remote and Distributed"
content: "Develop and test locally. Deploy to Docker, K8s or a service for production."
link: ".#local-and-distributed"
- header: "{fas}`fast-forward;pst-color-primary` Real-time, Batch and Streaming"
content: "Execute large-historic queries or materialize in real-time. Or both."
link: ".#real-time-and-historic"
- header: "{fas}`rocket;pst-color-primary` Local, Remote and Distributed"
content: "Develop and test locally. Deploy to Docker, K8s or a service for production."
link: ".#local-and-distributed"
- header: "{fas}`backward;pst-color-primary` Time-travel"
content: "Generate training examples from the past to predict the future."
link: ".#time-travel"
Expand Down
2 changes: 1 addition & 1 deletion sparrow-py/docs/source/reference/results.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: apidocs/
Result
```
10 changes: 7 additions & 3 deletions sparrow-py/docs/source/reference/sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
.. currentmodule:: sparrow_py.sources
.. autosummary::
:toctree: api/
:toctree: apidocs/sources
ArrowSource
CsvSource
Source
CsvString
JsonlString
Pandas
Parquet
PyList
```
6 changes: 3 additions & 3 deletions sparrow-py/docs/source/reference/timestream/aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Windowed:
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.sum
Timestream.collect
Timestream.first
Timestream.last
Timestream.collect
Timestream.sum
```
22 changes: 13 additions & 9 deletions sparrow-py/docs/source/reference/timestream/arithmetic.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Arithmetic

Timestreams support a variety of arithmetic operations.

```{note}
Note: In addition to the chainable methods, standard operators are implemented where appropriate.
For instance, `a.add(b)` may be written as `a + b`.
See the notes on the specific functions for more information.
```

```{eval-rst}
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.__add__
Timestream.__radd__
Timestream.__sub__
Timestream.__rsub__
Timestream.__mul__
Timestream.__rmul__
Timestream.__truediv__
Timestream.__rtruediv__
Timestream.add
Timestream.sub
Timestream.mul
Timestream.div
Timestream.neg
```
16 changes: 16 additions & 0 deletions sparrow-py/docs/source/reference/timestream/collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Arithmetic

Timestreams allow each point to contain a collection -- a `list` or `map` -- of elements.

```{eval-rst}
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: ../apidocs/
Timestream.__getitem__
Timestream.flatten
Timestream.index
Timestream.length
Timestream.union
```
20 changes: 15 additions & 5 deletions sparrow-py/docs/source/reference/timestream/comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@

Comparison operations produce boolean Timestreams.

```{note}
Note: In addition to the chainable methods, standard operators are implemented where appropriate.
For instance, `a.ge(b)` may be written as `a >= b`.
See the notes on the specific functions for more information.
To respect the semantics of `__eq__` and `__ne__`, `a == b` and `a != b` are *not* overloaded.
```

```{eval-rst}
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.eq
Timestream.ge
Timestream.gt
Timestream.le
Timestream.lt
Timestream.ne
Timestream.__gt__
Timestream.__ge__
Timestream.__lt__
Timestream.__le__
Timestream.is_null
Timestream.is_not_null
```
2 changes: 1 addition & 1 deletion sparrow-py/docs/source/reference/timestream/execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.preview
Timestream.run
Expand Down
11 changes: 11 additions & 0 deletions sparrow-py/docs/source/reference/timestream/grouping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Grouping

```{eval-rst}
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: ../apidocs/
Timestream.lookup
Timestream.with_key
```
3 changes: 3 additions & 0 deletions sparrow-py/docs/source/reference/timestream/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
aggregation
arithmetic
collection
comparison
execution
grouping
logical
misc
records
time
```
2 changes: 1 addition & 1 deletion sparrow-py/docs/source/reference/timestream/logical.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.and_
Timestream.or_
Expand Down
7 changes: 6 additions & 1 deletion sparrow-py/docs/source/reference/timestream/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.cast
Timestream.data_type
Timestream.filter
Timestream.if_
Timestream.lag
Timestream.null_if
```
5 changes: 3 additions & 2 deletions sparrow-py/docs/source/reference/timestream/records.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ Comparison operations produce boolean Timestreams.
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: api/
:toctree: ../apidocs/
Timestream.__getitem__
Timestream.col
Timestream.select
Timestream.remove
Timestream.extend
Timestream.record
record
```
13 changes: 13 additions & 0 deletions sparrow-py/docs/source/reference/timestream/time.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Time

```{eval-rst}
.. currentmodule:: sparrow_py
.. autosummary::
:toctree: ../apidocs/
Timestream.shift_by
Timestream.shift_to
Timestream.shift_until
Timestream.time_of
```
9 changes: 5 additions & 4 deletions sparrow-py/docs/source/reference/windows.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Windows

```{eval-rst}
.. currentmodule:: sparrow_py
.. currentmodule:: sparrow_py.windows
.. autosummary::
:toctree: api/
:toctree: apidocs/windows/
SinceWindow
SlidingWindow
Since
Sliding
Trailing
```
Loading

0 comments on commit 880936c

Please sign in to comment.