Add a fixture for <note> inside <example>, subsense-nested example/note/reversal, and etymology traits
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Inizia dai file esistenti in tests/corpus/ e dai test parametrizzati sul corpus, quindi esamina _reader.py:434, _writer.py:352-353 e tests/test_property_roundtrip.py. Aggiungi una fixture con version="0.13" che copra le forme example, subsense ed etymology elencate, con asserzioni semantiche di read-back e una validazione del round-trip identica a livello di byte; anche i percorsi esistenti di fidelity, canonical e RNG-validity dovrebbero passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Example.notes is modeled, parsed (_reader.py:434) and written
(_writer.py:352-353), but no corpus fixture contains a <note> inside an
<example>. The writer's loop body is dead code as far as the suite is concerned,
and the property-based round-trip strategies don't help — _senses() in
tests/test_property_roundtrip.py generates no examples at all.
This was measured by diffing branch coverage of the full 458-test suite against a
run that loads, re-saves and validates 10 real FLEx exports (~29,000 entries, from
sillsdev/TheCombine Backend.Tests/Assets/*.zip). Those exports reach exactly
four arcs the suite does not, all one feature:
_reader.py:434 handlers["note"] = lambda c: example.notes.append(_parse_note(c)) (lambda body)
_writer.py:352 for note in example.notes:
_writer.py:353 el.append(_note_el(note))
FLEx emits these heavily — 2,454 example-notes in one export, 744 in another,
typically <note type="reference"> carrying a scripture citation alongside the
example's translation.
Two further structures in those exports have no corpus instance either (counted
across every tests/corpus/ file: 0 each):
<subsense>carryingexample(with its owntranslationandnote),note,
orreversal.spec-examples/0.13/subsenses.lifthas subsenses, but only with
gloss/definition.<etymology>carrying atrait(FLEx writestrait name="languages").
Proposed fixture
One hand-authored version="0.13" file. These shapes are legal per the RNG, so it
belongs in the regular corpus rather than negative/:
- a sense with an
<example>carrying<translation>,<note type="reference">,
and a<trait> - a
<subsense>carrying its own<example>(with nestedtranslationand
note), a<note>, and two<reversal>elements - an
<etymology>with a<trait>
Shapes drawn from real SIL.FLEx 9.0.7 output, e.g.:
<example source="Luke 1:4">
<form lang="qaa-x-stc"><text>…</text></form>
<translation type="Free translation">
<form lang="en"><text>…</text></form>
</translation>
<note type="reference">
<form lang="en"><text>Luke 1:4</text></form>
</note>
</example>
Assertions: semantic read-back (example.notes, subsense.examples,
etymology.traits — proving the content is modeled rather than carried as
Extras residue) plus byte-identical round-trip. The file also picks up the
existing corpus-parametrized fidelity, canonical, and RNG-validity paths for free.
Why hand-authored rather than importing an export
The exports that surface this are 1.4-12.3 MB of real community lexical data
(Natqgu, Sena) with no per-file provenance recorded in their source repo — the same
permission question as the pending "Enggano export" line in
tests/corpus/PROVENANCE.md. A short fixture closes the coverage gap without
taking that on, or adding megabytes to the repo.
Not included, deliberately
<span lang=...> inside a <definition> looked novel at first — the corpus has 72
spans in definitions, none with @lang. But large/sango/sango.lift already has 45
span[@lang] elsewhere, so the attribute is exercised; only the combination is
absent, and that's not a distinct code path.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 0
- Merge medio
- 11g 8h
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sillsdev/python-sil-lift
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
sillsdev/python-sil-lift#45 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
sillsdev/python-sil-lift#35 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
sillsdev/python-sil-lift#33 ·
-
Evaluate full API surface for anything unnecessaryForse già presa @imnasnainaec l’ha presa 16 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
sillsdev/python-sil-lift#30 · 1 commento · 1 assegnatario ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
sillsdev/python-sil-lift#29 · 1 commento ·
Tutte le issue di sillsdev/python-sil-lift
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
esphome/esphome.io#7657 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/gateway comp/plugins duplicate P3 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#137019 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Kumo-Tabular weights unreachable behind restrictive egress proxies (Xet + plain HTTP both fail)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
NVIDIA/structured-data-models#1091 ·
I maintainer di solito rispondono entro 1 giorno
-
[work-item] adam-adae-worsening-emergence: conform spec.yaml to the specification style contract (REQ-1280)Forse già presa @muse-yamaa-bot l’ha presa oggi. Apertawork-item
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno