-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
391 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
"""Keiko settings module.""" | ||
from typing import Optional | ||
|
||
from pydantic import AnyHttpUrl, BaseSettings, DirectoryPath, Field, FilePath | ||
from pydantic import AnyHttpUrl, DirectoryPath, Field, FilePath | ||
from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
||
|
||
class Settings(BaseSettings): | ||
"""Application settings loaded from environment variables.""" | ||
|
||
debug: bool = Field(False, description="Enable global debug mode, which increases logging verbosity", env="DEBUG") | ||
debug: bool = Field(False, description="Enable global debug mode, which increases logging verbosity", validation_alias="DEBUG") | ||
log_cfg: FilePath = Field("logging.json", description="Path to the logging configuration file") | ||
templates_folder: DirectoryPath = Field("templates", description="Folder containing the templates") | ||
glossaries_folder: DirectoryPath = Field("glossaries", description="Folder containing the glossaries") | ||
assets_folder: DirectoryPath = Field("assets", description="Folder containing the assets") | ||
reports_folder: DirectoryPath = Field("/reports", description="Output folder containing the reports") | ||
|
||
span_export_grpc_endpoint: Optional[AnyHttpUrl] = Field( | ||
None, description="OpenTelemetry endpoint", env="SPAN_EXPORT_GRPC_ENDPOINT" | ||
None, description="OpenTelemetry endpoint", validation_alias="SPAN_EXPORT_GRPC_ENDPOINT" | ||
) | ||
|
||
class Config: | ||
env_prefix = "KEIKO_" | ||
model_config = SettingsConfigDict(env_prefix="KEIKO_") |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.