Skip to content

CSV review feedback - #843

Merged
bencap merged 4 commits into
release-2026.2.7.1from
chore/bencap/csv-review-comments
Aug 14, 2026
Merged

CSV review feedback#843
bencap merged 4 commits into
release-2026.2.7.1from
chore/bencap/csv-review-comments

Conversation

@bencap

@bencap bencap commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

bencap added 4 commits August 13, 2026 10:51
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.
@coveralls

coveralls commented Aug 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31729312761

Coverage increased (+0.2%) to 88.879%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 8 uncovered changes across 1 file (76 of 84 lines covered, 90.48%).
  • 25 coverage regressions across 4 files.

Uncovered Changes

File Changed Covered %
src/mavedb/scripts/export_public_data.py 77 69 89.61%
Total (3 files) 84 76 90.48%

Coverage Regressions

25 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
src/mavedb/lib/utils.py 11 28.13%
src/mavedb/lib/clinvar/utils.py 6 90.59%
src/mavedb/worker/jobs/external_services/clinvar.py 5 94.95%
src/mavedb/lib/vep.py 3 87.76%

Coverage Stats

Coverage Status
Relevant Lines: 15502
Covered Lines: 13778
Line Coverage: 88.88%
Coverage Strength: 0.89 hits per line

💛 - Coveralls

@bencap
bencap merged commit 4e3c384 into release-2026.2.7.1 Aug 14, 2026
5 checks passed
@bencap
bencap deleted the chore/bencap/csv-review-comments branch August 14, 2026 16:44
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.

2 participants