Skip to content

Commit

Permalink
docs: add docstring returns section to Options (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
arwas11 authored Sep 5, 2024
1 parent 71a8ab9 commit a2640a2
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions bigframes/_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ def _init_bigquery_thread_local(self):

@property
def bigquery(self) -> bigquery_options.BigQueryOptions:
"""Options to use with the BigQuery engine."""
"""Options to use with the BigQuery engine.
Returns:
bigframes._config.bigquery_options.BigQueryOptions:
Options for BigQuery engine.
"""
if self._local.bigquery_options is not None:
# The only way we can get here is if someone called
# _init_bigquery_thread_local.
Expand All @@ -83,7 +88,12 @@ def bigquery(self) -> bigquery_options.BigQueryOptions:

@property
def display(self) -> display_options.DisplayOptions:
"""Options controlling object representation."""
"""Options controlling object representation.
Returns:
bigframes._config.display_options.DisplayOptions:
Options for controlling object representation.
"""
return self._local.display_options

@property
Expand All @@ -95,12 +105,21 @@ def sampling(self) -> sampling_options.SamplingOptions:
(e.g., to_pandas, to_numpy, values) or implicitly (e.g.,
matplotlib plotting). This option can be overriden by
parameters in specific functions.
Returns:
bigframes._config.sampling_options.SamplingOptions:
Options for controlling downsampling.
"""
return self._local.sampling_options

@property
def compute(self) -> compute_options.ComputeOptions:
"""Thread-local options controlling object computation."""
"""Thread-local options controlling object computation.
Returns:
bigframes._config.compute_options.ComputeOptions:
Thread-local options for controlling object computation
"""
return self._local.compute_options

@property
Expand All @@ -109,6 +128,11 @@ def is_bigquery_thread_local(self) -> bool:
A thread-local session can be started by using
`with bigframes.option_context("bigquery.some_option", "some-value"):`.
Returns:
bool:
A boolean value, where a value is True if a thread-local session
is in use; otherwise False.
"""
return self._local.bigquery_options is not None

Expand Down

0 comments on commit a2640a2

Please sign in to comment.