Conversation
Coverage Report for CI Build 37041710615Coverage increased (+0.9%) to 75.501%Details
Uncovered Changes
Coverage Regressions3 previously-covered lines in 3 files lost coverage.
Coverage Stats
💛 - Coveralls |
|
Implemented and pushed generic JSON schema ordering fix in commit a61b3ac on fm/protected-donor-dcicutils. Summary:
Tests:
Adversarial review outcome:
|
The lock refresh in 4c2d59d floated flake8 7.1 -> 7.3 (pyflakes 3.2 -> 3.4), which added F824. These declarations were for names only read, never assigned, in the inner scope, so removing them does not change behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
willronchetti
left a comment
There was a problem hiding this comment.
Request changes on reviewed head 1abf5d658ad1c218fbe482d6434d29707c1b3d3b. The 132 focused/related tests pass, but the following uncovered cases were reproduced with synthetic workbooks and mocked portal access.
-
Preserve copied fields -
dcicutils/submitr/donor_transformer.py:292Writing only destination headers silently drops incoming fields absent from an existing ProtectedDonor sheet. Please extend the headers or reject the mismatch before rewriting links.
-
Keep generated rows visible -
dcicutils/submitr/donor_transformer.py:290max_rowincludes formatted empty cells, but the reader stops at the first empty row. Newly appended records can therefore disappear from parsed data while references point to them. Please append before the logical terminator or reject this shape. -
Accept supported identifiers -
dcicutils/submitr/donor_transformer.py:150-152UUID/accession references to existing ProtectedDonors resolve successfully in the base reader but are rejected here. Please resolve identity and type rather than classify references solely by submitted-ID spelling.
-
Match reader termination -
dcicutils/submitr/donor_transformer.py:306This scans references beyond the empty-row terminator, so stale content can reject an otherwise valid workbook. Please use the same logical-row boundaries as ingestion.
-
Distinguish lookup failure from absence -
dcicutils/submitr/donor_transformer.py:410-413A permission error or outage is reported as a missing ProtectedDonor. Please preserve lookup failures and reserve 'absent' for definitive not-found results.
-
Avoid counting-pass saves -
dcicutils/submitr/custom_excel.py:119-122Progress-enabled loading saves during counting, then fails during parsing because its output already exists. Please suppress counting-pass writes or reuse the instance while preserving no-clobber protection. The current submitr staging caller avoids this, but default library callers do not.
…extension, typed lookups, single Excel open - Scan, rewrite, and append only within the reader's logical rows (before the first empty row). - Extend an existing ProtectedDonor sheet's headers for copied fields, or reject unsafe shapes before mutating. - Resolve non-token references (UUID/accession) as ProtectedDonors via workbook identifiers or typed portal lookup. - Report permission/outage lookup failures distinctly from definitive absence. - Open the Excel workbook once in StructuredDataSet so the progress counting pass cannot pre-create the staged output.
|
Thanks for the review. All six concerns are addressed (fixes are on top of this PR's head; pushed via the no-mistakes pipeline):
Validation: 20 new regression tests in |
|
The validated follow-up changes from PR 341 are now on this PR's branch at the same tested head. They address all six review concerns: preserving copied fields and rejecting unsafe header layouts, matching logical row termination for generated rows and reference scans, resolving supported UUID/accession identifiers by identity and type, distinguishing lookup failures from definitive absence, and preventing counting-pass saves from breaking parsing. The final version is 8.19.1 with the corresponding changelog entry. The validation suite passed, including 42 focused tests, the related test coverage, and flake8. PR 341 is being closed as the duplicate now that its validated changes are here. |
Purpose
Add the dcicutils-side ProtectedDonor workbook analysis and selective transformation used by submitr.
Feature summary
Remediation updates
dcicutils.submitr.donor_transformer.Review focus
The downstream submitr implementation and payload remediation are tracked in smaht-dac/submitr#48.