From 2a63d6023ea5f0bab568ffe7e45714e33e469e9d Mon Sep 17 00:00:00 2001 From: Garrett Wu Date: Tue, 6 Aug 2024 00:20:46 +0000 Subject: [PATCH 1/3] docs: add streaming html docs --- docs/reference/bigframes.streaming/dataframe.rst | 7 +++++++ docs/reference/bigframes.streaming/index.rst | 13 +++++++++++++ docs/reference/index.rst | 1 + 3 files changed, 21 insertions(+) create mode 100644 docs/reference/bigframes.streaming/dataframe.rst create mode 100644 docs/reference/bigframes.streaming/index.rst diff --git a/docs/reference/bigframes.streaming/dataframe.rst b/docs/reference/bigframes.streaming/dataframe.rst new file mode 100644 index 0000000000..efabee02e0 --- /dev/null +++ b/docs/reference/bigframes.streaming/dataframe.rst @@ -0,0 +1,7 @@ +bigframes.streaming.dataframe +============================= + +.. automodule:: bigframes.streaming.dataframe + :members: + :inherited-members: + :undoc-members: diff --git a/docs/reference/bigframes.streaming/index.rst b/docs/reference/bigframes.streaming/index.rst new file mode 100644 index 0000000000..20a22072e5 --- /dev/null +++ b/docs/reference/bigframes.streaming/index.rst @@ -0,0 +1,13 @@ + +============================ +BigQuery DataFrame Streaming +============================ + +.. automodule:: bigframes.streaming + :members: + :undoc-members: + +.. toctree:: + :maxdepth: 2 + + dataframe diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 387e9b5ced..eb5a774b29 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -11,3 +11,4 @@ packages. bigframes.pandas/index bigframes.ml/index bigframes.bigquery/index + bigframes.streaming/index From a386b2fde276e8dfd96e287ab5715692cb52af9c Mon Sep 17 00:00:00 2001 From: Garrett Wu Date: Tue, 6 Aug 2024 00:52:39 +0000 Subject: [PATCH 2/3] add beta icon --- docs/reference/bigframes.streaming/dataframe.rst | 3 +-- docs/templates/toc.yml | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/reference/bigframes.streaming/dataframe.rst b/docs/reference/bigframes.streaming/dataframe.rst index efabee02e0..79ec64961c 100644 --- a/docs/reference/bigframes.streaming/dataframe.rst +++ b/docs/reference/bigframes.streaming/dataframe.rst @@ -1,7 +1,6 @@ bigframes.streaming.dataframe ============================= -.. automodule:: bigframes.streaming.dataframe +.. autoclass:: bigframes.streaming.dataframe.StreamingDataFrame :members: :inherited-members: - :undoc-members: diff --git a/docs/templates/toc.yml b/docs/templates/toc.yml index 95bded9a60..8add2979f6 100644 --- a/docs/templates/toc.yml +++ b/docs/templates/toc.yml @@ -203,4 +203,9 @@ - name: BigQuery built-in functions uid: bigframes.bigquery name: bigframes.bigquery + - items: + - name: Overview + uid: bigframes.streaming + name: Streaming + status: beta name: BigQuery DataFrames From 9b49610895805b71facdaa9bbdc28b689c0127e8 Mon Sep 17 00:00:00 2001 From: Garrett Wu Date: Tue, 6 Aug 2024 21:24:31 +0000 Subject: [PATCH 3/3] add beta icon in toc.yml --- bigframes/session/__init__.py | 4 +++- bigframes/streaming/dataframe.py | 11 ++++++++++- docs/templates/toc.yml | 4 +++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/bigframes/session/__init__.py b/bigframes/session/__init__.py index 8ff5862bfc..2da788292b 100644 --- a/bigframes/session/__init__.py +++ b/bigframes/session/__init__.py @@ -760,7 +760,9 @@ def read_gbq_table_streaming( ) -> streaming_dataframe.StreamingDataFrame: """Turn a BigQuery table into a StreamingDataFrame. - Note: The bigframes.streaming module is a preview feature, and subject to change. + .. note:: + + The bigframes.streaming module is a preview feature, and subject to change. **Examples:** diff --git a/bigframes/streaming/dataframe.py b/bigframes/streaming/dataframe.py index 64a4898c57..b83ae5d822 100644 --- a/bigframes/streaming/dataframe.py +++ b/bigframes/streaming/dataframe.py @@ -191,7 +191,16 @@ def to_pubsub( @log_adapter.class_logger class StreamingDataFrame(StreamingBase): - __doc__ = _curate_df_doc(dataframe.DataFrame.__doc__) + __doc__ = ( + _curate_df_doc(dataframe.DataFrame.__doc__) + + """ + .. note:: + + The bigframes.streaming module is a preview feature, and subject to change. + + Currently only supports basic projection, filtering and preview operations. + """ + ) # Private constructor _create_key = object() diff --git a/docs/templates/toc.yml b/docs/templates/toc.yml index 8add2979f6..736ffba286 100644 --- a/docs/templates/toc.yml +++ b/docs/templates/toc.yml @@ -206,6 +206,8 @@ - items: - name: Overview uid: bigframes.streaming - name: Streaming + - name: StreamingDataFrame + uid: bigframes.streaming.dataframe.StreamingDataFrame + name: bigframes.streaming status: beta name: BigQuery DataFrames