CSV review feedback - #843
Merged
Merged
Conversation
The CSV package respelled hgvs_nt/hgvs_splice/hgvs_pro in two places and restated the null-token set a third time. Both now come from validation.constants.general and mave.utils.NULL_VALUES. This also settles a disagreement inside columns.py: cells were rendered with `_is_output_null` while `drop_unused_hgvs_columns` judged emptiness with validation's `is_null`, which additionally counts "-" as null. A column of "-" therefore rendered as "-" but was eligible to be dropped. Both now use the export's own predicate, which drops the package's dependency on validation.utilities entirely. CORE_NAMESPACE's resolvers keep the three names spelled out rather than taking `hgvs_columns`: that dict's declaration order is the published header order, and `hgvs_columns` is sorted.
scores.csv was composed from ["scores"], which meant every score column while
`include_custom_columns` defaulted to True, and means only the required `score` column since the
namespace refactor. /score-sets/{urn}/scores was updated to name both score namespaces; the dump
was missed, so it would have shipped an archive contradicting its own README. Never released — the
namespace refactor is on this branch.
Also here, because they touch the same code:
- `annotation_export_namespaces` takes a required viewer, and `annotations_csv` threads one viewer
through both namespace selection and cell resolution, so a calibration cannot be offered as a
column group and then withheld as data.
- The archive's research-use-only rule is now stated rather than implied: annotations.csv carries
RUO calibrations flagged by `research_use_only`, va.ndjson does not, and the README documents the
asymmetry instead of claiming the dump excludes them.
- The README's claim that mapped/ retains superseded records was wrong — the query has always
filtered `current`. Corrected, with the contrast against the API endpoint that does return
history.
- The command is decomposed into per-artifact functions so each branch the README documents is
reachable without running the whole export. `counts_csv` also stops indexing
dataset_columns["count_columns"] directly, which would KeyError and abort the entire dump on a
score set lacking the key.
66 tests over the archive contract: which files appear for which score-set shape, the `accession`
join key across files, RUO included-and-flagged versus private excluded, every ClinVar release
present, NDJSON line count and newline termination, and the published + CC0 selection gate.
Fixtures build the published/CC0 shape explicitly rather than reusing the generic score-set
factories, whose license is deliberately not CC0. Two carry non-obvious constraints:
TEST_MINIMAL_MAPPED_VARIANT sets post_mapped={}, a shape production never stores and the annotation
layer cannot parse; and a private calibration may not be marked primary.
Coverage Report for CI Build 31729312761Coverage increased (+0.2%) to 88.879%Details
Uncovered Changes
Coverage Regressions25 previously-covered lines in 4 files lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.