paces 0.0.4__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {paces-0.0.4 → paces-0.0.6}/PKG-INFO +14 -2
- {paces-0.0.4 → paces-0.0.6}/README.md +10 -0
- {paces-0.0.4 → paces-0.0.6}/paces/__init__.py +22 -0
- paces-0.0.6/paces/derivation.py +957 -0
- paces-0.0.6/paces/excerpts.py +154 -0
- {paces-0.0.4 → paces-0.0.6}/paces/measure.py +29 -1
- {paces-0.0.4 → paces-0.0.6}/paces/model.py +12 -1
- {paces-0.0.4 → paces-0.0.6}/paces/render.py +42 -1
- {paces-0.0.4 → paces-0.0.6}/paces/tools.py +152 -1
- {paces-0.0.4 → paces-0.0.6}/pyproject.toml +27 -2
- paces-0.0.6/tests/test_derivation.py +938 -0
- paces-0.0.6/tests/test_excerpts.py +276 -0
- paces-0.0.6/tests/test_render_media.py +132 -0
- paces-0.0.6/tests/test_vertical_slice.py +224 -0
- paces-0.0.6/tests/video_synth.py +74 -0
- {paces-0.0.4 → paces-0.0.6}/.gitignore +0 -0
- {paces-0.0.4 → paces-0.0.6}/LICENSE +0 -0
- {paces-0.0.4 → paces-0.0.6}/docs/README.md +0 -0
- {paces-0.0.4 → paces-0.0.6}/docs/alignment/README.md +0 -0
- {paces-0.0.4 → paces-0.0.6}/docs/poc-reference/README.md +0 -0
- {paces-0.0.4 → paces-0.0.6}/docs/poc-reference/artifacts/clips.json +0 -0
- {paces-0.0.4 → paces-0.0.6}/paces/__main__.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/paces/edits.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/paces/projection.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/paces/segmenters.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/audio_synth.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/data/routine.json +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/poc_fixture.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/test_chapters.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/test_edits.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/test_measure.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/test_roundtrip_poc.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/test_segment.py +0 -0
- {paces-0.0.4 → paces-0.0.6}/tests/test_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: paces
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Turn instructional media into structured, interactive learning material
|
|
5
5
|
Project-URL: Homepage, https://github.com/thorwhalen/paces
|
|
6
6
|
Project-URL: Repository, https://github.com/thorwhalen/paces
|
|
@@ -20,7 +20,7 @@ Requires-Dist: argcomplete>=3; extra == 'cli'
|
|
|
20
20
|
Requires-Dist: argh>=0.30; extra == 'cli'
|
|
21
21
|
Provides-Extra: dev
|
|
22
22
|
Requires-Dist: argh>=0.30; extra == 'dev'
|
|
23
|
-
Requires-Dist: mixing[audio,beats]>=0.0.
|
|
23
|
+
Requires-Dist: mixing[audio,beats]>=0.0.39; extra == 'dev'
|
|
24
24
|
Requires-Dist: numba>=0.59; extra == 'dev'
|
|
25
25
|
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
26
26
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
@@ -28,6 +28,8 @@ Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
|
28
28
|
Provides-Extra: docs
|
|
29
29
|
Requires-Dist: sphinx-rtd-theme>=1.0; extra == 'docs'
|
|
30
30
|
Requires-Dist: sphinx>=6.0; extra == 'docs'
|
|
31
|
+
Provides-Extra: media
|
|
32
|
+
Requires-Dist: mixing>=0.0.39; extra == 'media'
|
|
31
33
|
Description-Content-Type: text/markdown
|
|
32
34
|
|
|
33
35
|
# paces
|
|
@@ -79,9 +81,18 @@ Same thing from the shell:
|
|
|
79
81
|
```bash
|
|
80
82
|
paces segment VIDEO_URL --steps steps.json --grid grid.json --output seg.json
|
|
81
83
|
paces to-document seg.json --source VIDEO_URL --title "My routine" --output document.json
|
|
84
|
+
paces suggest-excerpts document.json --output document.json # mark each block's loop window
|
|
85
|
+
paces derive document.json --media routine.mp4 # real loop clips + gifs + posters
|
|
82
86
|
paces render document.json --output page.html
|
|
83
87
|
```
|
|
84
88
|
|
|
89
|
+
`derive` (`pip install paces[media]`) cuts a loopable mp4, a palette-quality
|
|
90
|
+
gif and a poster for every excerpt-bearing span, writes them to `media/` next
|
|
91
|
+
to the document, and the practice page embeds them as looping clips. Crop
|
|
92
|
+
recipes persist in a hand-overridable `document.recipes.json` sidecar; the
|
|
93
|
+
`subject_locator=` seam (default: no crop) is where pose-based auto-crop
|
|
94
|
+
plugs in. Design record: `docs/adr/0005-media-derivation.md`.
|
|
95
|
+
|
|
85
96
|
## How it thinks
|
|
86
97
|
|
|
87
98
|
**Analysis and rendering are separate phases** with a serialisable document
|
|
@@ -111,6 +122,7 @@ content (`OpenQuestion`), and human edits are protected from regeneration
|
|
|
111
122
|
| measure the grid from the media | `segment(local_media, steps=[(name, counts), ...])` — no grid needed; tempo + structure measured, origin estimated and flagged (`pip install paces[audio]`) |
|
|
112
123
|
| protect edits from regeneration | `apply_edits(doc, patches, by="user:you")` + `merge_regenerated(committed, fresh)` |
|
|
113
124
|
| the committed artifact | `to_document(seg, ...)` → `StepDocument` |
|
|
125
|
+
| real clips/gifs/posters for the page | `derive_document(doc, media=..., doc_path=...)` / `paces derive` (`pip install paces[media]`) |
|
|
114
126
|
| a practice page | `render_html(doc)` |
|
|
115
127
|
| wall-clock times from counts | `resolve(doc)` |
|
|
116
128
|
| sanity checks | `validate_document(doc)` |
|
|
@@ -47,9 +47,18 @@ Same thing from the shell:
|
|
|
47
47
|
```bash
|
|
48
48
|
paces segment VIDEO_URL --steps steps.json --grid grid.json --output seg.json
|
|
49
49
|
paces to-document seg.json --source VIDEO_URL --title "My routine" --output document.json
|
|
50
|
+
paces suggest-excerpts document.json --output document.json # mark each block's loop window
|
|
51
|
+
paces derive document.json --media routine.mp4 # real loop clips + gifs + posters
|
|
50
52
|
paces render document.json --output page.html
|
|
51
53
|
```
|
|
52
54
|
|
|
55
|
+
`derive` (`pip install paces[media]`) cuts a loopable mp4, a palette-quality
|
|
56
|
+
gif and a poster for every excerpt-bearing span, writes them to `media/` next
|
|
57
|
+
to the document, and the practice page embeds them as looping clips. Crop
|
|
58
|
+
recipes persist in a hand-overridable `document.recipes.json` sidecar; the
|
|
59
|
+
`subject_locator=` seam (default: no crop) is where pose-based auto-crop
|
|
60
|
+
plugs in. Design record: `docs/adr/0005-media-derivation.md`.
|
|
61
|
+
|
|
53
62
|
## How it thinks
|
|
54
63
|
|
|
55
64
|
**Analysis and rendering are separate phases** with a serialisable document
|
|
@@ -79,6 +88,7 @@ content (`OpenQuestion`), and human edits are protected from regeneration
|
|
|
79
88
|
| measure the grid from the media | `segment(local_media, steps=[(name, counts), ...])` — no grid needed; tempo + structure measured, origin estimated and flagged (`pip install paces[audio]`) |
|
|
80
89
|
| protect edits from regeneration | `apply_edits(doc, patches, by="user:you")` + `merge_regenerated(committed, fresh)` |
|
|
81
90
|
| the committed artifact | `to_document(seg, ...)` → `StepDocument` |
|
|
91
|
+
| real clips/gifs/posters for the page | `derive_document(doc, media=..., doc_path=...)` / `paces derive` (`pip install paces[media]`) |
|
|
82
92
|
| a practice page | `render_html(doc)` |
|
|
83
93
|
| wall-clock times from counts | `resolve(doc)` |
|
|
84
94
|
| sanity checks | `validate_document(doc)` |
|
|
@@ -48,7 +48,18 @@ from paces.model import (
|
|
|
48
48
|
seconds_per_unit,
|
|
49
49
|
validate_document,
|
|
50
50
|
)
|
|
51
|
+
from paces.derivation import (
|
|
52
|
+
DeriveResult,
|
|
53
|
+
DirStore,
|
|
54
|
+
LocateQuery,
|
|
55
|
+
SubjectObservation,
|
|
56
|
+
check_media_requirements,
|
|
57
|
+
derive_document,
|
|
58
|
+
full_frame,
|
|
59
|
+
resolve_crop_box,
|
|
60
|
+
)
|
|
51
61
|
from paces.edits import apply_edits, merge_regenerated
|
|
62
|
+
from paces.excerpts import ExcerptResult, suggest_excerpts
|
|
52
63
|
from paces.measure import GridMeasurement, measure_grid
|
|
53
64
|
from paces.projection import to_document
|
|
54
65
|
from paces.render import render_html
|
|
@@ -91,6 +102,17 @@ __all__ = [
|
|
|
91
102
|
"measure_grid",
|
|
92
103
|
"GridMeasurement",
|
|
93
104
|
"to_document",
|
|
105
|
+
# media derivation (issue #1, ADR-0005)
|
|
106
|
+
"suggest_excerpts",
|
|
107
|
+
"ExcerptResult",
|
|
108
|
+
"derive_document",
|
|
109
|
+
"DeriveResult",
|
|
110
|
+
"DirStore",
|
|
111
|
+
"LocateQuery",
|
|
112
|
+
"SubjectObservation",
|
|
113
|
+
"full_frame",
|
|
114
|
+
"resolve_crop_box",
|
|
115
|
+
"check_media_requirements",
|
|
94
116
|
# editing & regeneration
|
|
95
117
|
"apply_edits",
|
|
96
118
|
"merge_regenerated",
|