From bca5bdebdd013474259d8cc113547a424e154f73 Mon Sep 17 00:00:00 2001 From: Stijn Kas <78410144+StijnKas@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:59:01 +0100 Subject: [PATCH] (patch): removed Plotly prerelease, added timestamp, increased DX client timeout (#301) * stick to GA version of plotly for now * Add another timestamp format * Increase timeout for infinity client * bump version for patch release --- pyproject.toml | 2 +- python/pdstools/__init__.py | 2 +- python/pdstools/infinity/internal/_base_client.py | 4 ++-- python/pdstools/utils/cdh_utils.py | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 00f7d9d3..88a8519c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = ['polars==1.16', 'typing_extensions'] version = {attr="pdstools.__version__"} [project.optional-dependencies] -adm = ['plotly[express]>=6.0.0rc0', 'requests'] +adm = ['plotly', 'requests'] pega_io = ['aioboto3', 'polars_hash'] api = ['httpx', 'pydantic', 'anyio'] healthcheck = ['pdstools[adm]', 'great_tables>=0.13', 'quarto', 'papermill', 'xlsxwriter>=3.0', 'pydot'] diff --git a/python/pdstools/__init__.py b/python/pdstools/__init__.py index 7d1a9cbd..dadd39e1 100644 --- a/python/pdstools/__init__.py +++ b/python/pdstools/__init__.py @@ -1,6 +1,6 @@ """Pega Data Scientist Tools Python library""" -__version__ = "4.0.0" +__version__ = "4.0.1" from pathlib import Path diff --git a/python/pdstools/infinity/internal/_base_client.py b/python/pdstools/infinity/internal/_base_client.py index 47e3aa25..bb5c066e 100644 --- a/python/pdstools/infinity/internal/_base_client.py +++ b/python/pdstools/infinity/internal/_base_client.py @@ -71,7 +71,7 @@ def __init__( auth: Union[httpx.Auth, PegaOAuth], verify: bool = False, pega_version: Union[str, None] = None, - timeout: float = 20, + timeout: float = 90, ): self._base_url = self._enforce_trailing_slash(httpx.URL(base_url)) self.auth = auth @@ -178,7 +178,7 @@ def __init__( auth: Union[httpx.Auth, PegaOAuth], verify: bool = False, pega_version: Union[str, None] = None, - timeout: float = 20, + timeout: float = 90, ): super().__init__( base_url=base_url, auth=auth, verify=verify, pega_version=pega_version diff --git a/python/pdstools/utils/cdh_utils.py b/python/pdstools/utils/cdh_utils.py index 86730a84..2e5a1088 100644 --- a/python/pdstools/utils/cdh_utils.py +++ b/python/pdstools/utils/cdh_utils.py @@ -258,6 +258,9 @@ def parse_pega_date_time_formats( pl.col(timestamp_col).str.to_datetime( "%d-%b-%y", strict=False, ambiguous="null" ), + pl.col(timestamp_col).str.to_datetime( + "%d%b%Y:%H:%M:%S", strict=False, ambiguous="null" + ), pl.col(timestamp_col).str.to_datetime( timestamp_fmt or "%Y", strict=False, ambiguous="null" ), @@ -562,7 +565,7 @@ def _capitalize(fields: Union[str, Iterable[str]]) -> List[str]: "Offline", "Update", "Strategy", - "ModelTechnique" + "ModelTechnique", ] if not isinstance(fields, list): fields = [fields]