Skip to content

Commit d8dc547

Browse files
authored
Expanded nox -rs docs to generate docs. (opensearch-project#568)
Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
1 parent 58b83d8 commit d8dc547

File tree

8 files changed

+29
-31
lines changed

8 files changed

+29
-31
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
2727
- Merge `.pyi` type stubs inline ([#563](https://github.com/opensearch-project/opensearch-py/pull/563))
2828
- Expanded type coverage to benchmarks, samples and tests ([#566](https://github.com/opensearch-project/opensearch-py/pull/566))
2929
- Defaulted `enable_cleanup_closed=True` in `aiohttp.TCPConnector` to prevent TLS connection leaks ([#468](https://github.com/opensearch-project/opensearch-py/pull/468))
30+
- Expanded `nox -rs docs` to generate docs ([#568](https://github.com/opensearch-project/opensearch-py/pull/568))
3031
### Deprecated
3132
- 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))
3233
### Removed

DEVELOPER_GUIDE.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,10 @@ $ nox -rs format
110110
To build the documentation with [Sphinx](https://www.sphinx-doc.org/).
111111

112112
```
113-
pip install -e .[docs]
114-
cd docs
115-
make html
113+
$ nox -rs docs
116114
```
117115

118-
Open `opensearch-py/docs/build/html/index.html` to see results.
116+
Open `docs/build/html/index.html` to see results.
119117

120118
## Client Code Generator
121119

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Security Client
22

33
```{eval-rst}
4-
.. autoclass:: opensearchpy.clients.security.SecurityClient
4+
.. autoclass:: opensearchpy.client.security.SecurityClient
55
```

noxfile.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ def lint(session: Any) -> None:
101101
@nox.session() # type: ignore
102102
def docs(session: Any) -> None:
103103
session.install(".")
104-
session.install(
105-
"-rdev-requirements.txt", "sphinx-rtd-theme", "sphinx-autodoc-typehints"
106-
)
107-
session.run("python", "-m", "pip", "install", "sphinx-autodoc-typehints")
104+
session.install(".[docs]")
105+
with session.chdir("docs"):
106+
session.run("make", "html")
108107

109108

110109
@nox.session() # type: ignore

opensearchpy/_async/client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class AsyncOpenSearch(Client):
8484
# create connection to localhost using the ThriftConnection
8585
client = OpenSearch(connection_class=ThriftConnection)
8686
87-
If you want to turn on :ref:`sniffing` you have several options (described
87+
If you want to turn on sniffing you have several options (described
8888
in :class:`~opensearchpy.Transport`)::
8989
9090
# create connection that will automatically inspect the cluster to get

opensearchpy/_async/client/_patch.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ async def list_all_point_in_time(
2323
2424
.. warning::
2525
26-
This API will be removed in a future version
27-
Use 'get_all_pits' API instead.
26+
This API will be removed in a future version.
27+
Use 'get_all_pits' API instead.
2828
2929
"""
3030
warnings.warn(
@@ -60,8 +60,8 @@ async def create_point_in_time(
6060
6161
.. warning::
6262
63-
This API will be removed in a future version
64-
Use 'create_pit' API instead.
63+
This API will be removed in a future version.
64+
Use 'create_pit' API instead.
6565
6666
"""
6767
warnings.warn(
@@ -89,8 +89,8 @@ async def delete_point_in_time(
8989
9090
.. warning::
9191
92-
This API will be removed in a future version
93-
Use 'delete_all_pits' or 'delete_pit' API instead.
92+
This API will be removed in a future version.
93+
Use 'delete_all_pits' or 'delete_pit' API instead.
9494
9595
"""
9696
warnings.warn(
@@ -111,8 +111,8 @@ async def health_check(self: Any, params: Any = None, headers: Any = None) -> An
111111
112112
.. warning::
113113
114-
This API will be removed in a future version
115-
Use 'health' API instead.
114+
This API will be removed in a future version.
115+
Use 'health' API instead.
116116
117117
"""
118118
warnings.warn(
@@ -132,8 +132,8 @@ async def update_audit_config(
132132
133133
.. warning::
134134
135-
This API will be removed in a future version
136-
Use 'update_audit_configuration' API instead.
135+
This API will be removed in a future version.
136+
Use 'update_audit_configuration' API instead.
137137
138138
"""
139139
warnings.warn(

opensearchpy/client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class OpenSearch(Client):
8484
# create connection to localhost using the ThriftConnection
8585
client = OpenSearch(connection_class=ThriftConnection)
8686
87-
If you want to turn on :ref:`sniffing` you have several options (described
87+
If you want to turn on sniffing you have several options (described
8888
in :class:`~opensearchpy.Transport`)::
8989
9090
# create connection that will automatically inspect the cluster to get

opensearchpy/client/_patch.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def list_all_point_in_time(self: Any, params: Any = None, headers: Any = None) -
2121
2222
.. warning::
2323
24-
This API will be removed in a future version
25-
Use 'get_all_pits' API instead.
24+
This API will be removed in a future version.
25+
Use 'get_all_pits' API instead.
2626
2727
"""
2828
warnings.warn(
@@ -58,8 +58,8 @@ def create_point_in_time(
5858
5959
.. warning::
6060
61-
This API will be removed in a future version
62-
Use 'create_pit' API instead.
61+
This API will be removed in a future version.
62+
Use 'create_pit' API instead.
6363
6464
"""
6565
warnings.warn(
@@ -87,8 +87,8 @@ def delete_point_in_time(
8787
8888
.. warning::
8989
90-
This API will be removed in a future version
91-
Use 'delete_all_pits' or 'delete_pit' API instead.
90+
This API will be removed in a future version.
91+
Use 'delete_all_pits' or 'delete_pit' API instead.
9292
9393
"""
9494
warnings.warn(
@@ -109,8 +109,8 @@ def health_check(self: Any, params: Any = None, headers: Any = None) -> Any:
109109
110110
.. warning::
111111
112-
This API will be removed in a future version
113-
Use 'health' API instead.
112+
This API will be removed in a future version.
113+
Use 'health' API instead.
114114
115115
"""
116116
warnings.warn(
@@ -130,8 +130,8 @@ def update_audit_config(
130130
131131
.. warning::
132132
133-
This API will be removed in a future version
134-
Use 'update_audit_configuration' API instead.
133+
This API will be removed in a future version.
134+
Use 'update_audit_configuration' API instead.
135135
136136
"""
137137
warnings.warn(

0 commit comments

Comments
 (0)