src.utils.output_paths

Module Contents

src.utils.output_paths.LOG_RETENTION_COUNT = 6
src.utils.output_paths.build_repo_output_dir(repo_path: str, provider: str) str

Returns the repo-scoped output directory for the current run.

src.utils.output_paths.build_repo_output_file(repo_path: str, provider: str, filename: str) str

Constructs the full path for a repository output file.

Args:

repo_path (str): The path to the repository. provider (str): The provider name associated with the repository. filename (str): The name of the output file.

Returns:

str: The full path to the output file.

src.utils.output_paths.bind_repo_run_log_dir(repo_path: str, provider: str) str

Bind the repository run log directory based on the given repository path and provider.

Parameters:
  • repo_path (str) – The path to the repository.

  • provider (str) – The name of the provider.

Returns:

The bound repository run log directory path.

Return type:

str

src.utils.output_paths.clear_repo_output_history(repo_path: str, provider: str) None

Clears the output history of a specified repository.

Args:

repo_path (str): The path to the repository. provider (str): The provider of the repository.

Returns:

None: This function does not return a value.

src.utils.output_paths.validate_architecture_output_path(output_path: str) str

Validates that an architecture documentation output path stays within the docs tree.

Parameters:

output_path (str) – The proposed documentation output path.

Returns:

The normalized, validated output path.

Return type:

str

Raises:

ValueError – If the path escapes the repository or the docs/ tree.

src.utils.output_paths.find_latest_repo_run_dir(repo_path: str, provider: str) str | None

Retrieve the latest run directory for a specified repository.

Args:

repo_path (str): The path to the repository. provider (str): The provider of the repository.

Returns:

str | None: The latest run directory path or None if not found.