Skip to content

Allow ontology term ids instead of general metadata#5

Merged
rm1113 merged 6 commits into
mainfrom
allow_ont_id
Sep 29, 2025
Merged

Allow ontology term ids instead of general metadata#5
rm1113 merged 6 commits into
mainfrom
allow_ont_id

Conversation

@rm1113
Copy link
Copy Markdown
Contributor

@rm1113 rm1113 commented Sep 29, 2025

No description provided.

@rm1113 rm1113 requested a review from Copilot September 29, 2025 16:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 allows the validator to accept ontology term IDs as alternatives to general metadata fields. The validation now passes if either the standard metadata column (e.g., "tissue") or its corresponding ontology term ID column (e.g., "tissue_ontology_term_id") is present and contains valid values.

Key changes:

  • Modified obs column validation to accept either standard metadata or ontology term ID columns
  • Added new exception type for handling None/empty values in metadata fields
  • Updated error messages to reflect the new ontology term ID support

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/cap_upload_validator/upload_validator.py Updated validation logic to check for either metadata columns or ontology term ID columns, refactored validation helper methods
src/cap_upload_validator/errors.py Added new exception class and updated existing exception messages to include ontology term ID alternatives
test/test_upload_validator.py Added comprehensive test coverage for ontology term ID validation scenarios and corrected typos in exception names
CHANGELOG.md Documented the new feature and breaking changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/cap_upload_validator/upload_validator.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rm1113 rm1113 merged commit 1eb6b02 into main Sep 29, 2025
5 checks passed
@rm1113 rm1113 deleted the allow_ont_id branch September 29, 2025 16:04
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.

2 participants