Expanded nox -rs docs to generate docs. (#568)

Signed-off-by: dblock <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2023-11-09 23:21:35 -08:00
committed by GitHub
parent 58b83d8c06
commit d8dc5474b7
8 changed files with 29 additions and 31 deletions
+1
View File
@@ -27,6 +27,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Merge `.pyi` type stubs inline ([#563](https://github.com/opensearch-project/opensearch-py/pull/563)) - Merge `.pyi` type stubs inline ([#563](https://github.com/opensearch-project/opensearch-py/pull/563))
- Expanded type coverage to benchmarks, samples and tests ([#566](https://github.com/opensearch-project/opensearch-py/pull/566)) - Expanded type coverage to benchmarks, samples and tests ([#566](https://github.com/opensearch-project/opensearch-py/pull/566))
- Defaulted `enable_cleanup_closed=True` in `aiohttp.TCPConnector` to prevent TLS connection leaks ([#468](https://github.com/opensearch-project/opensearch-py/pull/468)) - Defaulted `enable_cleanup_closed=True` in `aiohttp.TCPConnector` to prevent TLS connection leaks ([#468](https://github.com/opensearch-project/opensearch-py/pull/468))
- Expanded `nox -rs docs` to generate docs ([#568](https://github.com/opensearch-project/opensearch-py/pull/568))
### Deprecated ### Deprecated
- Deprecated point-in-time APIs (list_all_point_in_time, create_point_in_time, delete_point_in_time) and Security Client APIs (health_check and update_audit_config) ([#502](https://github.com/opensearch-project/opensearch-py/pull/502)) - Deprecated point-in-time APIs (list_all_point_in_time, create_point_in_time, delete_point_in_time) and Security Client APIs (health_check and update_audit_config) ([#502](https://github.com/opensearch-project/opensearch-py/pull/502))
### Removed ### Removed
+2 -4
View File
@@ -110,12 +110,10 @@ $ nox -rs format
To build the documentation with [Sphinx](https://www.sphinx-doc.org/). To build the documentation with [Sphinx](https://www.sphinx-doc.org/).
``` ```
pip install -e .[docs] $ nox -rs docs
cd docs
make html
``` ```
Open `opensearch-py/docs/build/html/index.html` to see results. Open `docs/build/html/index.html` to see results.
## Client Code Generator ## Client Code Generator
@@ -1,5 +1,5 @@
# Security Client # Security Client
```{eval-rst} ```{eval-rst}
.. autoclass:: opensearchpy.clients.security.SecurityClient .. autoclass:: opensearchpy.client.security.SecurityClient
``` ```
+3 -4
View File
@@ -101,10 +101,9 @@ def lint(session: Any) -> None:
@nox.session() # type: ignore @nox.session() # type: ignore
def docs(session: Any) -> None: def docs(session: Any) -> None:
session.install(".") session.install(".")
session.install( session.install(".[docs]")
"-rdev-requirements.txt", "sphinx-rtd-theme", "sphinx-autodoc-typehints" with session.chdir("docs"):
) session.run("make", "html")
session.run("python", "-m", "pip", "install", "sphinx-autodoc-typehints")
@nox.session() # type: ignore @nox.session() # type: ignore
+1 -1
View File
@@ -84,7 +84,7 @@ class AsyncOpenSearch(Client):
# create connection to localhost using the ThriftConnection # create connection to localhost using the ThriftConnection
client = OpenSearch(connection_class=ThriftConnection) client = OpenSearch(connection_class=ThriftConnection)
If you want to turn on :ref:`sniffing` you have several options (described If you want to turn on sniffing you have several options (described
in :class:`~opensearchpy.Transport`):: in :class:`~opensearchpy.Transport`)::
# create connection that will automatically inspect the cluster to get # create connection that will automatically inspect the cluster to get
+5 -5
View File
@@ -23,7 +23,7 @@ async def list_all_point_in_time(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'get_all_pits' API instead. Use 'get_all_pits' API instead.
""" """
@@ -60,7 +60,7 @@ async def create_point_in_time(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'create_pit' API instead. Use 'create_pit' API instead.
""" """
@@ -89,7 +89,7 @@ async def delete_point_in_time(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'delete_all_pits' or 'delete_pit' API instead. Use 'delete_all_pits' or 'delete_pit' API instead.
""" """
@@ -111,7 +111,7 @@ async def health_check(self: Any, params: Any = None, headers: Any = None) -> An
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'health' API instead. Use 'health' API instead.
""" """
@@ -132,7 +132,7 @@ async def update_audit_config(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'update_audit_configuration' API instead. Use 'update_audit_configuration' API instead.
""" """
+1 -1
View File
@@ -84,7 +84,7 @@ class OpenSearch(Client):
# create connection to localhost using the ThriftConnection # create connection to localhost using the ThriftConnection
client = OpenSearch(connection_class=ThriftConnection) client = OpenSearch(connection_class=ThriftConnection)
If you want to turn on :ref:`sniffing` you have several options (described If you want to turn on sniffing you have several options (described
in :class:`~opensearchpy.Transport`):: in :class:`~opensearchpy.Transport`)::
# create connection that will automatically inspect the cluster to get # create connection that will automatically inspect the cluster to get
+5 -5
View File
@@ -21,7 +21,7 @@ def list_all_point_in_time(self: Any, params: Any = None, headers: Any = None) -
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'get_all_pits' API instead. Use 'get_all_pits' API instead.
""" """
@@ -58,7 +58,7 @@ def create_point_in_time(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'create_pit' API instead. Use 'create_pit' API instead.
""" """
@@ -87,7 +87,7 @@ def delete_point_in_time(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'delete_all_pits' or 'delete_pit' API instead. Use 'delete_all_pits' or 'delete_pit' API instead.
""" """
@@ -109,7 +109,7 @@ def health_check(self: Any, params: Any = None, headers: Any = None) -> Any:
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'health' API instead. Use 'health' API instead.
""" """
@@ -130,7 +130,7 @@ def update_audit_config(
.. warning:: .. warning::
This API will be removed in a future version This API will be removed in a future version.
Use 'update_audit_configuration' API instead. Use 'update_audit_configuration' API instead.
""" """