You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raised in review of PR #344 (#322's corpus normalisation). Deliberately not done there —
it changes the emitted format, which would mean re-normalising all 477 records inside a PR
already under review.
The observation
safe_dump's default for a long string is a folded/wrapped plain scalar, so the ~50 curation_history.changes entries — which are multi-sentence prose explaining why a
change was made — now come back re-wrapped at the emitter's width:
changes: Re-grounded 2 causal edge(s) off enables/RO:0002327 with a TRAIT object (1to has electron acceptor, 1 to confers), issue 302. RO:0002327 has range 'biologicalprocess or activity', which a trait (a disposition) cannot satisfy, so the previous
A str representer emitting block literal style (|) for multi-line or long values
would keep them readable and, more usefully, make their diffs line-oriented — an edit to one
sentence would show as one changed line rather than re-flowing the whole paragraph.
It changes EMIT_OPTS/the representer, so every record would need re-normalising again.
test_the_whole_corpus_round_trips would enforce whatever form is chosen, so the decision
is one-way once taken — worth making deliberately rather than inside a 350-file PR.
Raised in review of PR #344 (#322's corpus normalisation). Deliberately not done there —
it changes the emitted format, which would mean re-normalising all 477 records inside a PR
already under review.
The observation
safe_dump's default for a long string is a folded/wrapped plain scalar, so the ~50curation_history.changesentries — which are multi-sentence prose explaining why achange was made — now come back re-wrapped at the emitter's width:
A
strrepresenter emitting block literal style (|) for multi-line or long valueswould keep them readable and, more usefully, make their diffs line-oriented — an edit to one
sentence would show as one changed line rather than re-flowing the whole paragraph.
Why it wasn't done in #344
EMIT_OPTS/the representer, so every record would need re-normalising again.test_the_whole_corpus_round_tripswould enforce whatever form is chosen, so the decisionis one-way once taken — worth making deliberately rather than inside a 350-file PR.
form to standardise on.
If taken
strchoosing|when the value contains a newline orexceeds some length.
scripts/-side, two-pass with the semantic check as in Normalise the corpus so the round-trip claim becomes enforceable (#322) #344).Worth checking the diff-noise claim first on one record, since block scalars are also
whitespace-sensitive in a way plain scalars are not.