feat(deposition): split and move out functions to be reused in raw reads, improve manifest creation code, fix bug in assembly revision code - #7017
Conversation
…ads, improve manifest creation code
| return sorted(segment_order) | ||
|
|
||
|
|
||
| def get_address(config: Config, submission_row: SubmissionTableEntry) -> str | None: |
| return address_string | ||
|
|
||
|
|
||
| def get_assembly_values_in_metadata(config: Config, metadata: dict[str, str]) -> dict[str, str]: |
There was a problem hiding this comment.
replaced with resolve_required_manifest_field
| f"for {submission_row.accession}. (Maybe other fields changed as well)" | ||
| ) | ||
| return True | ||
| if config.allow_revision_with_manifest_changes and manifest_fields_diff( |
There was a problem hiding this comment.
this was actually a bug - if allow_revision_with_manifest_changes is true we also want to revise assemblies if the manifest metadata changed
There was a problem hiding this comment.
I added a test for this!
| ) | ||
|
|
||
|
|
||
| def get_project_and_sample_results( |
|
Claude finished @anna-parker's task in 4m 32s —— View job Claude finished reviewing this PR
SummaryThis is a clean refactor: extracting Also good fixes bundled in here:
I left a few inline comments on smaller items:
Nothing blocking — these are refinements, not correctness-breaking issues. |
refactor in preparation of #6816
allow_revision_with_manifest_changesis true we also want the pipeline to revise assemblies automatically (instead of sending us a slack notification) if the manifest metadata changed. I added this to the ena workflow tests.Screenshot
PR Checklist
I added additional unit tests for the manifest generation and manifest field diff code and additionally I added a new ena workflow test that covers the bug case (workflow tests talk to ENA dev directly, sadly ENA dev does not process assemblies so part of the full process can only be covered in production code but the workflow tests document this)
🚀 Preview: Add
previewlabel to enable