Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded nox -rs docs to generate docs, fixed errors. #568

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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