Skip to content

Commit

Permalink
Link to the correct ES Python client docs. (#1554)
Browse files Browse the repository at this point in the history
We'll now programmatically set the ES client version in the docs build.
  • Loading branch information
michaelbaamonde authored Aug 17, 2022
1 parent 5f9ab22 commit 8ba7980
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/command_line_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ By default, the command line reporter will print the results only on standard ou

With this option you can customize Rally's internal Elasticsearch client.

It accepts a list of comma-separated key-value pairs. The key-value pairs have to be delimited by a colon. These options are passed directly to the Elasticsearch Python client API. See `their documentation on a list of supported options <http://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch>`_.
It accepts a list of comma-separated key-value pairs. The key-value pairs have to be delimited by a colon. These options are passed directly to the Elasticsearch Python client API. See `their documentation on a list of supported options <https://elasticsearch-py.readthedocs.io/en/v{ES_CLIENT_VER}/api.html#elasticsearch>`_.

We support the following data types:

Expand Down
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@ def read_min_python_version():
raise ConfigError(f"Failed building docs as required key [{e}] couldn't be found in the file [{CI_VARS}].")


def get_es_client_version():
import elasticsearch

return ".".join(map(str, elasticsearch.__version__))


GLOBAL_SUBSTITUTIONS = {
"{MIN_PY_VER}": read_min_python_version(),
"{ES_CLIENT_VER}": get_es_client_version(),
}


Expand All @@ -82,6 +89,7 @@ def read_min_es_version():
.. |year| replace:: {year}
.. |MIN_PY_VER| replace:: {read_min_python_version()}
.. |min_es_version| replace:: {read_min_es_version()}
.. |ES_CLIENT_VER| replace:: {get_es_client_version()}
"""

# General information about the project.
Expand Down

0 comments on commit 8ba7980

Please sign in to comment.