Adds YAML-based project configuration loader
Introduces a function to load and parse project configurations from a YAML file, returning a typed object for improved usability and type safety.
This commit is contained in:
14
src/config.py
Normal file
14
src/config.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
class DirectoryConfig(BaseModel):
|
||||
dependency: str = ".hdlbuild_deps"
|
||||
build: str = ".working"
|
||||
report: str = "reports"
|
||||
copy_target: str = "output"
|
||||
|
||||
DIRECTORIES = DirectoryConfig()
|
||||
|
||||
class GitConfig(BaseModel):
|
||||
timeout: int = 10
|
||||
|
||||
GIT = GitConfig()
|
Reference in New Issue
Block a user