Skip to content

Commit

Permalink
Fix docstrings on kedro/extras/datasets (#2995)
Browse files Browse the repository at this point in the history
* Fix docstrings on kedro/extras/datasets

Signed-off-by: lrcouto <[email protected]>

* Fix formatting error

Signed-off-by: lrcouto <[email protected]>

* Explicitly define code block

Signed-off-by: lrcouto <[email protected]>

* Fix empty line under code block

Signed-off-by: lrcouto <[email protected]>

* Fix formatting error

Signed-off-by: lrcouto <[email protected]>

* Fix broken link

Signed-off-by: lrcouto <[email protected]>

* Bump kedro-datasets version

Signed-off-by: Ankita Katiyar <[email protected]>

* Update links in partitioned and incremental datasets

Signed-off-by: Ankita Katiyar <[email protected]>

* Update links in partitioned and incremental datasets

Signed-off-by: Ankita Katiyar <[email protected]>

* Update links in partitioned dataset

Signed-off-by: Ankita Katiyar <[email protected]>

* Update links in partitioned dataset

Signed-off-by: Ankita Katiyar <[email protected]>

* Add polars.GenericDataSet to .rst

Signed-off-by: Ankita Katiyar <[email protected]>

---------

Signed-off-by: lrcouto <[email protected]>
Signed-off-by: Ankita Katiyar <[email protected]>
Co-authored-by: Ankita Katiyar <[email protected]>
  • Loading branch information
lrcouto and ankatiyar authored Sep 1, 2023
1 parent 0293dc1 commit 604b27a
Show file tree
Hide file tree
Showing 33 changed files with 95 additions and 70 deletions.
1 change: 1 addition & 0 deletions docs/source/kedro_datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ kedro_datasets
kedro_datasets.plotly.JSONDataSet
kedro_datasets.plotly.PlotlyDataSet
kedro_datasets.polars.CSVDataSet
kedro_datasets.polars.GenericDataSet
kedro_datasets.redis.PickleDataSet
kedro_datasets.snowflake.SnowparkTableDataSet
kedro_datasets.spark.DeltaTableDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/api/api_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class APIDataSet(AbstractDataset[None, requests.Response]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -36,7 +37,7 @@ class APIDataSet(AbstractDataset[None, requests.Response]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.api import APIDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/dask/parquet_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ParquetDataSet(AbstractDataset[dd.DataFrame, dd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -38,9 +38,10 @@ class ParquetDataSet(AbstractDataset[dd.DataFrame, dd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.dask import ParquetDataSet
>>> import pandas as pd
>>> import dask.dataframe as dd
Expand Down
4 changes: 2 additions & 2 deletions kedro/extras/datasets/json/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class JSONDataSet(AbstractVersionedDataset[Any, Any]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -40,7 +40,7 @@ class JSONDataSet(AbstractVersionedDataset[Any, Any]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.json import JSONDataSet
Expand Down
4 changes: 2 additions & 2 deletions kedro/extras/datasets/matplotlib/matplotlib_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MatplotlibWriter(
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -45,7 +45,7 @@ class MatplotlibWriter(
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> import matplotlib.pyplot as plt
Expand Down
4 changes: 2 additions & 2 deletions kedro/extras/datasets/pandas/csv_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CSVDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -54,7 +54,7 @@ class CSVDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import CSVDataSet
Expand Down
8 changes: 4 additions & 4 deletions kedro/extras/datasets/pandas/excel_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ExcelDataSet(
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -58,7 +58,7 @@ class ExcelDataSet(
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import ExcelDataSet
Expand All @@ -78,7 +78,7 @@ class ExcelDataSet(
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_
data_catalog_yaml_examples.html>`_
for a multi-sheet Excel file:
.. code-block:: yaml
Expand All @@ -91,7 +91,7 @@ class ExcelDataSet(
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_
advanced_data_catalog_usage.html>`_
for a multi-sheet Excel file:
::
Expand Down
4 changes: 2 additions & 2 deletions kedro/extras/datasets/pandas/feather_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FeatherDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -52,7 +52,7 @@ class FeatherDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import FeatherDataSet
Expand Down
4 changes: 2 additions & 2 deletions kedro/extras/datasets/pandas/gbq_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GBQTableDataSet(AbstractDataset[None, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -48,7 +48,7 @@ class GBQTableDataSet(AbstractDataset[None, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import GBQTableDataSet
Expand Down
4 changes: 2 additions & 2 deletions kedro/extras/datasets/pandas/generic_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GenericDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand Down Expand Up @@ -71,7 +71,7 @@ class GenericDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import GenericDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/pandas/hdf_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class HDFDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -42,7 +43,7 @@ class HDFDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import HDFDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/pandas/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class JSONDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -49,7 +50,7 @@ class JSONDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import JSONDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/pandas/parquet_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class ParquetDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand Down Expand Up @@ -61,7 +62,7 @@ class ParquetDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import ParquetDataSet
Expand Down
11 changes: 7 additions & 4 deletions kedro/extras/datasets/pandas/sql_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class SQLTableDataSet(AbstractDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -132,7 +133,7 @@ class SQLTableDataSet(AbstractDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import SQLTableDataSet
Expand Down Expand Up @@ -280,7 +281,8 @@ class SQLQueryDataSet(AbstractDataset[None, pd.DataFrame]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand Down Expand Up @@ -311,9 +313,10 @@ class SQLQueryDataSet(AbstractDataset[None, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import SQLQueryDataSet
>>> import pandas as pd
>>>
Expand Down
2 changes: 1 addition & 1 deletion kedro/extras/datasets/pandas/xml_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class XMLDataSet(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pandas import XMLDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/pickle/pickle_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class PickleDataSet(AbstractVersionedDataset[Any, Any]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -50,7 +51,7 @@ class PickleDataSet(AbstractVersionedDataset[Any, Any]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pickle import PickleDataSet
Expand Down
2 changes: 1 addition & 1 deletion kedro/extras/datasets/pillow/image_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ImageDataSet(AbstractVersionedDataset[Image.Image, Image.Image]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.pillow import ImageDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/plotly/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class JSONDataSet(
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -41,7 +42,7 @@ class JSONDataSet(
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.plotly import JSONDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/plotly/plotly_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class PlotlyDataSet(JSONDataSet):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -48,7 +49,7 @@ class PlotlyDataSet(JSONDataSet):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.plotly import PlotlyDataSet
Expand Down
5 changes: 3 additions & 2 deletions kedro/extras/datasets/redis/redis_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class PickleDataSet(AbstractDataset[Any, Any]):
Example usage for the
`YAML API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-yaml-api>`_:
data_catalog_yaml_examples.html>`_:
.. code-block:: yaml
Expand All @@ -45,7 +46,7 @@ class PickleDataSet(AbstractDataset[Any, Any]):
Example usage for the
`Python API <https://kedro.readthedocs.io/en/stable/data/\
data_catalog.html#use-the-data-catalog-with-the-code-api>`_:
advanced_data_catalog_usage.html>`_:
::
>>> from kedro.extras.datasets.redis import PickleDataSet
Expand Down
Loading

0 comments on commit 604b27a

Please sign in to comment.