50 lines
1.1 KiB
Python
50 lines
1.1 KiB
Python
from pathlib import Path
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
from dotenv import load_dotenv
|
|
from datetime import timedelta
|
|
import warnings
|
|
|
|
load_dotenv()
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
raw_path_: str
|
|
processed_path_: str
|
|
models_path_:str
|
|
interim_path_:str
|
|
external_path_:str
|
|
|
|
model_config = SettingsConfigDict(
|
|
env_prefix="mrh_avap_",
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
case_sensitive=False,
|
|
extra="ignore",
|
|
)
|
|
|
|
@property
|
|
def raw_path(self) -> Path:
|
|
return Path(self.raw_path_)
|
|
|
|
@property
|
|
def processed_path(self) -> Path:
|
|
return Path(self.processed_path_)
|
|
|
|
@property
|
|
def proj_root(self) -> Path:
|
|
return Path(__file__).resolve().parents[1]
|
|
|
|
@property
|
|
def interim_path(self) -> Path:
|
|
return Path(self.interim_path_)
|
|
|
|
@property
|
|
def external_path(self) -> Path:
|
|
return Path(self.external_path_)
|
|
|
|
@property
|
|
def models_path(self) -> Path:
|
|
return Path(self.models_path_)
|
|
|
|
settings = Settings()
|