diff --git a/src/api/qualicharge/__init__.py b/src/api/qualicharge/__init__.py index ee5627af..7b14d1c8 100644 --- a/src/api/qualicharge/__init__.py +++ b/src/api/qualicharge/__init__.py @@ -1 +1,3 @@ """QualiCharge package root.""" + +__version__ = "0.6.0" diff --git a/src/api/qualicharge/api/__init__.py b/src/api/qualicharge/api/__init__.py index 258c8c62..669ed887 100644 --- a/src/api/qualicharge/api/__init__.py +++ b/src/api/qualicharge/api/__init__.py @@ -1,6 +1,5 @@ """QualiCharge API root.""" -import importlib.metadata from contextlib import asynccontextmanager import sentry_sdk @@ -9,6 +8,7 @@ from sentry_sdk.integrations.fastapi import FastApiIntegration from sentry_sdk.integrations.starlette import StarletteIntegration +from .. import __version__ from ..conf import settings from ..db import get_engine from .v1 import app as v1 @@ -25,7 +25,7 @@ async def lifespan(app: FastAPI): dsn=str(settings.SENTRY_DSN), enable_tracing=True, traces_sample_rate=settings.SENTRY_TRACES_SAMPLE_RATE, - release=importlib.metadata.version("qualicharge"), + release=__version__, environment=settings.EXECUTION_ENVIRONMENT, integrations=[ StarletteIntegration(),