Repository navigation
Copy #621's units.py into tilia_core.timemap again, after its four fixes - #743
Conversation
azfoo
left a comment
There was a problem hiding this comment.
🤖 Claude
Checked against #621 (beat units and time signatures) at 0ee8ea45: no problems found.
- The copy.
units.pyhere and #621'stilia/timelines/beat/units.pyat0ee8ea45, its branch's head, are the same blob (537e3be). - The ported tests are #621's new and changed cases, case for case: the two long-unit messages and
TestMeasureMeter. #621's other test changes are about the app's ownbeat_unit_id, which the core's tests already check as a beat id. - The guarantees table reproduces exactly: 1, 1 and 3 failing tests, and 676 passed again once restored.
- With #736 (time signatures in the measure table), merged since this branch was cut: the commit applies cleanly on today's
v1-prerelease, and 741 tests pass, the shared examples included. So a rebase merge needs no new push. - #621's quarter stamps and meters didn't change with these fixes: re-running the script in #736's description against #621 at
0ee8ea45gives the same expected values for all 18 shared examples. - CI is green on all three systems.
Copied from tilia/timelines/beat/units.py (desktop#621 at 0ee8ea4), unchanged: the file is the same blob as there. Since 07cb6d4: beat_unit_id is the id of the beat that carries the governing unit, in the app as in the core, with one docstring; a unit longer than MAX_UNIT_LENGTH is refused as too long, not as not a number; MeasureMeter turns units and beat_values into tuples itself; and quarter_length makes only an int a Fraction. The new and changed cases of #621's tests are ported. Part of TimeLineAnnotator/project-management#247 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1a51aa8 to
c20fecc
Compare
Copied from tilia/timelines/beat/units.py (desktop#621 at e5da86a), unchanged: the file is the same blob as there (2ef3be7). Since 0ee8ea4, the commit copied before, parse_units refuses a fraction whose denominator, in lowest terms, is above MAX_DENOMINATOR (128), with the message of any unreadable unit. Whole numbers are unchanged. Sums of units, such as a row's ts_numerator and the running quarter stamps of #747 (quarter stamps), then have denominators that divide one fixed number, where units such as 1/(10**29 + i) made them grow without limit. The new cases of #621's tests are ported. Part of TimeLineAnnotator/project-management#247 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Claude
What changed in #621 since Tests.
Runs:
Guarantee. With the new check neutralised in the core's copy, 4 tests fail: the 4 refusals. The other 7 new cases pass either way. I restored it after the run. Checked on #747 (quarter stamps), in a throwaway checkout of its head
Part of TimeLineAnnotator/project-management#247 |
🤖 Claude
Copies #621 (beat units and time signatures)'s
units.pyintotilia_core.timemapagain, after four more changes there. #732 (copyunits.pyagain) made the previous copy.tilia_core/timemap/units.pyis feat: beat patterns, beat units, time signatures and quarter stamps #621'stilia/timelines/beat/units.pyat0ee8ea45, unchanged: the same git blob (537e3be). Since07cb6d4f, the commit Copy #621's units.py into tilia_core.timemap again #732 copied, feat: beat patterns, beat units, time signatures and quarter stamps #621 has made four changes:beat_unit_idis the id of the beat that carries the governing unit in the app too, so the field has one meaning in both copies and one docstring. The core'smeters_ofalready gave beat ids, so nothing else here changes.MAX_UNIT_LENGTHis refused with "'1111…' is longer than 32 characters.", instead of "is not a whole number or fraction".MeasureMeterturnsunitsandbeat_valuesinto tuples itself, so a meter built from lists can be hashed too.quarter_lengthmakes only anintaFraction;Fraction()would also have read text and floats.Tests
test_timemap_units.pyports feat: beat patterns, beat units, time signatures and quarter stamps #621's changed and new cases:TestMeasureMeter: a meter built from lists holds tuples and hashes like one built from tuples, andquarter_length("1/2")raisesTypeError.uv run --package tilia-core pytest packages/tilia-core -q: 796 passed, 21 skipped, 8 xfailed, onv1-prereleaseas of 2026-10-19.python scripts/check_packages.pypasses. black and ruff are clean.Guarantees. I neutralised the code behind each one, ran the suite, then restored it:
__post_init__'s bodyquarter_lengthreads no textFraction()for anythingPart of TimeLineAnnotator/project-management#247
🤖 Generated with Claude Code