Skip to content

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

test(video-loop): the six cuts without the handle pinned to their pictures as decoded, the held-fill pins tests/picture_digest.py holds on every machine

Soohong Kim524d0a00e8f9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index de6159a..4ab4745 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,7 +11,7 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the
- **New: `video-loop --cycle once --start S --length L`** plays exactly those frames once (`terminal.kind: given`): a move cut out of a longer motion that settles on no pose, such as a vault in a run. Before, a single-play cut refused `--start` and `--length`.
- Python callers: `sprite_gen.video.root_motion` (`parse_retime`, `parse_contacts`, `clip_floor`, `root`, `touching`, `reading`, `read`, `sidecar`, `said`, `apex`, `retime`, `public`); `held_fill.at_times` (a cell at each given time, taken out of `upsample`); `qa.motion.centroid` and `qa.motion.contact_spans` (were `_contact_spans`); `nonloop.on_floor`, `nonloop.GROUND_PX`, `nonloop.given_ending`; `loop.run_loop(..., air_retime=, meters_per_px=, contacts=)`; `batch.run_set(..., air_retime=, meters_per_px=)`.
- **Docs**: [video-pipeline.md](docs/video-pipeline.md) section 4, "Root motion" (the keys, how a game reads `root`, the mass centre and not a body part, `--cycle once --start --length`, the air retimed, what it takes from sprite-gen); `SKILL.md` (tell the user each air's seconds and apex).
-- **Tests**: `tests/video/test_root_motion.py` with `tests/video/jump_inputs.py` (a synthetic jump whose mass centre flies a parabola under a known gravity: the root read within half a pixel, the air's cells, seconds and apex, the ground and a named hand contact; the air doubled peaks at g T²/8 with twice its cells, every cell on the parabola, none shown again, the take-off and the ground before it byte for byte, the landing moved along whole, and through real RIFE (`real_rife`) every between made and judged; the air alone keeps the clip's gravity; no RIFE cut as filmed with the motion named; the six cuts `tests/video/test_held_fill.py` pins keep their bytes and their metadata but the new key; the refusals; `video-set` hands the handle on).
+- **Tests**: `tests/video/test_root_motion.py` with `tests/video/jump_inputs.py` (a synthetic jump whose mass centre flies a parabola under a known gravity: the root read within half a pixel, the air's cells, seconds and apex, the ground and a named hand contact; the air doubled peaks at g T²/8 with twice its cells, every cell on the parabola, none shown again, the take-off and the ground before it byte for byte, the landing moved along whole, and through real RIFE (`real_rife`) every between made and judged; the air alone keeps the clip's gravity; no RIFE cut as filmed with the motion named; the six cuts `tests/video/test_held_fill.py` pins keep their pictures as decoded (`tests/picture_digest.py`) and every metadata value but the new key, the keyed clip's file sha read against the run's own files; the refusals; `video-set` hands the handle on).
## v3.9.0 - Provider address environment variables, subscription logins off, and the capabilities verb
diff --git a/tests/video/test_root_motion.py b/tests/video/test_root_motion.py
index e96dac1..e94e78a 100644
--- a/tests/video/test_root_motion.py
+++ b/tests/video/test_root_motion.py
@@ -3,7 +3,7 @@
where its body is in each cell (the mass centre), what each cell touches and its air, in the strip sidecar; with
`--air-retime` the air is given a length, a gravity and a speed of its own, its cells made between the clip's frames
(held_fill.at_times), the take-off and the landing as filmed and the contacts where they were. Without the handle the
-cut is delivered byte for byte as before and its sidecar only grows a key.
+cut is the same pictures as before (tests/picture_digest.py) and its sidecar only grows a key.
The jump is synthetic (tests/video/jump_inputs.py), its mass centre on a parabola under a known gravity; the
interpolator is the stand-in that draws it again at the time asked for (`Between`)."""
@@ -24,7 +24,7 @@ from sprite_gen.video import nonloop
from sprite_gen.video import root_motion as rm
from tests.video import jump_inputs as J
from tests.video.held_fill_inputs import Between
-from tests.video.test_held_fill import UNHELD, _bytes, _no_rife
+from tests.video.test_held_fill import UNHELD, _no_rife, _pictures
def _run(tmp_path: Path, frames: list[Image.Image], name: str = "j", **kw) -> dict:
@@ -234,13 +234,13 @@ SIDECARS = {
@pytest.mark.parametrize("case", sorted(UNHELD))
-def test_without_the_handle_the_cut_is_byte_for_byte_as_before_and_its_sidecar_only_grows(case, tmp_path, monkeypatch):
+def test_without_the_handle_the_cut_is_the_same_pictures_as_before_and_its_sidecar_only_grows(case, tmp_path, monkeypatch):
_no_rife(monkeypatch, tmp_path)
frames, kw, pinned = UNHELD[case]
keyed = J.save(frames(), tmp_path / f"{case}-keyed")
rep = loop_mod.run_loop(keyed, tmp_path / f"{case}-out", fps=24.0, min_len=None, max_len=None, n_out=None,
seam_max=loop_mod.SEAM_RATIO_MAX, name=case, report_path=None, **kw)
- assert _bytes(Path(rep["out_dir"]), case) == pinned
+ assert _pictures(Path(rep["out_dir"]), case) == pinned
meta = _meta(rep)
grown = meta.pop("root_motion", None)
source = meta["source_cut"]["source"]