Add <staff-details><staff-size> to API.#283
Conversation
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.8% | 28487 / 36624 |
| Functions | 74.3% | 6349 / 8550 |
| Branches | 50.6% | 22632 / 44725 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 78.4% | 6035 / 7696 |
| Functions | 63.7% | 2045 / 3210 |
| Branches | 47.7% | 5127 / 10753 |
Core HTML report | API HTML report
Commit a8b03f5357d13de4db65f779c44d1e7c600bf38f.
gen-quality
|
webern
left a comment
There was a problem hiding this comment.
Seems fine. Just eyed it and left one question.
| staffDetails.setGroup(sdg); | ||
| } | ||
|
|
||
| if (staffSize >= 0.0) |
There was a problem hiding this comment.
Is >= correct (and not >)? Is zero valid and would we want to write it?
There was a problem hiding this comment.
Good question. I'm going to assume 0 is not valid and make changes accordingly. My question is whether we should use 0.0 as the sentinel rather than a negative value.
There was a problem hiding this comment.
LLM says:
In MusicXML, is a non-negative-decimal, so 0 is schema-valid. Semantically it is odd: the element is a percentage of default staff scaling, so normal values are around 100, smaller staves might be something like 75, and 0 would mean a zero-height staff space. But because the schema allows non-negative values, the API sentinel should stay negative, and staffSize >= 0.0 is the right “specified” check.
There was a problem hiding this comment.
We could apply a stricter policy if you wish. It wouldn't bother me.
No description provided.