diff --git a/.readthedocs.yml b/.readthedocs.yml index 507f8d271a..5fd9cebe8a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,6 +5,15 @@ # Required version: 2 +# .readthedocs.yml hook to copy kedro-datasets to kedro.datasets before building the docs +build: + os: ubuntu-20.04 + tools: + python: "3.7" + jobs: + post_checkout: + - bash docs/kedro-datasets-docs.sh + # Build documentation in the docs/ directory with Sphinx sphinx: builder: html diff --git a/docs/build-docs.sh b/docs/build-docs.sh index 3bfa098013..76b67531c0 100755 --- a/docs/build-docs.sh +++ b/docs/build-docs.sh @@ -16,6 +16,8 @@ rm -rf docs/build mkdir docs/build/ cp -r docs/_templates docs/conf.py docs/*.svg docs/*.json docs/build/ +bash docs/kedro-datasets-docs.sh + if [ "$action" == "linkcheck" ]; then sphinx-build -c docs/ -ETan -j auto -D language=en -b linkcheck docs/build/ docs/build/html elif [ "$action" == "docs" ]; then diff --git a/docs/conf.py b/docs/conf.py index c917366d63..62ff814b09 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -140,6 +140,7 @@ "integer -- return number of occurrences of value", "integer -- return first index of value.", "kedro.extras.datasets.pandas.json_dataset.JSONDataSet", + "kedro.datasets.pandas.json_dataset.JSONDataSet", "pluggy._manager.PluginManager", "_DI", "_DO", @@ -333,6 +334,7 @@ "kedro.config", "kedro.extras.datasets", "kedro.extras.logging", + "kedro.datasets", ] diff --git a/docs/kedro-datasets-docs.sh b/docs/kedro-datasets-docs.sh new file mode 100755 index 0000000000..10054034ab --- /dev/null +++ b/docs/kedro-datasets-docs.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Script to copy kedro-datasets to kedro.datasets before the documentation build for Kedro in ReadTheDocs. + +# Exit script if you try to use an uninitialized variable. +set -o nounset + +# Exit script if a statement returns a non-true return value. +set -o errexit + +pip install kedro-datasets +pip install --no-deps -t kedro/to_delete kedro-datasets +mv kedro/to_delete/kedro_datasets kedro/datasets +rm -r kedro/to_delete diff --git a/docs/source/api_docs/kedro.datasets.rst b/docs/source/api_docs/kedro.datasets.rst new file mode 100644 index 0000000000..28b66c09fa --- /dev/null +++ b/docs/source/api_docs/kedro.datasets.rst @@ -0,0 +1,50 @@ +kedro.datasets +===================== + +.. rubric:: Description + +.. automodule:: kedro.datasets + +.. rubric:: Classes + +.. autosummary:: + :toctree: + :template: autosummary/class.rst + + kedro.datasets.api.APIDataSet + kedro.datasets.biosequence.BioSequenceDataSet + kedro.datasets.dask.ParquetDataSet + kedro.datasets.email.EmailMessageDataSet + kedro.datasets.geopandas.GeoJSONDataSet + kedro.datasets.holoviews.HoloviewsWriter + kedro.datasets.json.JSONDataSet + kedro.datasets.matplotlib.MatplotlibWriter + kedro.datasets.networkx.GMLDataSet + kedro.datasets.networkx.GraphMLDataSet + kedro.datasets.networkx.JSONDataSet + kedro.datasets.pandas.CSVDataSet + kedro.datasets.pandas.ExcelDataSet + kedro.datasets.pandas.FeatherDataSet + kedro.datasets.pandas.GBQQueryDataSet + kedro.datasets.pandas.GBQTableDataSet + kedro.datasets.pandas.GenericDataSet + kedro.datasets.pandas.HDFDataSet + kedro.datasets.pandas.JSONDataSet + kedro.datasets.pandas.ParquetDataSet + kedro.datasets.pandas.SQLQueryDataSet + kedro.datasets.pandas.SQLTableDataSet + kedro.datasets.pandas.XMLDataSet + kedro.datasets.pickle.PickleDataSet + kedro.datasets.pillow.ImageDataSet + kedro.datasets.plotly.JSONDataSet + kedro.datasets.plotly.PlotlyDataSet + kedro.datasets.redis.PickleDataSet + kedro.datasets.spark.DeltaTableDataSet + kedro.datasets.spark.SparkDataSet + kedro.datasets.spark.SparkHiveDataSet + kedro.datasets.spark.SparkJDBCDataSet + kedro.datasets.tensorflow.TensorFlowModelDataset + kedro.datasets.text.TextDataSet + kedro.datasets.tracking.JSONDataSet + kedro.datasets.tracking.MetricsDataSet + kedro.datasets.yaml.YAMLDataSet