Data Labels
ci / checks (push) Failing after 3h12m18s

This commit is contained in:
khodowany
2026-09-20 02:07:26 -05:00
parent 5fc2103810
commit 7bb1ed2b13
24 changed files with 2334 additions and 2563 deletions
+1 -19
View File
@@ -58,22 +58,6 @@ def audit_layout(document: dict, layout: LayoutDocument, fonts: Fonts) -> None:
raise EngravingError(f'{item.sources} and {other.sources}: colliding {item.role}/{other.role}')
if previous_end != index.end:
raise EngravingError('layout omits the end of the score')
from generator.repeats import analyze
_, endings = analyze(index.staff['measures'])
for ending in endings:
if not ending.visible:
continue
identifier = index.measures[ending.start][2]['id'] + ':ending'
if not any(p.role == 'ending-label' and p.value == ending.text for p in primitives.get(identifier, [])):
raise EngravingError(f'{identifier}: numbered ending was omitted')
low, high = index.measures[ending.start][0], index.measures[ending.end - 1][1]
for page in layout.pages:
for system in page.systems:
if system.start < high and system.end > low and not any(p.role == 'ending' and identifier in p.sources for p in system.primitives):
raise EngravingError(f'{identifier}: ending continuation was omitted')
for _, _, measure in index.measures:
if measure.get('repeats') and not any(p.role == 'repeat-dot' for p in primitives.get(measure['id'], [])):
raise EngravingError(f'{measure["id"]}: repeat dots were omitted')
for event in index.events:
note = event.value
for source in note['pitches'] or [note]:
@@ -101,7 +85,7 @@ def audit_layout(document: dict, layout: LayoutDocument, fonts: Fonts) -> None:
if any(f.visible for f in pieces) and identifier in index.tones and index.accidentals[identifier]:
if not any(p.role == 'accidental' for p in primitives.get(identifier, [])):
raise EngravingError(f'{identifier}: required accidental was omitted')
if identifier in index.tones and (source.get('tie_to') or source.get('printed_ties')) and any(f.visible for f in pieces):
if identifier in index.tones and source.get('tie_to') and any(f.visible for f in pieces):
if not any(p.role == 'tie' for p in primitives.get(identifier, [])):
raise EngravingError(f'{identifier}: tie was omitted')
if not note.get('hidden'):
@@ -113,8 +97,6 @@ def audit_layout(document: dict, layout: LayoutDocument, fonts: Fonts) -> None:
for _, _, measure in index.measures:
for value in measure['harmonies']:
label = harmony.symbol(value)
if value.get('chord_optional'):
label = '(' + label + ')'
if not any(p.role == 'harmony' and p.value == label for p in primitives.get(value['id'], [])):
raise EngravingError(f'{value["id"]}: harmony was omitted')
for i, _ in enumerate(measure.get('tempos', [])):