Conversation
gen-quality
|
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.9% | 28539 / 36619 |
| Functions | 74.4% | 6360 / 8547 |
| Branches | 50.7% | 22672 / 44725 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 68.9% | 4808 / 6976 |
| Functions | 54.8% | 1478 / 2695 |
| Branches | 40.6% | 3943 / 9702 |
Core HTML report | API HTML report
Commit 65f90d0ccb07108fa4617d5dbf91f403af20ae57.
sound element
Summary: Model the commonly-used scalar attributes of the MusicXML <sound> element in the api layer and wire them through impl so they round-trip. Previously MeasureReader::parseSound was a no-op and DirectionData carried only a "TODO - sound element", so any tempo/dynamics/segno/coda/etc. encoded on a <sound> (standalone or as a direction child) was dropped on read. - New api type api::SoundData (src/include/mx/api/SoundData.h) holding: tempo, dynamics (doubles, <0 = unspecified); dacapo, forward-repeat, pizzicato (Bool); segno, dalsegno, coda, tocoda, fine (strings, empty = unspecified). Carried on DirectionData via isSoundDataSpecified + soundData. - impl read: shared impl::readSoundData helper (SoundFunctions). A standalone <sound> is read by MeasureReader::parseSound into a sound-only DirectionData on staff 0 (isStaffValueSpecified=false); a <direction> child <sound> is read by DirectionReader into the same DirectionData. - impl write: impl::writeSoundData rebuilds core::Sound. DirectionWriter emits a standalone <sound> MusicDataChoice when the direction is sound-only, or attaches the <sound> as a child of the <direction> when other content exists. Test plan: - New src/private/mxtest/api/SoundApiTest.cpp: round-trips standalone tempo, standalone dynamics, the navigation booleans/strings, asserts the serialized XML emits a standalone <sound tempo="120"/>, and round-trips a direction-child <sound> alongside <words>. - MX_RUNNING_IN_DOCKER=1 make test (3944 assertions, 227 cases all pass), make fmt, make check (fmt-check passed), make test-api-roundtrip (1/1 pinned). Scope note: Nested child elements of <sound> (<midi-instrument>, <midi-device>, <play>, <swing>, <offset>) and the less-common scalar attributes (divisions, time-only, pan, elevation, damper/soft/sostenuto-pedal, id) are intentionally not modeled; the focus is the high-value playback/navigation attributes. No new corpus roundtrip-baseline entry: discovery shows the ~141 wild <sound> files still fail the strict DOM compare on unrelated subset gaps, so unit tests are the coverage.
gen-quality
|
sound element
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.9% | 28539 / 36620 |
| Functions | 74.4% | 6360 / 8548 |
| Branches | 50.7% | 22672 / 44725 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 70.6% | 5072 / 7183 |
| Functions | 56.4% | 1606 / 2846 |
| Branches | 42.1% | 4222 / 10019 |
Core HTML report | API HTML report
Commit e60a63c3534a44ccd15291e0b661233e9a629013.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses audit section 2.3. `MeasureReader::parseSound` was a no-op; any tempo, dynamics, or
navigation encoded on a standalone `` was dropped on read.
New `api::SoundData` type (carried on `DirectionData` via `isSoundDataSpecified` +
`soundData`) round-trips the high-value scalar attributes: `tempo`, `dynamics` (doubles,
<0 = unspecified), `dacapo`/`forward-repeat`/`pizzicato` (Bool), and
`segno`/`dalsegno`/`coda`/`tocoda`/`fine` (string, empty = unspecified).
A standalone `` within a measure reads into a sound-only `DirectionData` on staff 0;
a `` child `` reads via `DirectionReader`. `DirectionWriter` emits the
right form in each case. Shared `readSoundData`/`writeSoundData` helpers in
`SoundFunctions.{h,cpp}`.
Scoped out: nested children (``, ``, ``, ``) and
less-common scalars (`pan`, `elevation`, `divisions`, pedals, `id`).
Testing
attributes, serialized XML spot-check (``), direction-child sound + words
References
mx/apilayer. #159 (parent tracker)