feat(common): add get_repo_dir function and corresponding tests
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from python.logging_config import configure_logger as _configure_logger
|
||||
@@ -11,6 +12,11 @@ from python.logging_config import configure_logger as _configure_logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_repo_dir() -> Path:
|
||||
"""Return the repository root directory."""
|
||||
return Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def configure_logger(level: str = "INFO") -> None:
|
||||
"""Configure the logger."""
|
||||
_configure_logger(level)
|
||||
|
||||
Reference in New Issue
Block a user