proteobench.validation.validator module#
Central submission-validation API.
validate_submission() resolves the module’s validation profile, builds a
ValidationContext, and runs the
profile’s checks, returning a single structured
ValidationReport. The caller decides
what to do with the report (typically: block public submission when
report.has_errors is true, but allow it through with warnings).
The orchestrator is generic: it does not know about any particular module type.
Which checks run is determined entirely by the resolved profile
(proteobench.validation.profiles). Adding a new module of an existing
category needs no code; adding a new category needs only a new registered
profile.
The function is framework-agnostic and performs no I/O: any reference data (a FASTA, a ground-truth table) is supplied via the arguments / context. Front ends are responsible for obtaining the standardized DataFrame and the reference.
- proteobench.validation.validator.validate_submission(standard_df: DataFrame, parameters: Any = None, fasta: FastaReference | None = None, config: ModuleValidationConfig | None = None, input_format: str | None = None, profile: str | None = None) ValidationReport[source]#
Validate a benchmark submission and return a structured report.
The set of checks run is determined by the validation profile, resolved from (in order): the explicit
profileargument,config.validation_profile, or the default. Each check is fault-tolerant: a check that raises an unexpected exception is converted to a warning so that validation itself never crashes the submission flow.- Parameters:
standard_df (pandas.DataFrame) – The standardized result DataFrame produced by the module parser.
parameters (Any, optional) – Parsed parameters (a
ProteoBenchParametersor any object with the same attributes). Parameter-dependent checks degrade to warnings when values are missing.fasta (FastaReference, optional) – Reference protein identifiers, for profiles that validate against a sequence database.
config (ModuleValidationConfig, optional) – Module validation configuration. Defaults to a generic configuration (which selects the default profile).
input_format (str, optional) – The selected software tool, used for run-consistency checks.
profile (str, optional) – Explicit profile name, overriding
config.validation_profile. Mostly useful for testing.
- Returns:
The aggregated validation report.
- Return type: