From 420723ca5436cf069ae46444713947e6460e84ee Mon Sep 17 00:00:00 2001 From: untergeek Date: Tue, 13 Aug 2024 21:05:48 -0600 Subject: [PATCH] Release prep for 8.15.0 --- cli.py | 10 ++++++---- docs/Changelog.rst | 9 +++++++++ docs/conf.py | 2 +- docs/requirements.txt | 2 +- pyproject.toml | 2 +- run_script.py | 19 ++++++++----------- src/es_client/__init__.py | 2 +- src/local_test.py | 20 ++++++++------------ 8 files changed, 35 insertions(+), 31 deletions(-) diff --git a/cli.py b/cli.py index 96884b2..f50d8a0 100644 --- a/cli.py +++ b/cli.py @@ -1,5 +1,6 @@ """CLI Wrapper used by cli.py""" -import click + +from click import echo from es_client.cli_example import run if __name__ == '__main__': @@ -7,7 +8,8 @@ # This is because click uses decorators, and pylint doesn't catch that # pylint: disable=no-value-for-parameter run() - except RuntimeError as e: + except RuntimeError as err: import sys - print('{0}'.format(e)) - sys.exit(1) \ No newline at end of file + + echo(f'{err}') + sys.exit(1) diff --git a/docs/Changelog.rst b/docs/Changelog.rst index 44b233d..a3cc3e5 100644 --- a/docs/Changelog.rst +++ b/docs/Changelog.rst @@ -3,6 +3,15 @@ Changelog ========= +8.15.0 (13 August 2024) +----------------------- + +**Changes** + + * Python module version bumps: + * ``elasticsearch8==8.15.0`` + * Make execution scripts more consistent and PEP compliant. + 8.14.2 (6 August 2024) ---------------------- diff --git a/docs/conf.py b/docs/conf.py index 913c3ce..bb8b7dd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,7 +66,7 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3.12", None), - "elasticsearch8": ("https://elasticsearch-py.readthedocs.io/en/v8.14.0", None), + "elasticsearch8": ("https://elasticsearch-py.readthedocs.io/en/v8.15.0", None), "elastic-transport": ( "https://elastic-transport-python.readthedocs.io/en/stable", None, diff --git a/docs/requirements.txt b/docs/requirements.txt index c965781..029ac43 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -elasticsearch8==8.14.0 +elasticsearch8==8.15.0 voluptuous>=0.14.2 pyyaml==6.0.1 pint>=0.19.2 diff --git a/pyproject.toml b/pyproject.toml index 53a7690..2b0679c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ keywords = [ 'command-line' ] dependencies = [ - 'elasticsearch8==8.14.0', + 'elasticsearch8==8.15.0', 'ecs-logging==2.2.0', 'dotmap==1.3.30', 'click==8.1.7', diff --git a/run_script.py b/run_script.py index 6599821..a59e33f 100755 --- a/run_script.py +++ b/run_script.py @@ -1,19 +1,16 @@ #!/usr/bin/env python -# pylint: disable=broad-except, no-value-for-parameter -""" -Wrapper for running a script from source. -""" -import sys -import click +"""Script to run locally""" + +from click import echo from es_client.cli_example import run if __name__ == '__main__': try: + # This is because click uses decorators, and pylint doesn't catch that + # pylint: disable=no-value-for-parameter run() except RuntimeError as err: - click.echo(f'{err}') + import sys + + echo(f'{err}') sys.exit(1) - except Exception as err: - if 'ASCII' in str(err): - click.echo(f'{err}') - click.echo(__doc__) diff --git a/src/es_client/__init__.py b/src/es_client/__init__.py index 36e58c3..9fffa97 100644 --- a/src/es_client/__init__.py +++ b/src/es_client/__init__.py @@ -3,4 +3,4 @@ from .builder import Builder __all__ = ["Builder"] -__version__ = "8.14.2" +__version__ = "8.15.0" diff --git a/src/local_test.py b/src/local_test.py index 3968860..a59e33f 100755 --- a/src/local_test.py +++ b/src/local_test.py @@ -1,20 +1,16 @@ #!/usr/bin/env python +"""Script to run locally""" -# pylint: disable=broad-except, no-value-for-parameter -""" -Wrapper for running a script from source. -""" -import sys -import click +from click import echo from es_client.cli_example import run -if __name__ == "__main__": +if __name__ == '__main__': try: + # This is because click uses decorators, and pylint doesn't catch that + # pylint: disable=no-value-for-parameter run() except RuntimeError as err: - click.echo(f"{err}") + import sys + + echo(f'{err}') sys.exit(1) - except Exception as err: - if "ASCII" in str(err): - click.echo(f"{err}") - click.echo(__doc__)