From a77c58bba3992f8869894ab1ae986716442b4f43 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 14 Sep 2023 15:35:46 +0300 Subject: [PATCH] updated doc structure --- docs/requirements.txt | 4 ++-- docs/source/database.rst | 4 ++-- docs/source/index.rst | 5 +++++ docs/source/jobs.rst | 7 +++++++ docs/source/ml_engines.rst | 7 +++++++ docs/source/model.rst | 4 ++-- docs/source/project.rst | 4 ++-- docs/source/tables.rst | 7 +++++++ docs/source/views.rst | 7 +++++++ mindsdb_sdk/projects.py | 9 ++++++++- mindsdb_sdk/tables.py | 13 +++++++------ 11 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 docs/source/jobs.rst create mode 100644 docs/source/ml_engines.rst create mode 100644 docs/source/tables.rst create mode 100644 docs/source/views.rst diff --git a/docs/requirements.txt b/docs/requirements.txt index 21ae0f2..4864adc 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ requests -pandas == 1.3.5 -mindsdb-sql >= 0.5.0, < 0.6.0 +pandas >=2.0.0, <2.1.0 +mindsdb-sql >= 0.7.0, < 0.8.0 sphinx sphinx-rtd-theme diff --git a/docs/source/database.rst b/docs/source/database.rst index 0491238..748aae7 100644 --- a/docs/source/database.rst +++ b/docs/source/database.rst @@ -1,7 +1,7 @@ -Database +Databases ---------------------------- -.. automodule:: mindsdb_sdk.database +.. automodule:: mindsdb_sdk.databases :members: :undoc-members: :show-inheritance: \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index d554756..82527df 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -105,9 +105,14 @@ API documentation server database + ml_engines project model + tables + views query + jobs + Indices and tables ------------------ diff --git a/docs/source/jobs.rst b/docs/source/jobs.rst new file mode 100644 index 0000000..aa47c3e --- /dev/null +++ b/docs/source/jobs.rst @@ -0,0 +1,7 @@ +Jobs +------------------------- + +.. automodule:: mindsdb_sdk.jobs + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/ml_engines.rst b/docs/source/ml_engines.rst new file mode 100644 index 0000000..f1dd4e4 --- /dev/null +++ b/docs/source/ml_engines.rst @@ -0,0 +1,7 @@ +ML Engines +------------------------- + +.. automodule:: mindsdb_sdk.ml_engines + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/model.rst b/docs/source/model.rst index 2e81d2d..6b9bdf8 100644 --- a/docs/source/model.rst +++ b/docs/source/model.rst @@ -1,7 +1,7 @@ -Model +Models ------------------------- -.. automodule:: mindsdb_sdk.model +.. automodule:: mindsdb_sdk.models :members: :undoc-members: :show-inheritance: \ No newline at end of file diff --git a/docs/source/project.rst b/docs/source/project.rst index 0ce71b5..c7333fe 100644 --- a/docs/source/project.rst +++ b/docs/source/project.rst @@ -1,7 +1,7 @@ -Project +Projects --------------------------- -.. automodule:: mindsdb_sdk.project +.. automodule:: mindsdb_sdk.projects :members: :undoc-members: :show-inheritance: diff --git a/docs/source/tables.rst b/docs/source/tables.rst new file mode 100644 index 0000000..3082b55 --- /dev/null +++ b/docs/source/tables.rst @@ -0,0 +1,7 @@ +Tables +------------------------- + +.. automodule:: mindsdb_sdk.tables + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/views.rst b/docs/source/views.rst new file mode 100644 index 0000000..aa5ff8b --- /dev/null +++ b/docs/source/views.rst @@ -0,0 +1,7 @@ +Views +------------------------- + +.. automodule:: mindsdb_sdk.views + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/mindsdb_sdk/projects.py b/mindsdb_sdk/projects.py index 705afaa..d234ab5 100644 --- a/mindsdb_sdk/projects.py +++ b/mindsdb_sdk/projects.py @@ -18,7 +18,14 @@ class Project: """ Allows to work with project: to manage models and views inside of it or call raw queries inside of project - **Queries** + Server instance allows to manipulate project and databases (integration) on mindsdb server + + Attributes for accessing to different objects: + - models + - views + - jobs + + It is possible to cal queries from project context: Making prediciton using sql: diff --git a/mindsdb_sdk/tables.py b/mindsdb_sdk/tables.py index 7ac3e2a..78d7f3e 100644 --- a/mindsdb_sdk/tables.py +++ b/mindsdb_sdk/tables.py @@ -122,18 +122,19 @@ def update(self, values: Union[dict, Query], on: list = None, filters: dict = No ''' Update table by condition of from other table. If 'values' is a dict: - - it will be an update by condition - - 'filters' is required - - used command: update table set a=1 where x=1 + - it will be an update by condition + - 'filters' is required + - used command: update table set a=1 where x=1 If 'values' is a Query: - - it will be an update from select - - 'on' is required - - used command: update table on a,b from (query) + - it will be an update from select + - 'on' is required + - used command: update table on a,b from (query) :param values: input for update, can be dict or query :param on: list of column to map subselect to table ['a', 'b', ...] :param filters: dict to filter updated rows, {'column': 'value', ...} + ''' if isinstance(values, Query):