Add a fixture for <note> inside <example>, subsense-nested example/note/reversal, and etymology traits
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu với các tệp hiện có trong tests/corpus/ và các bài kiểm thử được tham số hóa theo corpus, sau đó kiểm tra _reader.py:434, _writer.py:352-353 và tests/test_property_roundtrip.py. Thêm một fixture với version="0.13" bao phủ các dạng example, subsense và etymology được liệt kê, kèm các assertion read-back mang tính ngữ nghĩa và việc xác thực round-trip giống hệt từng byte; các đường dẫn fidelity, canonical và RNG-validity hiện có cũng phải vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 0
- Merge trung bình
- 9 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sillsdev/python-sil-lift
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
sillsdev/python-sil-lift#45 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
sillsdev/python-sil-lift#35 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
sillsdev/python-sil-lift#33 ·
-
Evaluate full API surface for anything unnecessaryCó thể đã có người làm @imnasnainaec đã nhận 25 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
sillsdev/python-sil-lift#30 · 1 bình luận · 1 người được giao ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
sillsdev/python-sil-lift#29 · 1 bình luận ·
Tất cả issue của sillsdev/python-sil-lift
Issue tương tự
-
idxmax/idxmin raise ValueError when a single partition is all-NACó thể đã có người làm @Jason10191019999 đã nhận hôm nay. Đang mởneeds triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Old versions of datamodelsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
[BUG]: Windows GUI package of v1.17.0-rc3 has no GTK DLLsCó thể đã có người làm @andrut-ds đã nhận hôm nay. Đang mởbug CI/CD Pactus-GUI Windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pactus-project/pactus#2428 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DiskDataset.reshard() can hang with a zero or negative shard sizeCó thể đã có người làm @Programmer-Develops đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 19 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
GNS3/gns3-server#3017 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày