Add get_run method to SampleRegistry#49
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #49 +/- ##
==========================================
+ Coverage 85.96% 86.12% +0.15%
==========================================
Files 11 11
Lines 869 879 +10
==========================================
+ Hits 747 757 +10
Misses 122 122 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds a get_run method to the SampleRegistry class to fetch run records by accession number. The new method provides a more lenient alternative to the existing check_run_accession method by returning None instead of raising an exception when a run doesn't exist.
- Adds
get_runmethod that returns aRunobject orNone - Includes comprehensive test coverage for both successful retrieval and non-existent runs
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/sample_registry/src/sample_registry/registrar.py | Adds the new get_run method with proper documentation |
| app/sample_registry/test/test_registrar.py | Adds tests for both successful and unsuccessful run retrieval scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
get_runmethod onSampleRegistryto fetch run recordsget_runbehavior with new testsTesting
PYTHONPATH=app/sample_registry/src pytest -qhttps://chatgpt.com/codex/tasks/task_e_68c3611b2d6883238d2c5743f6a10e36