Introduces a function to load and parse project configurations from a YAML file, returning a typed object for improved usability and type safety.
14 lines
295 B
Python
14 lines
295 B
Python
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() |