src.models.repo_request

Module Contents

class src.models.repo_request.RepoRequest(/, **data: Any)

Bases: pydantic.BaseModel

Represents a request for repository information.

Args:

provider (str): The repository provider, either ‘github’ or ‘gitlab’. repo_url (str): The URL of the repository. token (str): Authentication token for accessing the repository. branch (str): The branch of the repository to access. target_folders (list[str], optional): List of target folders, defaults to an empty list. model (Optional[str], optional): Optional model name. reuse_doc (bool, optional): Flag to indicate if the document should be reused, defaults to False.

Returns:

None: This class does not return a value.

provider: str
repo_url: str
token: str
branch: str
target_folders: list[str] = None
model: str | None = None
reuse_doc: bool = False
docstring_threshold: float = None
low_content_min_lines: int = None
class src.models.repo_request.PublishPagesRequest(/, **data: Any)

Bases: pydantic.BaseModel

Represents a request to publish pages to a repository.

Args:

repo_url (str): The URL of the repository. token (str): The authentication token. branch (str): The branch to publish to.

Returns:

None

repo_url: str
token: str
branch: str
low_content_min_lines: int = None
class src.models.repo_request.DocstringPullRequestRequest(/, **data: Any)

Bases: pydantic.BaseModel

Represents a request for a pull request to add Python docstrings.

Args:

provider (str): The name of the provider (default is ‘github’). repo_url (str): The URL of the repository. token (str): Authentication token for the repository. base_branch (str): The base branch for the pull request. suggestion_branch (Optional[str]): The branch for suggested changes (default is None). title (str): Title of the pull request (default is ‘Add suggested Python docstrings’). max_docstrings (int): Maximum number of docstrings to add (default is 50).

Returns:

None

provider: str = 'github'
repo_url: str
token: str
base_branch: str
suggestion_branch: str | None = None
title: str = 'Add suggested docstrings'
max_docstrings: int = 50
class src.models.repo_request.ArchitectureGenerationRequest(/, **data: Any)

Bases: pydantic.BaseModel

Represents a request to analyze a repository and produce a reviewable architecture documentation draft. Generation never commits or publishes.

Args:

provider (str): The repository provider, either ‘github’ or ‘gitlab’. repo_url (str): The URL of the repository. token (str): Authentication token used for repository read access. branch (str): The branch of the repository to analyze. target_folders (list[str], optional): Optional folder filters, defaults to empty. output_path (str, optional): Preferred documentation path for the approved page. include_diagrams (bool, optional): Whether diagrams should be generated when evidence is sufficient, defaults to True. reuse_existing_docs (bool, optional): Whether existing architecture docs should be used as context for regeneration, defaults to True. model (Optional[str], optional): Optional generation model override.

Returns:

None: This class does not return a value.

provider: str
repo_url: str
token: str
branch: str
target_folders: list[str] = None
output_path: str = 'docs/project/architecture.rst'
include_diagrams: bool = True
reuse_existing_docs: bool = True
model: str | None = None
class src.models.repo_request.ArchitectureApprovalRequest(/, **data: Any)

Bases: pydantic.BaseModel

Represents explicit maintainer approval to apply a generated architecture draft to the target repository documentation workflow.

Args:

provider (str): The repository provider, either ‘github’ or ‘gitlab’. repo_url (str): The URL of the repository. token (str): Authentication token used for repository write access. branch (str): The branch receiving the approved documentation update. draft_id (str): Identifier for the generated architecture draft artifact. output_path (str): Documentation path to update. overwrite_existing (bool): Whether approved manual edits may be replaced. approval_note (Optional[str], optional): Optional reviewer note.

Returns:

None: This class does not return a value.

provider: str
repo_url: str
token: str
branch: str
draft_id: str
output_path: str
overwrite_existing: bool
approval_note: str | None = None