Skip to content

Repository Paper Validator

osa_tool.operations.analysis.repository_validation.paper_validator

PaperValidator

Validates a scientific paper (PDF) against the code repository.

This class extracts and processes the content of a paper, analyzes code files in the repository, and validates the paper against the codebase using a language model.

__init__(config_manager, git_agent, create_fork, attachment=None)

Initialize the PaperValidator.

Parameters:

Name Type Description Default
config_manager ConfigManager

A unified configuration manager that provides task-specific LLM settings, repository information, and workflow preferences.

required
git_agent GitAgent

Abstract base class for Git platform agents.

required
create_fork bool

The flag is responsible for creating a pull request.

required
attachment str | None

Path to the paper PDF file.

None

__validate_paper_against_repo(code_files_info) async

Asynchronously validate the processed paper content against the code repository.

Parameters:

Name Type Description Default
code_files_info str

Aggregated code files analysis.

required

validate() async

Asynchronously validate a scientific paper against the code repository.

Returns:

Type Description
tuple[Experiment, ...]

dict | None: Validation result from the language model or none if an error occurs.

Raises:

Type Description
ValueError

If the article path is missing.

Exception

If an error occurs during validation.