Skip to content

Commit 1b37ede

Browse files
authored
Autogenerate docs (#433)
* Documentation source links to the main branch This will produce consistent source links that point to the main branch. It will reduce the amount of noise in the documentation PRs. * Replace SHA with the main branch in view source links * Add generate documentation workflow
1 parent 465f2ea commit 1b37ede

File tree

10 files changed

+506
-474
lines changed

10 files changed

+506
-474
lines changed

.github/workflows/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Generate Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions: { }
9+
10+
jobs:
11+
generate-docs:
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
# We have to use a Mac OS image because the documentation generated
16+
# on Ubuntu unexpectedly rearranges the contents of quixstreams.md
17+
runs-on: macos-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- run: pip install -r docs/build/requirements.txt
21+
- run: python build.py
22+
working-directory: ./docs/build
23+
- uses: peter-evans/create-pull-request@v6
24+
with:
25+
commit-message: Update documentation
26+
branch: auto/update-documentation
27+
delete-branch: true
28+
title: 'Update Documentation'
29+
body: 'This is the PR with the autogenerated documentation'
30+
labels: 'documentation'

docs/api-reference/application.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Application()
1111
```
1212

13-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L56)
13+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L56)
1414

1515
The main Application class.
1616

@@ -83,7 +83,7 @@ def __init__(broker_address: Optional[Union[str, ConnectionConfig]] = None,
8383
processing_guarantee: ProcessingGuarantee = "at-least-once")
8484
```
8585

86-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L94)
86+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L94)
8787

8888

8989
<br>
@@ -186,7 +186,7 @@ def Quix(
186186
) -> Self
187187
```
188188

189-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L330)
189+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L342)
190190

191191
>***NOTE:*** DEPRECATED: use Application with `quix_sdk_token` argument instead.
192192

@@ -297,7 +297,7 @@ def topic(name: str,
297297
timestamp_extractor: Optional[TimestampExtractor] = None) -> Topic
298298
```
299299

300-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L471)
300+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L483)
301301

302302
Create a topic definition.
303303

@@ -378,7 +378,7 @@ topic = app.topic("input-topic", timestamp_extractor=custom_ts_extractor)
378378
def dataframe(topic: Topic) -> StreamingDataFrame
379379
```
380380

381-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L551)
381+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L563)
382382

383383
A simple helper method that generates a `StreamingDataFrame`, which is used
384384

@@ -428,7 +428,7 @@ to be used as an input topic.
428428
def stop(fail: bool = False)
429429
```
430430

431-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L590)
431+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L602)
432432

433433
Stop the internal poll loop and the message processing.
434434

@@ -455,7 +455,7 @@ to unhandled exception, and it shouldn't commit the current checkpoint.
455455
def get_producer() -> Producer
456456
```
457457

458-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L613)
458+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L625)
459459

460460
Create and return a pre-configured Producer instance.
461461
The Producer is initialized with params passed to Application.
@@ -490,7 +490,7 @@ with app.get_producer() as producer:
490490
def get_consumer(auto_commit_enable: bool = True) -> Consumer
491491
```
492492

493-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L643)
493+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L655)
494494

495495
Create and return a pre-configured Consumer instance.
496496
The Consumer is initialized with params passed to Application.
@@ -539,7 +539,7 @@ with app.get_consumer() as consumer:
539539
def clear_state()
540540
```
541541

542-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L690)
542+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L702)
543543

544544
Clear the state of the application.
545545

@@ -553,7 +553,7 @@ Clear the state of the application.
553553
def run(dataframe: StreamingDataFrame)
554554
```
555555

556-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/app.py#L696)
556+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L708)
557557

558558
Start processing data from Kafka using provided `StreamingDataFrame`
559559

docs/api-reference/context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def set_message_context(context: Optional[MessageContext])
1313
```
1414

15-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/context.py#L20)
15+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/context.py#L20)
1616

1717
Set a MessageContext for the current message in the given `contextvars.Context`
1818

@@ -55,7 +55,7 @@ sdf = sdf.update(lambda value: alter_context(value))
5555
def message_context() -> MessageContext
5656
```
5757

58-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/context.py#L51)
58+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/context.py#L51)
5959

6060
Get a MessageContext for the current message, which houses most of the message
6161

docs/api-reference/dataframe.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class StreamingDataFrame(BaseStreaming)
1111
```
1212

13-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L63)
13+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L63)
1414

1515
`StreamingDataFrame` is the main object you will use for ETL work.
1616

@@ -81,7 +81,7 @@ def apply(func: Union[
8181
metadata: bool = False) -> Self
8282
```
8383

84-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L178)
84+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L178)
8585

8686
Apply a function to transform the value and return a new value.
8787

@@ -139,7 +139,7 @@ def update(func: Union[
139139
metadata: bool = False) -> Self
140140
```
141141

142-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L267)
142+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L267)
143143

144144
Apply a function to mutate value in-place or to perform a side effect
145145

@@ -207,7 +207,7 @@ def filter(func: Union[
207207
metadata: bool = False) -> Self
208208
```
209209

210-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L359)
210+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L359)
211211

212212
Filter value using provided function.
213213

@@ -259,7 +259,7 @@ def group_by(key: Union[str, Callable[[Any], Any]],
259259
key_serializer: Optional[SerializerType] = "json") -> Self
260260
```
261261

262-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L445)
262+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L445)
263263

264264
"Groups" messages by re-keying them via the provided group_by operation
265265

@@ -324,7 +324,7 @@ a clone with this operation added (assign to keep its effect).
324324
def contains(key: str) -> StreamingSeries
325325
```
326326

327-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L523)
327+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L523)
328328

329329
Check if the key is present in the Row value.
330330

@@ -363,7 +363,7 @@ or False otherwise.
363363
def to_topic(topic: Topic, key: Optional[Callable[[Any], Any]] = None) -> Self
364364
```
365365

366-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L548)
366+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L548)
367367

368368
Produce current value to a topic. You can optionally specify a new key.
369369

@@ -416,7 +416,7 @@ the updated StreamingDataFrame instance (reassignment NOT required).
416416
def set_timestamp(func: Callable[[Any, Any, int, Any], int]) -> Self
417417
```
418418

419-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L593)
419+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L593)
420420

421421
Set a new timestamp based on the current message value and its metadata.
422422

@@ -469,7 +469,7 @@ def set_headers(
469469
) -> Self
470470
```
471471

472-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L634)
472+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L634)
473473

474474
Set new message headers based on the current message value and metadata.
475475

@@ -518,7 +518,7 @@ a new StreamingDataFrame instance
518518
def print(pretty: bool = True, metadata: bool = False) -> Self
519519
```
520520

521-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L685)
521+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L685)
522522

523523
Print out the current message value (and optionally, the message metadata) to
524524

@@ -574,7 +574,7 @@ def compose(
574574
) -> Dict[str, VoidExecutor]
575575
```
576576

577-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L727)
577+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L727)
578578

579579
Compose all functions of this StreamingDataFrame into one big closure.
580580

@@ -628,7 +628,7 @@ def test(value: Any,
628628
topic: Optional[Topic] = None) -> List[Any]
629629
```
630630

631-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L764)
631+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L764)
632632

633633
A shorthand to test `StreamingDataFrame` with provided value
634634

@@ -665,7 +665,7 @@ def tumbling_window(duration_ms: Union[int, timedelta],
665665
name: Optional[str] = None) -> TumblingWindowDefinition
666666
```
667667

668-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L801)
668+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L801)
669669

670670
Create a tumbling window transformation on this StreamingDataFrame.
671671

@@ -751,7 +751,7 @@ def hopping_window(duration_ms: Union[int, timedelta],
751751
name: Optional[str] = None) -> HoppingWindowDefinition
752752
```
753753

754-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L877)
754+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L877)
755755

756756
Create a hopping window transformation on this StreamingDataFrame.
757757

@@ -843,7 +843,7 @@ sdf = (
843843
def drop(columns: Union[str, List[str]]) -> Self
844844
```
845845

846-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/dataframe.py#L969)
846+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/dataframe.py#L969)
847847

848848
Drop column(s) from the message value (value must support `del`, like a dict).
849849

@@ -887,7 +887,7 @@ a new StreamingDataFrame instance
887887
class StreamingSeries(BaseStreaming)
888888
```
889889

890-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L47)
890+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L47)
891891

892892
`StreamingSeries` are typically generated by `StreamingDataframes` when getting
893893
elements from, or performing certain operations on, a `StreamingDataframe`,
@@ -953,7 +953,7 @@ sdf = sdf[["column_a"] & (sdf["new_sum_field"] >= 10)]
953953
def from_apply_callback(cls, func: ApplyWithMetadataCallback) -> Self
954954
```
955955

956-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L107)
956+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L107)
957957

958958
Create a StreamingSeries from a function.
959959

@@ -981,7 +981,7 @@ instance of `StreamingSeries`
981981
def apply(func: ApplyCallback) -> Self
982982
```
983983

984-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L121)
984+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L121)
985985

986986
Add a callable to the execution list for this series.
987987

@@ -1033,7 +1033,7 @@ a new `StreamingSeries` with the new callable added
10331033
def compose_returning() -> ReturningExecutor
10341034
```
10351035

1036-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L155)
1036+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L155)
10371037

10381038
Compose a list of functions from this StreamingSeries and its parents into one
10391039

@@ -1064,7 +1064,7 @@ def compose(
10641064
None]] = None) -> VoidExecutor
10651065
```
10661066

1067-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L170)
1067+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L170)
10681068

10691069
Compose all functions of this StreamingSeries into one big closure.
10701070

@@ -1122,7 +1122,7 @@ def test(value: Any,
11221122
ctx: Optional[MessageContext] = None) -> Any
11231123
```
11241124

1125-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L214)
1125+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L214)
11261126

11271127
A shorthand to test `StreamingSeries` with provided value
11281128

@@ -1154,7 +1154,7 @@ result of `StreamingSeries`
11541154
def isin(other: Container) -> Self
11551155
```
11561156

1157-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L269)
1157+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L269)
11581158

11591159
Check if series value is in "other".
11601160

@@ -1199,7 +1199,7 @@ new StreamingSeries
11991199
def contains(other: Union[Self, object]) -> Self
12001200
```
12011201

1202-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L296)
1202+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L296)
12031203

12041204
Check if series value contains "other"
12051205

@@ -1244,7 +1244,7 @@ new StreamingSeries
12441244
def is_(other: Union[Self, object]) -> Self
12451245
```
12461246

1247-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L321)
1247+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L321)
12481248

12491249
Check if series value refers to the same object as `other`
12501250

@@ -1286,7 +1286,7 @@ new StreamingSeries
12861286
def isnot(other: Union[Self, object]) -> Self
12871287
```
12881288

1289-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L344)
1289+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L344)
12901290

12911291
Check if series value does not refer to the same object as `other`
12921292

@@ -1329,7 +1329,7 @@ new StreamingSeries
13291329
def isnull() -> Self
13301330
```
13311331

1332-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L368)
1332+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L368)
13331333

13341334
Check if series value is None.
13351335

@@ -1366,7 +1366,7 @@ new StreamingSeries
13661366
def notnull() -> Self
13671367
```
13681368

1369-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L391)
1369+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L391)
13701370

13711371
Check if series value is not None.
13721372

@@ -1403,7 +1403,7 @@ new StreamingSeries
14031403
def abs() -> Self
14041404
```
14051405

1406-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/78b9db67a528a5423f1795cb3b5747d0f09a8768/quixstreams/dataframe/series.py#L414)
1406+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/dataframe/series.py#L414)
14071407

14081408
Get absolute value of the series value.
14091409

0 commit comments

Comments
 (0)