From eb14a08123bb81f43e863b387846b072d672c781 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 27 Apr 2022 10:01:37 +0200 Subject: [PATCH 1/3] chore: rename InvocableScripts to InvokableScripts for more info see https://github.com/influxdata/openapi/pull/317 --- CHANGELOG.md | 4 +- docs/api.rst | 4 +- examples/README.md | 2 +- ...ocable_scripts.py => invokable_scripts.py} | 16 +++---- influxdb_client/__init__.py | 4 +- influxdb_client/client/__init__.py | 2 +- influxdb_client/client/flux_csv_parser.py | 4 +- influxdb_client/client/influxdb_client.py | 10 ++--- ...cripts_api.py => invokable_scripts_api.py} | 42 +++++++++---------- influxdb_client/client/write/__init__.py | 2 +- influxdb_client/service/__init__.py | 2 +- ...ervice.py => invokable_scripts_service.py} | 16 +++---- tests/__init__.py | 2 +- 13 files changed, 55 insertions(+), 55 deletions(-) rename examples/{invocable_scripts.py => invokable_scripts.py} (82%) rename influxdb_client/client/{invocable_scripts_api.py => invokable_scripts_api.py} (81%) rename influxdb_client/service/{invocable_scripts_service.py => invokable_scripts_service.py} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa64a0b1..8a9a867a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ ### Features 1. [#412](https://github.com/influxdata/influxdb-client-python/pull/412): `DeleteApi` uses default value from `InfluxDBClient.org` if an `org` parameter is not specified 1. [#405](https://github.com/influxdata/influxdb-client-python/pull/405): Add `InfluxLoggingHandler`. A handler to use the client in native python logging. -1. [#404](https://github.com/influxdata/influxdb-client-python/pull/404): Add `InvocableScriptsApi` to create, update, list, delete and invoke scripts by seamless way +1. [#404](https://github.com/influxdata/influxdb-client-python/pull/404): Add `InvokableScriptsApi` to create, update, list, delete and invoke scripts by seamless way ### Bug Fixes 1. [#419](https://github.com/influxdata/influxdb-client-python/pull/419): Use `allowed_methods` to clear deprecation warning [urllib3] @@ -103,7 +103,7 @@ This release introduces a support for new version of InfluxDB OSS API definition 1. [#352](https://github.com/influxdata/influxdb-client-python/pull/352): Add `PingService` to check status of OSS and Cloud instance ### Documentation -1. [#344](https://github.com/influxdata/influxdb-client-python/pull/344): Add an example How to use Invocable scripts Cloud API +1. [#344](https://github.com/influxdata/influxdb-client-python/pull/344): Add an example How to use Invokable scripts Cloud API ## 1.22.0 [2021-10-22] diff --git a/docs/api.rst b/docs/api.rst index 02c100f1..8271c816 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -68,9 +68,9 @@ TasksApi .. autoclass:: influxdb_client.domain.Task :members: -InvocableScriptsApi +InvokableScriptsApi """"""""""""""""""" -.. autoclass:: influxdb_client.InvocableScriptsApi +.. autoclass:: influxdb_client.InvokableScriptsApi :members: .. autoclass:: influxdb_client.domain.Script diff --git a/examples/README.md b/examples/README.md index 477dc005..f680d9f3 100644 --- a/examples/README.md +++ b/examples/README.md @@ -28,7 +28,7 @@ - [influx_cloud.py](influx_cloud.py) - How to connect to InfluxDB 2 Cloud - [influxdb_18_example.py](influxdb_18_example.py) - How to connect to InfluxDB 1.8 - [nanosecond_precision.py](nanosecond_precision.py) - How to use nanoseconds precision -- [invocable_scripts.py](invocable_scripts.py) - How to use Invocable scripts Cloud API to create custom endpoints that query data +- [invokable_scripts.py](invokable_scripts.py) - How to use Invokable scripts Cloud API to create custom endpoints that query data ## Asynchronous - [asynchronous.py](asynchronous.py) - How to use Asyncio with InfluxDB client diff --git a/examples/invocable_scripts.py b/examples/invokable_scripts.py similarity index 82% rename from examples/invocable_scripts.py rename to examples/invokable_scripts.py index 2be97228..4648c2c6 100644 --- a/examples/invocable_scripts.py +++ b/examples/invokable_scripts.py @@ -1,5 +1,5 @@ """ -How to use Invocable scripts Cloud API to create custom endpoints that query data +How to use Invokable scripts Cloud API to create custom endpoints that query data """ import datetime @@ -26,10 +26,10 @@ _point2 = Point("my_measurement").tag("location", "New York").field("temperature", 24.3) client.write_api(write_options=SYNCHRONOUS).write(bucket=bucket_name, record=[_point1, _point2]) - scripts_api = client.invocable_scripts_api() + scripts_api = client.invokable_scripts_api() """ - Create Invocable Script + Create Invokable Script """ print(f"------- Create -------\n") create_request = ScriptCreateRequest(name=f"my_script_{uniqueId}", @@ -41,7 +41,7 @@ print(created_script) """ - Update Invocable Script + Update Invokable Script """ print(f"------- Update -------\n") update_request = ScriptUpdateRequest(description="my updated description") @@ -53,23 +53,23 @@ """ # FluxRecords print(f"\n------- Invoke to FluxRecords -------\n") - tables = scripts_api.invoke_scripts(script_id=created_script.id, params={"bucket_name": bucket_name}) + tables = scripts_api.invoke_script(script_id=created_script.id, params={"bucket_name": bucket_name}) for table in tables: for record in table.records: print(f'FluxRecord {record}') # Pandas DataFrame print(f"\n------- Invoke to PandasData Frame -------\n") - data_frame = scripts_api.invoke_scripts_data_frame(script_id=created_script.id, params={"bucket_name": bucket_name}) + data_frame = scripts_api.invoke_script_data_frame(script_id=created_script.id, params={"bucket_name": bucket_name}) print(data_frame.to_string()) # CSV print(f"\n------- Invoke to CSV-------\n") - csv_lines = scripts_api.invoke_scripts_csv(script_id=created_script.id, params={"bucket_name": bucket_name}) + csv_lines = scripts_api.invoke_script_csv(script_id=created_script.id, params={"bucket_name": bucket_name}) for csv_line in csv_lines: if not len(csv_line) == 0: print(f'CSV row: {csv_line}') # RAW print(f"\n------- Invoke to Raw-------\n") - raw = scripts_api.invoke_scripts_raw(script_id=created_script.id, params={"bucket_name": bucket_name}) + raw = scripts_api.invoke_script_raw(script_id=created_script.id, params={"bucket_name": bucket_name}) print(f'RAW output:\n {raw}') """ diff --git a/influxdb_client/__init__.py b/influxdb_client/__init__.py index 9e926915..a3a89037 100644 --- a/influxdb_client/__init__.py +++ b/influxdb_client/__init__.py @@ -25,7 +25,7 @@ from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService -from influxdb_client.service.invocable_scripts_service import InvocableScriptsService +from influxdb_client.service.invokable_scripts_service import InvokableScriptsService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService from influxdb_client.service.metrics_service import MetricsService @@ -372,7 +372,7 @@ from influxdb_client.client.authorizations_api import AuthorizationsApi from influxdb_client.client.bucket_api import BucketsApi from influxdb_client.client.delete_api import DeleteApi -from influxdb_client.client.invocable_scripts_api import InvocableScriptsApi +from influxdb_client.client.invokable_scripts_api import InvokableScriptsApi from influxdb_client.client.labels_api import LabelsApi from influxdb_client.client.organizations_api import OrganizationsApi from influxdb_client.client.query_api import QueryApi diff --git a/influxdb_client/client/__init__.py b/influxdb_client/client/__init__.py index 77c51a11..06bcdf84 100644 --- a/influxdb_client/client/__init__.py +++ b/influxdb_client/client/__init__.py @@ -23,7 +23,7 @@ from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService -from influxdb_client.service.invocable_scripts_service import InvocableScriptsService +from influxdb_client.service.invokable_scripts_service import InvokableScriptsService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService from influxdb_client.service.metrics_service import MetricsService diff --git a/influxdb_client/client/flux_csv_parser.py b/influxdb_client/client/flux_csv_parser.py index 8f44cb38..1dfde226 100644 --- a/influxdb_client/client/flux_csv_parser.py +++ b/influxdb_client/client/flux_csv_parser.py @@ -44,7 +44,7 @@ class FluxResponseMetadataMode(Enum): """The configuration for expected amount of metadata response from InfluxDB.""" full = 1 - # useful for Invocable scripts + # useful for Invokable scripts only_names = 2 @@ -190,7 +190,7 @@ def _parse_flux_response_row(self, metadata, csv): else: # parse column names if metadata.start_new_table: - # Invocable scripts doesn't supports dialect => all columns are string + # Invokable scripts doesn't supports dialect => all columns are string if not metadata.table.columns and \ self._response_metadata_mode is FluxResponseMetadataMode.only_names: self.add_data_types(metadata.table, list(map(lambda column: 'string', csv))) diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index 413bcb21..82d5eefd 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -6,7 +6,7 @@ import warnings from influxdb_client import HealthCheck, HealthService, Ready, ReadyService, PingService, \ - InvocableScriptsApi + InvokableScriptsApi from influxdb_client.client._base import _BaseClient from influxdb_client.client.authorizations_api import AuthorizationsApi from influxdb_client.client.bucket_api import BucketsApi @@ -245,13 +245,13 @@ def query_api(self, query_options: QueryOptions = QueryOptions()) -> QueryApi: """ return QueryApi(self, query_options) - def invocable_scripts_api(self) -> InvocableScriptsApi: + def invokable_scripts_api(self) -> InvokableScriptsApi: """ - Create an InvocableScripts API instance. + Create an InvokableScripts API instance. - :return: InvocableScripts API instance + :return: InvokableScripts API instance """ - return InvocableScriptsApi(self) + return InvokableScriptsApi(self) def close(self): """Shutdown the client.""" diff --git a/influxdb_client/client/invocable_scripts_api.py b/influxdb_client/client/invokable_scripts_api.py similarity index 81% rename from influxdb_client/client/invocable_scripts_api.py rename to influxdb_client/client/invokable_scripts_api.py index ad130e59..c292b750 100644 --- a/influxdb_client/client/invocable_scripts_api.py +++ b/influxdb_client/client/invokable_scripts_api.py @@ -7,20 +7,20 @@ from typing import List, Iterator, Generator, Any -from influxdb_client import Script, InvocableScriptsService, ScriptCreateRequest, ScriptUpdateRequest, \ +from influxdb_client import Script, InvokableScriptsService, ScriptCreateRequest, ScriptUpdateRequest, \ ScriptInvocationParams from influxdb_client.client._base import _BaseQueryApi from influxdb_client.client.flux_csv_parser import FluxResponseMetadataMode from influxdb_client.client.flux_table import FluxTable, FluxRecord -class InvocableScriptsApi(_BaseQueryApi): +class InvokableScriptsApi(_BaseQueryApi): """Use API invokable scripts to create custom InfluxDB API endpoints that query, process, and shape data.""" def __init__(self, influxdb_client): """Initialize defaults.""" self._influxdb_client = influxdb_client - self._invocable_scripts_service = InvocableScriptsService(influxdb_client.api_client) + self._invokable_scripts_service = InvokableScriptsService(influxdb_client.api_client) def create_script(self, create_request: ScriptCreateRequest) -> Script: """Create a script. @@ -28,7 +28,7 @@ def create_script(self, create_request: ScriptCreateRequest) -> Script: :param ScriptCreateRequest create_request: The script to create. (required) :return: The created script. """ - return self._invocable_scripts_service.post_scripts(script_create_request=create_request) + return self._invokable_scripts_service.post_scripts(script_create_request=create_request) def update_script(self, script_id: str, update_request: ScriptUpdateRequest) -> Script: """Update a script. @@ -37,7 +37,7 @@ def update_script(self, script_id: str, update_request: ScriptUpdateRequest) -> :param ScriptUpdateRequest update_request: Script updates to apply (required) :return: The updated. """ - return self._invocable_scripts_service.patch_scripts_id(script_id=script_id, + return self._invokable_scripts_service.patch_scripts_id(script_id=script_id, script_update_request=update_request) def delete_script(self, script_id: str) -> None: @@ -46,7 +46,7 @@ def delete_script(self, script_id: str) -> None: :param str script_id: The ID of the script to delete. (required) :return: None """ - self._invocable_scripts_service.delete_scripts_id(script_id=script_id) + self._invokable_scripts_service.delete_scripts_id(script_id=script_id) def find_scripts(self, **kwargs): """List scripts. @@ -56,9 +56,9 @@ def find_scripts(self, **kwargs): :return: List of scripts. :rtype: list[Script] """ - return self._invocable_scripts_service.get_scripts(**kwargs).scripts + return self._invokable_scripts_service.get_scripts(**kwargs).scripts - def invoke_scripts(self, script_id: str, params: dict = None) -> List['FluxTable']: + def invoke_script(self, script_id: str, params: dict = None) -> List['FluxTable']: """ Invoke synchronously a script and return result as a List['FluxTable']. @@ -69,7 +69,7 @@ def invoke_scripts(self, script_id: str, params: dict = None) -> List['FluxTable :return: List of FluxTable. :rtype: list[FluxTable] """ - response = self._invocable_scripts_service \ + response = self._invokable_scripts_service \ .post_scripts_id_invoke(script_id=script_id, script_invocation_params=ScriptInvocationParams(params=params), async_req=False, @@ -77,7 +77,7 @@ def invoke_scripts(self, script_id: str, params: dict = None) -> List['FluxTable _return_http_data_only=False) return self._to_tables(response, query_options=None, response_metadata_mode=FluxResponseMetadataMode.only_names) - def invoke_scripts_stream(self, script_id: str, params: dict = None) -> Generator['FluxRecord', Any, None]: + def invoke_script_stream(self, script_id: str, params: dict = None) -> Generator['FluxRecord', Any, None]: """ Invoke synchronously a script and return result as a Generator['FluxRecord']. @@ -88,7 +88,7 @@ def invoke_scripts_stream(self, script_id: str, params: dict = None) -> Generato :return: Stream of FluxRecord. :rtype: Generator['FluxRecord'] """ - response = self._invocable_scripts_service \ + response = self._invokable_scripts_service \ .post_scripts_id_invoke(script_id=script_id, script_invocation_params=ScriptInvocationParams(params=params), async_req=False, @@ -98,7 +98,7 @@ def invoke_scripts_stream(self, script_id: str, params: dict = None) -> Generato return self._to_flux_record_stream(response, query_options=None, response_metadata_mode=FluxResponseMetadataMode.only_names) - def invoke_scripts_data_frame(self, script_id: str, params: dict = None, data_frame_index: List[str] = None): + def invoke_script_data_frame(self, script_id: str, params: dict = None, data_frame_index: List[str] = None): """ Invoke synchronously a script and return Pandas DataFrame. @@ -112,12 +112,12 @@ def invoke_scripts_data_frame(self, script_id: str, params: dict = None, data_fr :param params: bind parameters :return: Pandas DataFrame. """ - _generator = self.invoke_scripts_data_frame_stream(script_id=script_id, - params=params, - data_frame_index=data_frame_index) + _generator = self.invoke_script_data_frame_stream(script_id=script_id, + params=params, + data_frame_index=data_frame_index) return self._to_data_frames(_generator) - def invoke_scripts_data_frame_stream(self, script_id: str, params: dict = None, data_frame_index: List[str] = None): + def invoke_script_data_frame_stream(self, script_id: str, params: dict = None, data_frame_index: List[str] = None): """ Invoke synchronously a script and return stream of Pandas DataFrame as a Generator['pd.DataFrame']. @@ -129,7 +129,7 @@ def invoke_scripts_data_frame_stream(self, script_id: str, params: dict = None, :return: Stream of Pandas DataFrames. :rtype: Generator['pd.DataFrame'] """ - response = self._invocable_scripts_service \ + response = self._invokable_scripts_service \ .post_scripts_id_invoke(script_id=script_id, script_invocation_params=ScriptInvocationParams(params=params), async_req=False, @@ -139,7 +139,7 @@ def invoke_scripts_data_frame_stream(self, script_id: str, params: dict = None, return self._to_data_frame_stream(data_frame_index, response, query_options=None, response_metadata_mode=FluxResponseMetadataMode.only_names) - def invoke_scripts_csv(self, script_id: str, params: dict = None) -> Iterator[List[str]]: + def invoke_script_csv(self, script_id: str, params: dict = None) -> Iterator[List[str]]: """ Invoke synchronously a script and return result as a CSV iterator. @@ -150,7 +150,7 @@ def invoke_scripts_csv(self, script_id: str, params: dict = None) -> Iterator[Li :return: The returned object is an iterator. Each iteration returns a row of the CSV file (which can span multiple input lines). """ - response = self._invocable_scripts_service \ + response = self._invokable_scripts_service \ .post_scripts_id_invoke(script_id=script_id, script_invocation_params=ScriptInvocationParams(params=params), async_req=False, @@ -158,7 +158,7 @@ def invoke_scripts_csv(self, script_id: str, params: dict = None) -> Iterator[Li return self._to_csv(response) - def invoke_scripts_raw(self, script_id: str, params: dict = None) -> Iterator[List[str]]: + def invoke_script_raw(self, script_id: str, params: dict = None) -> Iterator[List[str]]: """ Invoke synchronously a script and return result as raw unprocessed result as a str. @@ -168,7 +168,7 @@ def invoke_scripts_raw(self, script_id: str, params: dict = None) -> Iterator[Li :param params: bind parameters :return: Result as a str. """ - response = self._invocable_scripts_service \ + response = self._invokable_scripts_service \ .post_scripts_id_invoke(script_id=script_id, script_invocation_params=ScriptInvocationParams(params=params), async_req=False, diff --git a/influxdb_client/client/write/__init__.py b/influxdb_client/client/write/__init__.py index 77c51a11..06bcdf84 100644 --- a/influxdb_client/client/write/__init__.py +++ b/influxdb_client/client/write/__init__.py @@ -23,7 +23,7 @@ from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService -from influxdb_client.service.invocable_scripts_service import InvocableScriptsService +from influxdb_client.service.invokable_scripts_service import InvokableScriptsService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService from influxdb_client.service.metrics_service import MetricsService diff --git a/influxdb_client/service/__init__.py b/influxdb_client/service/__init__.py index 77c51a11..06bcdf84 100644 --- a/influxdb_client/service/__init__.py +++ b/influxdb_client/service/__init__.py @@ -23,7 +23,7 @@ from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService -from influxdb_client.service.invocable_scripts_service import InvocableScriptsService +from influxdb_client.service.invokable_scripts_service import InvokableScriptsService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService from influxdb_client.service.metrics_service import MetricsService diff --git a/influxdb_client/service/invocable_scripts_service.py b/influxdb_client/service/invokable_scripts_service.py similarity index 98% rename from influxdb_client/service/invocable_scripts_service.py rename to influxdb_client/service/invokable_scripts_service.py index d11da1af..ceefa563 100644 --- a/influxdb_client/service/invocable_scripts_service.py +++ b/influxdb_client/service/invokable_scripts_service.py @@ -17,7 +17,7 @@ from influxdb_client.service._base_service import _BaseService -class InvocableScriptsService(_BaseService): +class InvokableScriptsService(_BaseService): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -26,7 +26,7 @@ class InvocableScriptsService(_BaseService): """ def __init__(self, api_client=None): # noqa: E501,D401,D403 - """InvocableScriptsService - a operation defined in OpenAPI.""" + """InvokableScriptsService - a operation defined in OpenAPI.""" if api_client is None: raise ValueError("Invalid value for `api_client`, must be defined.") self.api_client = api_client @@ -260,7 +260,7 @@ def _get_scripts_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a script. - Uses script ID to retrieve details of an invocable script. + Uses script ID to retrieve details of an invokable script. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_scripts_id(script_id, async_req=True) @@ -282,7 +282,7 @@ def get_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a script. - Uses script ID to retrieve details of an invocable script. + Uses script ID to retrieve details of an invokable script. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_scripts_id_with_http_info(script_id, async_req=True) @@ -317,7 +317,7 @@ def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401 async def get_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a script. - Uses script ID to retrieve details of an invocable script. + Uses script ID to retrieve details of an invokable script. This method makes an asynchronous HTTP request. :param async_req bool @@ -374,7 +374,7 @@ def _get_scripts_id_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 def patch_scripts_id(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 """Update a script. - Updates properties (`name`, `description`, and `script`) of an invocable script. + Updates properties (`name`, `description`, and `script`) of an invokable script. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_scripts_id(script_id, script_update_request, async_req=True) @@ -397,7 +397,7 @@ def patch_scripts_id(self, script_id, script_update_request, **kwargs): # noqa: def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 """Update a script. - Updates properties (`name`, `description`, and `script`) of an invocable script. + Updates properties (`name`, `description`, and `script`) of an invokable script. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_scripts_id_with_http_info(script_id, script_update_request, async_req=True) @@ -433,7 +433,7 @@ def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kw async def patch_scripts_id_async(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 """Update a script. - Updates properties (`name`, `description`, and `script`) of an invocable script. + Updates properties (`name`, `description`, and `script`) of an invokable script. This method makes an asynchronous HTTP request. :param async_req bool diff --git a/tests/__init__.py b/tests/__init__.py index 77c51a11..06bcdf84 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -23,7 +23,7 @@ from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService -from influxdb_client.service.invocable_scripts_service import InvocableScriptsService +from influxdb_client.service.invokable_scripts_service import InvokableScriptsService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService from influxdb_client.service.metrics_service import MetricsService From 051ec8db8404e870e6668b8058e677992190d411 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 27 Apr 2022 10:03:51 +0200 Subject: [PATCH 2/3] docs: update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a9a867a..c7d38415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 1.29.0 [unreleased] +### Breaking Changes + 1. [#433](https://github.com/influxdata/influxdb-client-python/pull/433): Rename `InvocableScripts` to `InvokableScripts` + ## 1.28.0 [2022-04-19] ### Features From 5622e66a08244788bdee08d4186f162f7f508d2c Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 27 Apr 2022 10:45:22 +0200 Subject: [PATCH 3/3] fix: nightly build test --- tests/test_WriteApi.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/test_WriteApi.py b/tests/test_WriteApi.py index b40d7963..474bf394 100644 --- a/tests/test_WriteApi.py +++ b/tests/test_WriteApi.py @@ -341,16 +341,6 @@ def test_use_default_org(self): def test_write_empty_data(self): bucket = self.create_test_bucket() - from distutils.version import LooseVersion - version = self.client.version().strip('v') - if 'nightly' not in version and LooseVersion(version) <= LooseVersion("2.0.8"): - with self.assertRaises(ApiException) as cm: - self.write_client.write(bucket.name, record="") - exception = cm.exception - - self.assertEqual(400, exception.status) - self.assertEqual("Bad Request", exception.reason) - result = self.query_api.query( "from(bucket:\"" + bucket.name + "\") |> range(start: 1970-01-01T00:00:00.000000001Z) |> last()", self.org)