Skip to content

Parameter validation#1052

Merged
RobbinBouwmeester merged 9 commits into
mainfrom
parameter-validator
Jun 5, 2026
Merged

Parameter validation#1052
RobbinBouwmeester merged 9 commits into
mainfrom
parameter-validator

Conversation

@RobbinBouwmeester

Copy link
Copy Markdown
Member

No description provided.

@RobbinBouwmeester

Copy link
Copy Markdown
Member Author

Should implement #993

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a framework-agnostic submission-validation layer (proteobench.validation) and wires it into the Streamlit submission flow to validate uploaded results/parameters (and optionally protein IDs against a module reference FASTA) before creating a public datapoint.

Changes:

  • Added a core validation package (proteobench.validation) with structured reporting, reference FASTA handling, and per-check validators.
  • Integrated validation into the Streamlit submission tab: render the report, block submission on validation errors, and append a validation summary to the PR description.
  • Added module-level [reference_database] FASTA URLs to multiple module_settings.toml files and added unit/integration tests plus a small FASTA test fixture.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
webinterface/pages/base_pages/utils/validation_ui.py New Streamlit “glue” to build a standardized DF, fetch/cache FASTA, call core validator, and render issues.
webinterface/pages/base_pages/tabs/tab6_submit_results.py Runs validation before PR creation; blocks on errors and appends a validation summary to PR text.
test/test_validation.py Unit + lightweight integration tests for validation helpers, checks, report semantics, and real-parser integration.
test/data/validation/ProteoBench_validation_reference.fasta Small reference FASTA fixture for protein-id validation tests.
proteobench/validation/init.py Exposes the new validation public API.
proteobench/validation/validator.py Orchestrates checks into a single ValidationReport with fault-tolerant check execution.
proteobench/validation/report.py Defines Severity, ValidationIssue, and ValidationReport (+ summary/serialization helpers).
proteobench/validation/checks.py Implements individual validation checks (protein IDs, charge, length, enzyme heuristic, modifications heuristic, run consistency).
proteobench/validation/config.py Adds module-level validation configuration, including reading [reference_database] from module settings.
proteobench/validation/fasta.py Implements FastaReference parsing/loading (path/bytes/url; zip/gz/plain) and header identifier extraction.
proteobench/validation/protein_ids.py Protein group splitting + identifier extraction and decoy/contaminant detection helpers.
proteobench/validation/exceptions.py Adds SubmissionValidationError convenience exception wrapping a ValidationReport.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DIA/ion/ZenoTOF/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DIA/ion/singlecell/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DIA/ion/plasma/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DIA/ion/diaPASEF/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DIA/ion/Astral/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DIA/ion/AIF/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DDA/peptidoform/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DDA/ion/QExactive/module_settings.toml Adds [reference_database] with FASTA URL for validation.
proteobench/io/parsing/io_parse_settings/Quant/lfq/DDA/ion/Astral/module_settings.toml Adds [reference_database] with FASTA URL for validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread webinterface/pages/base_pages/utils/validation_ui.py Outdated
Comment thread webinterface/pages/base_pages/tabs/tab6_submit_results.py
@RobbinBouwmeester RobbinBouwmeester marked this pull request as ready for review June 3, 2026 13:45
@RobbinBouwmeester RobbinBouwmeester requested a review from Copilot June 3, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.

Comment thread webinterface/pages/base_pages/utils/validation_ui.py
Comment thread webinterface/pages/base_pages/tabs/tab6_submit_results.py
Comment thread proteobench/validation/checks.py
Comment thread proteobench/validation/checks.py
Comment thread proteobench/validation/checks.py Outdated
Comment thread proteobench/validation/checks.py
Comment thread proteobench/validation/fasta.py
Comment thread CLAUDE.md
@RobbinBouwmeester RobbinBouwmeester merged commit c538be4 into main Jun 5, 2026
10 checks passed
@RobbinBouwmeester RobbinBouwmeester deleted the parameter-validator branch June 5, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR from Proteobot: set up a system for the moderators Checks and balances

3 participants