Skip to content

Commit

Permalink
Expanded nox -rs docs to generate docs. (#568)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
  • Loading branch information
dblock authored Nov 10, 2023
1 parent 58b83d8 commit d8dc547
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 31 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
- 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))
- 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
Expand Down
6 changes: 2 additions & 4 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/source/api-ref/clients/security_client.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Security Client

```{eval-rst}
.. autoclass:: opensearchpy.clients.security.SecurityClient
.. autoclass:: opensearchpy.client.security.SecurityClient
```
7 changes: 3 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions opensearchpy/_async/client/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion opensearchpy/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions opensearchpy/client/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit d8dc547

Please sign in to comment.