diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bd0ff04..11809cf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Use API generator for all APIs ([#551](https://github.com/opensearch-project/opensearch-py/pull/551)) - 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 `nox -rs docs` to generate docs ([#568](https://github.com/opensearch-project/opensearch-py/pull/568)) ### 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)) ### Removed diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index f6cb568c..af281c39 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -110,12 +110,10 @@ $ nox -rs format To build the documentation with [Sphinx](https://www.sphinx-doc.org/). ``` -pip install -e .[docs] -cd docs -make html +$ nox -rs docs ``` -Open `opensearch-py/docs/build/html/index.html` to see results. +Open `docs/build/html/index.html` to see results. ## Client Code Generator diff --git a/docs/source/api-ref/clients/security_client.md b/docs/source/api-ref/clients/security_client.md index f8995ebf..c782d38d 100644 --- a/docs/source/api-ref/clients/security_client.md +++ b/docs/source/api-ref/clients/security_client.md @@ -1,5 +1,5 @@ # Security Client ```{eval-rst} -.. autoclass:: opensearchpy.clients.security.SecurityClient +.. autoclass:: opensearchpy.client.security.SecurityClient ``` diff --git a/noxfile.py b/noxfile.py index e9189cc9..4018ed47 100644 --- a/noxfile.py +++ b/noxfile.py @@ -101,10 +101,9 @@ def lint(session: Any) -> None: @nox.session() # type: ignore def docs(session: Any) -> None: session.install(".") - session.install( - "-rdev-requirements.txt", "sphinx-rtd-theme", "sphinx-autodoc-typehints" - ) - session.run("python", "-m", "pip", "install", "sphinx-autodoc-typehints") + session.install(".[docs]") + with session.chdir("docs"): + session.run("make", "html") @nox.session() # type: ignore diff --git a/opensearchpy/_async/client/__init__.py b/opensearchpy/_async/client/__init__.py index 279fda37..a4defc45 100644 --- a/opensearchpy/_async/client/__init__.py +++ b/opensearchpy/_async/client/__init__.py @@ -84,7 +84,7 @@ class AsyncOpenSearch(Client): # create connection to localhost using the 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`):: # create connection that will automatically inspect the cluster to get diff --git a/opensearchpy/_async/client/_patch.py b/opensearchpy/_async/client/_patch.py index cbf24e0b..1b9bcb5d 100644 --- a/opensearchpy/_async/client/_patch.py +++ b/opensearchpy/_async/client/_patch.py @@ -23,8 +23,8 @@ async def list_all_point_in_time( .. warning:: - This API will be removed in a future version - Use 'get_all_pits' API instead. + This API will be removed in a future version. + Use 'get_all_pits' API instead. """ warnings.warn( @@ -60,8 +60,8 @@ async def create_point_in_time( .. warning:: - This API will be removed in a future version - Use 'create_pit' API instead. + This API will be removed in a future version. + Use 'create_pit' API instead. """ warnings.warn( @@ -89,8 +89,8 @@ async def delete_point_in_time( .. warning:: - This API will be removed in a future version - Use 'delete_all_pits' or 'delete_pit' API instead. + This API will be removed in a future version. + Use 'delete_all_pits' or 'delete_pit' API instead. """ warnings.warn( @@ -111,8 +111,8 @@ async def health_check(self: Any, params: Any = None, headers: Any = None) -> An .. warning:: - This API will be removed in a future version - Use 'health' API instead. + This API will be removed in a future version. + Use 'health' API instead. """ warnings.warn( @@ -132,8 +132,8 @@ async def update_audit_config( .. warning:: - This API will be removed in a future version - Use 'update_audit_configuration' API instead. + This API will be removed in a future version. + Use 'update_audit_configuration' API instead. """ warnings.warn( diff --git a/opensearchpy/client/__init__.py b/opensearchpy/client/__init__.py index 05af6764..446226c5 100644 --- a/opensearchpy/client/__init__.py +++ b/opensearchpy/client/__init__.py @@ -84,7 +84,7 @@ class OpenSearch(Client): # create connection to localhost using the 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`):: # create connection that will automatically inspect the cluster to get diff --git a/opensearchpy/client/_patch.py b/opensearchpy/client/_patch.py index 3f156906..6f5a1edb 100644 --- a/opensearchpy/client/_patch.py +++ b/opensearchpy/client/_patch.py @@ -21,8 +21,8 @@ def list_all_point_in_time(self: Any, params: Any = None, headers: Any = None) - .. warning:: - This API will be removed in a future version - Use 'get_all_pits' API instead. + This API will be removed in a future version. + Use 'get_all_pits' API instead. """ warnings.warn( @@ -58,8 +58,8 @@ def create_point_in_time( .. warning:: - This API will be removed in a future version - Use 'create_pit' API instead. + This API will be removed in a future version. + Use 'create_pit' API instead. """ warnings.warn( @@ -87,8 +87,8 @@ def delete_point_in_time( .. warning:: - This API will be removed in a future version - Use 'delete_all_pits' or 'delete_pit' API instead. + This API will be removed in a future version. + Use 'delete_all_pits' or 'delete_pit' API instead. """ warnings.warn( @@ -109,8 +109,8 @@ def health_check(self: Any, params: Any = None, headers: Any = None) -> Any: .. warning:: - This API will be removed in a future version - Use 'health' API instead. + This API will be removed in a future version. + Use 'health' API instead. """ warnings.warn( @@ -130,8 +130,8 @@ def update_audit_config( .. warning:: - This API will be removed in a future version - Use 'update_audit_configuration' API instead. + This API will be removed in a future version. + Use 'update_audit_configuration' API instead. """ warnings.warn(