From 9c60692a092da9f8543ae8e45d9fd5756287305e Mon Sep 17 00:00:00 2001 From: xzdandy Date: Fri, 1 Sep 2023 01:28:36 -0400 Subject: [PATCH 1/3] Fix broken links --- docs/source/dev-guide/contribute/setup-dev.rst | 2 +- docs/source/overview/connect-to-database.rst | 5 ----- docs/source/overview/getting-started.rst | 3 ++- .../source/overview/getting-started/installation-options.rst | 2 +- docs/source/reference/evaql/create.rst | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/source/dev-guide/contribute/setup-dev.rst b/docs/source/dev-guide/contribute/setup-dev.rst index 0811cca51f..6c9f691379 100644 --- a/docs/source/dev-guide/contribute/setup-dev.rst +++ b/docs/source/dev-guide/contribute/setup-dev.rst @@ -27,7 +27,7 @@ After installing the package locally, you can make changes and run the test case .. note:: EvaDB provides multiple installation options for extending its functionalities. - Please see :ref:`installation guide` for all options. + Please see :ref:`installation options` for all options. Other options can be installed with the ``dev`` environment. diff --git a/docs/source/overview/connect-to-database.rst b/docs/source/overview/connect-to-database.rst index 76a60b0d07..e74de58ca3 100644 --- a/docs/source/overview/connect-to-database.rst +++ b/docs/source/overview/connect-to-database.rst @@ -3,11 +3,6 @@ Connect to Database EvaDB supports an extensive range of data sources for structured and unstructured data. -.. note:: - - Learn more about structured and unstructured data in :doc:`Data Sources `. - - Connect to a SQL Database System -------------------------------- diff --git a/docs/source/overview/getting-started.rst b/docs/source/overview/getting-started.rst index 3c5df180f9..c17ebbac79 100644 --- a/docs/source/overview/getting-started.rst +++ b/docs/source/overview/getting-started.rst @@ -42,6 +42,7 @@ Now, activate the virtual environment: You should see a list of installed packages including but not limited to the following: .. code-block:: bash + Package Version ----------------- ------- aenum 3.1.15 @@ -133,4 +134,4 @@ Try out EvaDB by experimenting with the introductory `MNIST notebook on Colab ` to learn more about the functions used in this app. \ No newline at end of file + Go over the :ref:`Python API` to learn more about the functions used in this app. diff --git a/docs/source/overview/getting-started/installation-options.rst b/docs/source/overview/getting-started/installation-options.rst index 18da1df7b1..680497627d 100644 --- a/docs/source/overview/getting-started/installation-options.rst +++ b/docs/source/overview/getting-started/installation-options.rst @@ -1,7 +1,7 @@ .. _installation options: Installation Options -================== +==================== EvaDB provides the following additional installation options for extending its functionality. diff --git a/docs/source/reference/evaql/create.rst b/docs/source/reference/evaql/create.rst index 586962e006..8e1f39c9bd 100644 --- a/docs/source/reference/evaql/create.rst +++ b/docs/source/reference/evaql/create.rst @@ -15,7 +15,7 @@ The CREATE DATABASE statement allows us to connect to an external structured dat PARAMETERS = [key_value_parameters]; * [database_connection] is the name of the database connection. `[database_connection].[table_name]` will be used as table name to compose SQL queries in EvaDB. -* [database_engine] is the supported database engine. Check :ref:`supported data sources` for all engine and their available configuration parameters. +* [database_engine] is the supported database engine. Check :ref:`supported data sources` for all engine and their available configuration parameters. * [key_value_parameters] is a list of key-value pairs as arguments to establish a connection. From c633aff1e9a6a5bb7b1220a3b8c0720022ffacad Mon Sep 17 00:00:00 2001 From: xzdandy Date: Fri, 1 Sep 2023 01:37:23 -0400 Subject: [PATCH 2/3] Add mysql into databases section --- docs/_toc.yml | 1 + docs/source/reference/databases/mysql.rst | 36 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docs/source/reference/databases/mysql.rst diff --git a/docs/_toc.yml b/docs/_toc.yml index d9069bcec7..89682d6096 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -59,6 +59,7 @@ parts: title: Data Sources sections: - file: source/reference/databases/postgres + - file: source/reference/databases/mysql - file: source/reference/udfs/index title: Models diff --git a/docs/source/reference/databases/mysql.rst b/docs/source/reference/databases/mysql.rst new file mode 100644 index 0000000000..0a1c67d23f --- /dev/null +++ b/docs/source/reference/databases/mysql.rst @@ -0,0 +1,36 @@ +MySQL +========== + +The connection to MySQL is based on the `mysql-connector-python `_ library. + +Dependency +---------- + +* mysql-connector-python + + +Parameters +---------- + +Required: + +* `user` is the database user. +* `password` is the database password. +* `host` is the host name, IP address, or URL. +* `port` is the port used to make TCP/IP connection. +* `database` is the database name. + + +Create Connection +----------------- + +.. code-block:: text + + CREATE DATABASE mysql_data WITH ENGINE = 'mysql', PARAMETERS = { + "user": "eva", + "password": "password", + "host": "localhost", + "port": "5432", + "database": "evadb" + }; + From 18c2ad71a42c87e1ef606e8c88f1459464c65cd2 Mon Sep 17 00:00:00 2001 From: xzdandy Date: Fri, 1 Sep 2023 01:45:36 -0400 Subject: [PATCH 3/3] Add documentation requirements for new data source --- docs/source/dev-guide/extend/new-data-source.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/source/dev-guide/extend/new-data-source.rst b/docs/source/dev-guide/extend/new-data-source.rst index 844262a8cd..d6bdc1ce1f 100644 --- a/docs/source/dev-guide/extend/new-data-source.rst +++ b/docs/source/dev-guide/extend/new-data-source.rst @@ -89,3 +89,10 @@ Add your created data source handler in `get_database_handler` function at `evad return mod.MydbHandler(engine, **kwargs) ... +Add the Data Source in Documentation +------------------------------------ + +Add your new data source into :ref:`databases` section for reference. + +- Create ``mydb.rst`` under `evadb/docs/source/reference/databases ` directory. You can refer to the existing documentation under the directory for example information to be covered in ``mydb.rst``. +- Update ``source/reference/databases/postgres`` in `evadb/docs/_toc.yml `.