refactor: separate standalone and managed room configs
- veins → shunts rename - add cfg/standalone/ and cfg/<room>/ structure - remove old data/*.json (moved to cfg/<room>/data/) - update build.py and ctrl scripts
This commit is contained in:
27
artery/shunts/amar/core/config.py
Normal file
27
artery/shunts/amar/core/config.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Configuration for Amar mock vein."""
|
||||
|
||||
from pathlib import Path
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
ENV_FILE = Path(__file__).parent.parent / ".env"
|
||||
|
||||
|
||||
class AmarMockConfig(BaseSettings):
|
||||
"""Configuration for Amar (MOCK) vein."""
|
||||
|
||||
api_port: int = 8005
|
||||
mock_data_path: str = "./mock_data"
|
||||
|
||||
# Mock behavior
|
||||
enable_random_delays: bool = True
|
||||
min_delay_ms: int = 100
|
||||
max_delay_ms: int = 500
|
||||
error_rate: float = 0.0 # 0.0 to 1.0
|
||||
|
||||
model_config = {
|
||||
"env_file": ENV_FILE if ENV_FILE.exists() else None,
|
||||
"env_file_encoding": "utf-8",
|
||||
}
|
||||
|
||||
|
||||
settings = AmarMockConfig()
|
||||
Reference in New Issue
Block a user