upgrade package dopt-basics

This commit is contained in:
Florian Förster 2025-03-14 12:24:38 +01:00
parent 183c72c96d
commit fc89c746c8
4 changed files with 7 additions and 17 deletions

8
pdm.lock generated
View File

@ -5,7 +5,7 @@
groups = ["default", "dev", "lint", "nb", "tests"] groups = ["default", "dev", "lint", "nb", "tests"]
strategy = ["inherit_metadata"] strategy = ["inherit_metadata"]
lock_version = "4.5.0" lock_version = "4.5.0"
content_hash = "sha256:750f84cb8e60872ca2b3dc7adf60a9c678e9928a0d6d836d054e2f7b0f0aa902" content_hash = "sha256:b76828b29a1da485f743d5dca2c4233b4ce9dfc613ec0a0c97b3e6cc367ae57d"
[[metadata.targets]] [[metadata.targets]]
requires_python = ">=3.11" requires_python = ">=3.11"
@ -579,7 +579,7 @@ files = [
[[package]] [[package]]
name = "dopt-basics" name = "dopt-basics"
version = "0.1.0" version = "0.1.1"
requires_python = ">=3.11" requires_python = ">=3.11"
summary = "basic cross-project tools for Python-based d-opt projects" summary = "basic cross-project tools for Python-based d-opt projects"
groups = ["default"] groups = ["default"]
@ -587,8 +587,8 @@ dependencies = [
"tzdata>=2025.1", "tzdata>=2025.1",
] ]
files = [ files = [
{file = "dopt_basics-0.1.0-py3-none-any.whl", hash = "sha256:edf1105aa2db6ab854f31fc652996f1ee2f61a4dfb196aa61318a70678601c22"}, {file = "dopt_basics-0.1.1-py3-none-any.whl", hash = "sha256:1b868e09e9eae3c33f0f871d492ae165b9104eff34f7689f924b30e8b589a6d6"},
{file = "dopt_basics-0.1.0.tar.gz", hash = "sha256:8bb885109fe3b16d7c6a2264ac361eca0e31ab73f2edbae28a29d81a0cec510f"}, {file = "dopt_basics-0.1.1.tar.gz", hash = "sha256:df5e6acc2085d3ed5fb31629f8cdf44df8ef2f5342df899be1325f1e9f5dec24"},
] ]
[[package]] [[package]]

View File

@ -5,7 +5,7 @@ description = "prognosis module"
authors = [ authors = [
{name = "Florian Förster", email = "f.foerster@d-opt.com"}, {name = "Florian Förster", email = "f.foerster@d-opt.com"},
] ]
dependencies = ["scikit-learn>=1.6.1", "pandas>=2.2.3", "xgboost>=2.1.4", "joblib>=1.4.2", "typing-extensions>=4.12.2", "requests>=2.32.3", "pydantic>=2.10.6", "dopt-basics>=0.1.0"] dependencies = ["scikit-learn>=1.6.1", "pandas>=2.2.3", "xgboost>=2.1.4", "joblib>=1.4.2", "typing-extensions>=4.12.2", "requests>=2.32.3", "pydantic>=2.10.6", "dopt-basics>=0.1.1"]
requires-python = ">=3.11" requires-python = ">=3.11"
readme = "README.md" readme = "README.md"
license = {text = "LicenseRef-Proprietary"} license = {text = "LicenseRef-Proprietary"}

View File

@ -1,9 +1,9 @@
from __future__ import annotations from __future__ import annotations
import re
from typing import TYPE_CHECKING, Final from typing import TYPE_CHECKING, Final
import requests import requests
from dopt_basics.io import combine_route
from pydantic import BaseModel from pydantic import BaseModel
from requests import Response from requests import Response
@ -195,16 +195,6 @@ def validate_credentials(
) )
def _strip_url_components(string: str) -> str:
return re.sub(r"^[ /]+|[ /]+$", "", string)
def combine_route(base_url: str, route: str) -> str:
base_url = _strip_url_components(base_url)
route = _strip_url_components(route)
return "/".join((base_url, route))
def ping( def ping(
base_url: str, base_url: str,
method: HttpRequestTypes, method: HttpRequestTypes,

View File

@ -4,9 +4,9 @@ from datetime import datetime as Datetime
from typing import TYPE_CHECKING, Final from typing import TYPE_CHECKING, Final
import requests import requests
from dopt_basics.io import combine_route
from pydantic import BaseModel, PositiveInt, SkipValidation from pydantic import BaseModel, PositiveInt, SkipValidation
from delta_barth.api.common import combine_route
from delta_barth.errors import STATUS_HANDLER from delta_barth.errors import STATUS_HANDLER
from delta_barth.types import DelBarApiError, ExportResponse, ResponseType, Status from delta_barth.types import DelBarApiError, ExportResponse, ResponseType, Status