Skip to content

Conversation

@johendrickson
Copy link
Contributor

@johendrickson johendrickson commented Oct 20, 2025

Closes #181

  • Implements add_qc_evaluations_to_docdb to serialize QCEvaluation objects and submit them to MetadataDbClient.
  • Adds unit tests covering:
    • Single QCEvaluation success
    • List of QCEvaluations success
    • Invalid data_asset_id error (simulated 404)

- Added _add_qc_evaluation_url property for QC evaluation endpoint
- Implemented add_qc_evaluation() method to sign and send POST requests
- Added unit tests for success and failure cases
- Updates import lines to follow isort standards
- Allow users to provide `qc_contents` directly when adding a QC evaluation
- Include `data_asset_id` in the `qc_contents` dict for post requests
- Update pydantic upper bound handling
- Restore isort import recommendations
- Implement serialize_qc_evaluations to serialize QCEvaluation objects
  and submit them to MetadataDbClient.
- Add unit tests covering:
  * Single QCEvaluation success
  * List of QCEvaluations success
  * Invalid data_asset_id error (simulated 404)
Copy link
Collaborator

@helen-m-lin helen-m-lin left a comment

Choose a reason for hiding this comment

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

Overall looks good! Requesting some changes regarding redundant code and cleaning up the payload.

- Renamed helper to `add_qc_evaluations_to_docdb` to clarify that it
  serializes and submits QC evaluations to DocDB.
- Updated serialization to exclude None values for smaller payloads.
- Removed redundant for-loop; MetadataDbClient.add_qc_evaluation now
  handles both single and multiple evaluations.
@johendrickson johendrickson marked this pull request as ready for review October 21, 2025 00:31
@helen-m-lin
Copy link
Collaborator

Thanks @johendrickson, looks great! @dbirman do you have any feedback for this helper before we merge?

Copy link
Member

@dbirman dbirman left a comment

Choose a reason for hiding this comment

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

Awesome, looks good to me!

@johendrickson johendrickson merged commit f512b8b into dev Oct 22, 2025
3 checks passed
@johendrickson johendrickson deleted the feat-181-serialize-helper-method branch October 22, 2025 17:13
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.

Add helper method to serialize QC evaluation objects from aind-data-schema

4 participants