fix: adds InfluxDBv1Session to default imports of pydase_service_base.database

This commit is contained in:
Mose Mueller 2024-12-16 14:41:56 +01:00
parent 891faada2f
commit 6a5108ee91
2 changed files with 16 additions and 2 deletions

View File

@ -16,6 +16,20 @@ except ImportError:
)
try:
import influxdb # noqa
from .influxdbv1_session import InfluxDBv1Session # type: ignore
except ImportError:
class InfluxDBv1Session: # type: ignore
def __init__(self) -> None:
raise OptionalDependencyError(
"InfluxDBSession requires the 'influxdbv2' extra. "
"Please refer to https://gitlab.phys.ethz.ch/tiqi-projects/qchub/icon-services/pydase_service_base."
)
try:
import sqlmodel # noqa
@ -30,4 +44,4 @@ except ImportError:
)
__all__ = ["InfluxDBSession", "PostgresDatabaseSession"]
__all__ = ["InfluxDBSession", "InfluxDBv1Session", "PostgresDatabaseSession"]

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "pydase-service-base"
version = "0.2.0"
version = "0.2.1"
description = "Repository storing the code that is common to all pydase services."
authors = ["Mose Mueller <mosmuell@ethz.ch>"]
license = "MIT"