kinemotion 0.9.0__tar.gz → 0.10.1__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.
Potentially problematic release.
This version of kinemotion might be problematic. Click here for more details.
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.gitignore +3 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.pre-commit-config.yaml +19 -5
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.tool-versions +1 -1
- {kinemotion-0.9.0 → kinemotion-0.10.1}/CHANGELOG.md +33 -11
- {kinemotion-0.9.0 → kinemotion-0.10.1}/CLAUDE.md +197 -22
- {kinemotion-0.9.0 → kinemotion-0.10.1}/CODE_OF_CONDUCT.md +15 -15
- {kinemotion-0.9.0 → kinemotion-0.10.1}/CONTRIBUTING.md +29 -17
- {kinemotion-0.9.0 → kinemotion-0.10.1}/GEMINI.md +17 -17
- {kinemotion-0.9.0 → kinemotion-0.10.1}/PKG-INFO +165 -29
- {kinemotion-0.9.0 → kinemotion-0.10.1}/README.md +164 -28
- {kinemotion-0.9.0 → kinemotion-0.10.1}/SECURITY.md +1 -1
- kinemotion-0.10.1/docs/BULK_PROCESSING.md +932 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/docs/ERRORS_FINDINGS.md +22 -22
- {kinemotion-0.9.0 → kinemotion-0.10.1}/docs/FRAMERATE.md +11 -10
- {kinemotion-0.9.0 → kinemotion-0.10.1}/docs/IMU_METADATA_PRESERVATION.md +17 -17
- {kinemotion-0.9.0 → kinemotion-0.10.1}/docs/PARAMETERS.md +67 -13
- {kinemotion-0.9.0 → kinemotion-0.10.1}/docs/VALIDATION_PLAN.md +90 -82
- {kinemotion-0.9.0 → kinemotion-0.10.1}/examples/bulk/README.md +1 -1
- kinemotion-0.10.1/examples/bulk/bulk_processing.py +326 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/examples/bulk/simple_example.py +4 -7
- {kinemotion-0.9.0 → kinemotion-0.10.1}/pyproject.toml +42 -24
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/core/filtering.py +3 -3
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/core/pose.py +0 -1
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/core/smoothing.py +2 -2
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/dropjump/cli.py +328 -6
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/dropjump/debug_overlay.py +1 -1
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/dropjump/kinematics.py +10 -4
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_adaptive_threshold.py +4 -1
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_api.py +2 -2
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_com_estimation.py +2 -2
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_filtering.py +4 -3
- {kinemotion-0.9.0 → kinemotion-0.10.1}/uv.lock +16 -36
- kinemotion-0.9.0/examples/bulk/bulk_processing.py +0 -286
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.dockerignore +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.github/pull_request_template.md +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/.github/workflows/release.yml +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/Dockerfile +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/LICENSE +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/examples/programmatic_usage.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/__init__.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/api.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/cli.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/core/__init__.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/core/auto_tuning.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/core/video_io.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/dropjump/__init__.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/dropjump/analysis.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/src/kinemotion/py.typed +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/__init__.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_aspect_ratio.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_contact_detection.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_kinematics.py +0 -0
- {kinemotion-0.9.0 → kinemotion-0.10.1}/tests/test_polyorder.py +0 -0
|
@@ -25,10 +25,24 @@ repos:
|
|
|
25
25
|
- id: ruff
|
|
26
26
|
args: [--fix, --exit-non-zero-on-fix]
|
|
27
27
|
|
|
28
|
-
- repo: https://github.com/
|
|
29
|
-
rev: v1.
|
|
28
|
+
- repo: https://github.com/RobertCraigie/pyright-python
|
|
29
|
+
rev: v1.1.407
|
|
30
30
|
hooks:
|
|
31
|
-
- id:
|
|
32
|
-
args: [--ignore-missing-imports, --no-strict-optional]
|
|
31
|
+
- id: pyright
|
|
33
32
|
files: ^src/
|
|
34
|
-
|
|
33
|
+
# Pyright reads configuration from pyproject.toml automatically
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/executablebooks/mdformat
|
|
36
|
+
rev: 0.7.17
|
|
37
|
+
hooks:
|
|
38
|
+
- id: mdformat
|
|
39
|
+
additional_dependencies:
|
|
40
|
+
- mdformat-gfm>=0.3.5 # GitHub Flavored Markdown
|
|
41
|
+
- mdformat-tables # Table formatting
|
|
42
|
+
exclude: ^CLAUDE\.md$
|
|
43
|
+
|
|
44
|
+
- repo: https://github.com/compilerla/conventional-pre-commit
|
|
45
|
+
rev: v4.3.0
|
|
46
|
+
hooks:
|
|
47
|
+
- id: conventional-pre-commit
|
|
48
|
+
stages: [commit-msg]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
uv 0.
|
|
1
|
+
uv 0.9.7
|
|
2
2
|
python 3.12.7
|
|
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
<!-- version list -->
|
|
9
9
|
|
|
10
|
+
## v0.10.1 (2025-11-03)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Resolve SonarCloud code quality issues
|
|
15
|
+
([`73f7784`](https://github.com/feniix/kinemotion/commit/73f778491bc01bfed973421fe5261364f8540147))
|
|
16
|
+
|
|
17
|
+
### Build System
|
|
18
|
+
|
|
19
|
+
- Add style checker for commit messages
|
|
20
|
+
([`d25669b`](https://github.com/feniix/kinemotion/commit/d25669bdf17810a38a86fbd9b03e208ea14f5326))
|
|
21
|
+
|
|
22
|
+
- Migrate from mypy to pyright for type checking
|
|
23
|
+
([`521b526`](https://github.com/feniix/kinemotion/commit/521b52619553bb5b3ee61e0db4ff6fd06744ac7a))
|
|
24
|
+
|
|
25
|
+
### Documentation
|
|
26
|
+
|
|
27
|
+
- Install precommit hook for improving markdown
|
|
28
|
+
([`546164b`](https://github.com/feniix/kinemotion/commit/546164b9f68cf3222da9753fdd2f2cd272ead90f))
|
|
29
|
+
|
|
30
|
+
- Update documentation for batch processing and Python API
|
|
31
|
+
([`f0fa8b6`](https://github.com/feniix/kinemotion/commit/f0fa8b69b927ff4a2e7f15bac242374592fe0eb9))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## v0.10.0 (2025-11-02)
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
- Add batch processing mode to CLI
|
|
39
|
+
([`b0ab3c6`](https://github.com/feniix/kinemotion/commit/b0ab3c6b37a013402ff7a89305a68e49549eeae3))
|
|
40
|
+
|
|
10
41
|
## v0.9.0 (2025-11-02)
|
|
11
42
|
|
|
12
43
|
### Features
|
|
@@ -14,7 +45,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
45
|
- Add programmatic API for bulk video processing
|
|
15
46
|
([`213de56`](https://github.com/feniix/kinemotion/commit/213de564fda96b461807dbefa2795e037a5edc94))
|
|
16
47
|
|
|
17
|
-
|
|
18
48
|
## v0.8.3 (2025-11-02)
|
|
19
49
|
|
|
20
50
|
### Bug Fixes
|
|
@@ -27,7 +57,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
27
57
|
- Update repository metadata for GHCR package description
|
|
28
58
|
([`4779355`](https://github.com/feniix/kinemotion/commit/4779355901a407514d83cf2aa82f55fa083e7e63))
|
|
29
59
|
|
|
30
|
-
|
|
31
60
|
## v0.8.2 (2025-11-02)
|
|
32
61
|
|
|
33
62
|
### Bug Fixes
|
|
@@ -35,7 +64,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
35
64
|
- Add OCI annotations to Docker manifest for GHCR metadata
|
|
36
65
|
([`c6e2295`](https://github.com/feniix/kinemotion/commit/c6e2295dd5eb3eae6b820d3dc7a84d730772de41))
|
|
37
66
|
|
|
38
|
-
|
|
39
67
|
## v0.8.1 (2025-11-02)
|
|
40
68
|
|
|
41
69
|
### Bug Fixes
|
|
@@ -43,7 +71,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
43
71
|
- Add OCI-compliant labels to Docker image
|
|
44
72
|
([`6b18b33`](https://github.com/feniix/kinemotion/commit/6b18b33538615048c8ea572c4ebc402160ee1c5e))
|
|
45
73
|
|
|
46
|
-
|
|
47
74
|
## v0.8.0 (2025-11-02)
|
|
48
75
|
|
|
49
76
|
### Features
|
|
@@ -51,7 +78,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
51
78
|
- Add Docker support and GitHub Container Registry publishing
|
|
52
79
|
([`249ca4c`](https://github.com/feniix/kinemotion/commit/249ca4c0c0ab40cda5acfebac012db8075b9694f))
|
|
53
80
|
|
|
54
|
-
|
|
55
81
|
## v0.7.1 (2025-11-01)
|
|
56
82
|
|
|
57
83
|
### Bug Fixes
|
|
@@ -59,7 +85,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
59
85
|
- Update documentation for auto-tuning system
|
|
60
86
|
([`6c1a135`](https://github.com/feniix/kinemotion/commit/6c1a135acf5cce7a627644dbc6393460277906ad))
|
|
61
87
|
|
|
62
|
-
|
|
63
88
|
## v0.7.0 (2025-11-01)
|
|
64
89
|
|
|
65
90
|
### Features
|
|
@@ -67,7 +92,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
67
92
|
- Add intelligent auto-tuning and video rotation handling
|
|
68
93
|
([`7b35f67`](https://github.com/feniix/kinemotion/commit/7b35f6790dd8b6714f3e42389555107a043d486c))
|
|
69
94
|
|
|
70
|
-
|
|
71
95
|
## v0.6.4 (2025-10-26)
|
|
72
96
|
|
|
73
97
|
### Bug Fixes
|
|
@@ -75,7 +99,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
75
99
|
- Project urls
|
|
76
100
|
([`c7b5914`](https://github.com/feniix/kinemotion/commit/c7b5914d3516e0f59dcf88ac81f99ffe94edb706))
|
|
77
101
|
|
|
78
|
-
|
|
79
102
|
## v0.6.3 (2025-10-26)
|
|
80
103
|
|
|
81
104
|
### Bug Fixes
|
|
@@ -83,7 +106,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
83
106
|
- Changelog markdown
|
|
84
107
|
([`976de66`](https://github.com/feniix/kinemotion/commit/976de66b2a964b83240a559ea097cb74f5e1a537))
|
|
85
108
|
|
|
86
|
-
|
|
87
109
|
## v0.6.2 (2025-10-26)
|
|
88
110
|
|
|
89
111
|
### Bug Fixes
|
|
@@ -91,7 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
91
113
|
- Add semantic-release insertion flag to CHANGELOG.md
|
|
92
114
|
([`93f3a28`](https://github.com/feniix/kinemotion/commit/93f3a28c750bdb70b2a57f9b0c1910b105753980))
|
|
93
115
|
|
|
94
|
-
## [Unreleased]
|
|
116
|
+
## \[Unreleased\]
|
|
95
117
|
|
|
96
118
|
### Added
|
|
97
119
|
|
|
@@ -117,7 +139,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
117
139
|
|
|
118
140
|
- Your security fix here.
|
|
119
141
|
|
|
120
|
-
## [0.5.0] - 2025-10-26
|
|
142
|
+
## \[0.5.0\] - 2025-10-26
|
|
121
143
|
|
|
122
144
|
### Added
|
|
123
145
|
|
|
@@ -30,7 +30,7 @@ Managed with `uv` and `asdf`:
|
|
|
30
30
|
- pytest: Testing framework
|
|
31
31
|
- black: Code formatting
|
|
32
32
|
- ruff: Fast Python linter
|
|
33
|
-
-
|
|
33
|
+
- pyright: Static type checking
|
|
34
34
|
|
|
35
35
|
### Development Commands
|
|
36
36
|
|
|
@@ -41,8 +41,8 @@ Managed with `uv` and `asdf`:
|
|
|
41
41
|
- **Format code**: `uv run black src/`
|
|
42
42
|
- **Lint code**: `uv run ruff check`
|
|
43
43
|
- **Auto-fix lint issues**: `uv run ruff check --fix`
|
|
44
|
-
- **Type check**: `uv run
|
|
45
|
-
- **Run all checks**: `uv run ruff check && uv run
|
|
44
|
+
- **Type check**: `uv run pyright`
|
|
45
|
+
- **Run all checks**: `uv run ruff check && uv run pyright && uv run pytest`
|
|
46
46
|
|
|
47
47
|
## Architecture
|
|
48
48
|
|
|
@@ -50,29 +50,41 @@ Managed with `uv` and `asdf`:
|
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
52
|
src/kinemotion/
|
|
53
|
-
├── __init__.py
|
|
53
|
+
├── __init__.py # Public API exports
|
|
54
|
+
├── api.py # Python library API (process_video, process_videos_bulk)
|
|
55
|
+
├── py.typed # PEP 561 type marker
|
|
54
56
|
├── cli.py # Main CLI entry point (registers subcommands)
|
|
55
57
|
├── core/ # Shared functionality across all jump types
|
|
56
58
|
│ ├── __init__.py
|
|
57
59
|
│ ├── pose.py # MediaPipe Pose integration + CoM
|
|
58
60
|
│ ├── smoothing.py # Savitzky-Golay landmark smoothing
|
|
59
61
|
│ ├── filtering.py # Outlier rejection + bilateral filtering
|
|
62
|
+
│ ├── auto_tuning.py # Intelligent parameter auto-tuning
|
|
60
63
|
│ └── video_io.py # Video processing (VideoProcessor class)
|
|
61
64
|
└── dropjump/ # Drop jump specific analysis
|
|
62
65
|
├── __init__.py
|
|
63
|
-
├── cli.py # Drop jump CLI command (dropjump-analyze)
|
|
66
|
+
├── cli.py # Drop jump CLI command (dropjump-analyze) + batch mode
|
|
64
67
|
├── analysis.py # Ground contact state detection
|
|
65
68
|
├── kinematics.py # Drop jump metrics calculations
|
|
66
69
|
└── debug_overlay.py # Debug video overlay rendering
|
|
67
70
|
|
|
68
71
|
tests/
|
|
69
|
-
├── test_adaptive_threshold.py # Adaptive threshold tests
|
|
70
|
-
├──
|
|
71
|
-
├──
|
|
72
|
-
├──
|
|
73
|
-
├──
|
|
74
|
-
├──
|
|
75
|
-
|
|
72
|
+
├── test_adaptive_threshold.py # Adaptive threshold tests (10 tests)
|
|
73
|
+
├── test_api.py # API module tests (14 tests)
|
|
74
|
+
├── test_aspect_ratio.py # Aspect ratio preservation tests (4 tests)
|
|
75
|
+
├── test_com_estimation.py # Center of mass estimation tests (6 tests)
|
|
76
|
+
├── test_contact_detection.py # Contact detection unit tests (3 tests)
|
|
77
|
+
├── test_filtering.py # Advanced filtering tests (17 tests)
|
|
78
|
+
├── test_kinematics.py # Metrics calculation tests (2 tests)
|
|
79
|
+
└── test_polyorder.py # Polynomial order tests (5 tests)
|
|
80
|
+
# Total: 61 tests
|
|
81
|
+
|
|
82
|
+
examples/
|
|
83
|
+
├── bulk/ # Bulk processing examples
|
|
84
|
+
│ ├── README.md # Comprehensive API documentation
|
|
85
|
+
│ ├── bulk_processing.py # Advanced bulk processing examples
|
|
86
|
+
│ └── simple_example.py # Quick start examples
|
|
87
|
+
└── programmatic_usage.py # Low-level API example
|
|
76
88
|
|
|
77
89
|
docs/
|
|
78
90
|
├── PARAMETERS.md # Comprehensive guide to all CLI parameters
|
|
@@ -91,10 +103,21 @@ docs/
|
|
|
91
103
|
**CLI Architecture:**
|
|
92
104
|
|
|
93
105
|
- `src/kinemotion/cli.py` (20 lines): Main CLI group + command registration
|
|
94
|
-
- `src/kinemotion/dropjump/cli.py` (
|
|
106
|
+
- `src/kinemotion/dropjump/cli.py` (724 lines): Complete dropjump-analyze command with batch mode
|
|
107
|
+
- `src/kinemotion/api.py` (428 lines): Python library API for programmatic usage
|
|
95
108
|
- Commands registered using Click's `cli.add_command()` pattern
|
|
96
109
|
- Modular design allows easy addition of new jump type analysis commands
|
|
97
110
|
|
|
111
|
+
**API Architecture:**
|
|
112
|
+
|
|
113
|
+
- `src/kinemotion/api.py`: Public API for library usage
|
|
114
|
+
- `process_video()`: Process single videos programmatically
|
|
115
|
+
- `process_videos_bulk()`: Parallel batch processing with ProcessPoolExecutor
|
|
116
|
+
- `VideoConfig`: Configuration dataclass for video processing
|
|
117
|
+
- `VideoResult`: Result dataclass with success/error handling
|
|
118
|
+
- Fully typed with PEP 561 compliance (py.typed marker)
|
|
119
|
+
- Used by both CLI batch mode and external library consumers
|
|
120
|
+
|
|
98
121
|
### Analysis Pipeline
|
|
99
122
|
|
|
100
123
|
1. **Pose Tracking** (core/pose.py): MediaPipe extracts body landmarks from each frame
|
|
@@ -149,16 +172,17 @@ docs/
|
|
|
149
172
|
|
|
150
173
|
The codebase enforces strict code quality standards using multiple tools:
|
|
151
174
|
|
|
152
|
-
### Type Checking with
|
|
175
|
+
### Type Checking with pyright
|
|
153
176
|
|
|
154
177
|
- **Strict mode enabled**: All functions require type annotations
|
|
155
|
-
- Configuration in `pyproject.toml` under `[tool.
|
|
178
|
+
- Configuration in `pyproject.toml` under `[tool.pyright]`
|
|
156
179
|
- Key settings:
|
|
157
|
-
- `
|
|
158
|
-
- `
|
|
159
|
-
- `
|
|
160
|
-
-
|
|
161
|
-
-
|
|
180
|
+
- `typeCheckingMode: "strict"`: Enables strict type checking (equivalent to mypy's disallow_untyped_defs and related flags)
|
|
181
|
+
- `pythonVersion: "3.10"`: Target Python version
|
|
182
|
+
- `include: ["src"]`: Only check source files, exclude tests and examples
|
|
183
|
+
- `reportMissingImports: "none"`: Ignore missing stubs for cv2, mediapipe, scipy
|
|
184
|
+
- Additional warnings for unused imports, variables, and functions
|
|
185
|
+
- Run with: `uv run pyright`
|
|
162
186
|
|
|
163
187
|
### Linting with ruff
|
|
164
188
|
|
|
@@ -187,7 +211,7 @@ uv run black src/
|
|
|
187
211
|
uv run ruff check --fix
|
|
188
212
|
|
|
189
213
|
# Type check
|
|
190
|
-
uv run
|
|
214
|
+
uv run pyright
|
|
191
215
|
|
|
192
216
|
# Run tests
|
|
193
217
|
uv run pytest
|
|
@@ -196,7 +220,55 @@ uv run pytest
|
|
|
196
220
|
Or run all checks at once:
|
|
197
221
|
|
|
198
222
|
```bash
|
|
199
|
-
uv run ruff check && uv run
|
|
223
|
+
uv run ruff check && uv run pyright && uv run pytest
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Commit Message Format
|
|
227
|
+
|
|
228
|
+
**IMPORTANT**: All commit messages must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
|
|
229
|
+
|
|
230
|
+
The commit message format is enforced by the `conventional-pre-commit` hook and is required for semantic versioning with `python-semantic-release`.
|
|
231
|
+
|
|
232
|
+
**Format:**
|
|
233
|
+
```
|
|
234
|
+
<type>(<optional scope>): <description>
|
|
235
|
+
|
|
236
|
+
[optional body]
|
|
237
|
+
|
|
238
|
+
[optional footer(s)]
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Allowed types** (from `pyproject.toml`):
|
|
242
|
+
- `feat`: A new feature (triggers minor version bump)
|
|
243
|
+
- `fix`: A bug fix (triggers patch version bump)
|
|
244
|
+
- `perf`: Performance improvement (triggers patch version bump)
|
|
245
|
+
- `docs`: Documentation only changes
|
|
246
|
+
- `style`: Code style changes (formatting, whitespace)
|
|
247
|
+
- `refactor`: Code refactoring (no functional changes)
|
|
248
|
+
- `test`: Adding or updating tests
|
|
249
|
+
- `chore`: Maintenance tasks, dependency updates
|
|
250
|
+
- `build`: Build system or dependency changes
|
|
251
|
+
- `ci`: CI/CD pipeline changes
|
|
252
|
+
|
|
253
|
+
**Examples:**
|
|
254
|
+
```bash
|
|
255
|
+
feat: Add batch processing mode to CLI
|
|
256
|
+
fix: Correct aspect ratio handling for portrait videos
|
|
257
|
+
docs: Update README with auto-tuning examples
|
|
258
|
+
refactor: Extract video rotation logic into separate method
|
|
259
|
+
perf: Optimize pose tracking with caching
|
|
260
|
+
test: Add tests for CoM estimation edge cases
|
|
261
|
+
chore(release): 0.10.0 [skip ci]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Breaking changes:**
|
|
265
|
+
Use `!` after type/scope or add `BREAKING CHANGE:` in footer:
|
|
266
|
+
```bash
|
|
267
|
+
feat!: Change API signature for process_video
|
|
268
|
+
# or
|
|
269
|
+
feat: Change API signature for process_video
|
|
270
|
+
|
|
271
|
+
BREAKING CHANGE: drop_height parameter is now required
|
|
200
272
|
```
|
|
201
273
|
|
|
202
274
|
## Critical Implementation Details
|
|
@@ -815,6 +887,109 @@ uv run kinemotion dropjump-analyze low_quality.mp4 --drop-height 0.40
|
|
|
815
887
|
uv run kinemotion dropjump-analyze high_quality.mp4 --drop-height 0.40
|
|
816
888
|
```
|
|
817
889
|
|
|
890
|
+
### Batch Processing (CLI)
|
|
891
|
+
|
|
892
|
+
Process multiple videos in parallel from the command line:
|
|
893
|
+
|
|
894
|
+
```bash
|
|
895
|
+
# Batch mode with glob pattern
|
|
896
|
+
uv run kinemotion dropjump-analyze videos/*.mp4 --batch --drop-height 0.40 --workers 4
|
|
897
|
+
|
|
898
|
+
# Save all results to directories
|
|
899
|
+
uv run kinemotion dropjump-analyze videos/*.mp4 --batch --drop-height 0.40 \
|
|
900
|
+
--json-output-dir results/ \
|
|
901
|
+
--output-dir debug_videos/ \
|
|
902
|
+
--csv-summary summary.csv
|
|
903
|
+
|
|
904
|
+
# Multiple explicit paths (batch mode auto-enabled)
|
|
905
|
+
uv run kinemotion dropjump-analyze video1.mp4 video2.mp4 video3.mp4 --drop-height 0.40
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
**Batch options:**
|
|
909
|
+
- `--batch`: Explicitly enable batch mode
|
|
910
|
+
- `--workers <int>`: Number of parallel workers (default: 4)
|
|
911
|
+
- `--output-dir <path>`: Directory for debug videos (auto-named per video)
|
|
912
|
+
- `--json-output-dir <path>`: Directory for JSON metrics (auto-named per video)
|
|
913
|
+
- `--csv-summary <path>`: Export aggregated results to CSV
|
|
914
|
+
|
|
915
|
+
## Using Kinemotion as a Library
|
|
916
|
+
|
|
917
|
+
The kinemotion package provides a Python API for programmatic use in automated pipelines and custom analysis tools.
|
|
918
|
+
|
|
919
|
+
### Quick Start (Python API)
|
|
920
|
+
|
|
921
|
+
```python
|
|
922
|
+
from kinemotion import process_video
|
|
923
|
+
|
|
924
|
+
# Process a single video
|
|
925
|
+
metrics = process_video(
|
|
926
|
+
video_path="athlete_jump.mp4",
|
|
927
|
+
drop_height=0.40, # 40cm drop box
|
|
928
|
+
quality="balanced",
|
|
929
|
+
verbose=True
|
|
930
|
+
)
|
|
931
|
+
|
|
932
|
+
# Access results
|
|
933
|
+
print(f"Jump height: {metrics.jump_height:.3f} m")
|
|
934
|
+
print(f"Ground contact time: {metrics.ground_contact_time * 1000:.1f} ms")
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
### Bulk Processing (Python API)
|
|
938
|
+
|
|
939
|
+
```python
|
|
940
|
+
from kinemotion import VideoConfig, process_videos_bulk
|
|
941
|
+
|
|
942
|
+
# Configure multiple videos
|
|
943
|
+
configs = [
|
|
944
|
+
VideoConfig("video1.mp4", drop_height=0.40),
|
|
945
|
+
VideoConfig("video2.mp4", drop_height=0.30, quality="accurate"),
|
|
946
|
+
VideoConfig("video3.mp4", drop_height=0.50, output_video="debug3.mp4"),
|
|
947
|
+
]
|
|
948
|
+
|
|
949
|
+
# Process in parallel with 4 workers
|
|
950
|
+
results = process_videos_bulk(configs, max_workers=4)
|
|
951
|
+
|
|
952
|
+
# Check results
|
|
953
|
+
for result in results:
|
|
954
|
+
if result.success:
|
|
955
|
+
print(f"✓ {result.video_path}: {result.metrics.jump_height:.3f} m")
|
|
956
|
+
else:
|
|
957
|
+
print(f"✗ {result.video_path}: {result.error}")
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
### API Documentation
|
|
961
|
+
|
|
962
|
+
See `examples/bulk/README.md` for comprehensive API documentation including:
|
|
963
|
+
- Complete API reference
|
|
964
|
+
- Common use cases (directory processing, CSV export, custom parameters)
|
|
965
|
+
- Integration examples (Pandas, custom CLI)
|
|
966
|
+
- Performance tips
|
|
967
|
+
- Error handling patterns
|
|
968
|
+
|
|
969
|
+
**Key API Functions:**
|
|
970
|
+
|
|
971
|
+
- `process_video(video_path, drop_height, **kwargs) -> DropJumpMetrics`
|
|
972
|
+
- Process a single video programmatically
|
|
973
|
+
- Returns metrics object with all analysis results
|
|
974
|
+
- Raises FileNotFoundError or ValueError on errors
|
|
975
|
+
|
|
976
|
+
- `process_videos_bulk(configs, max_workers=4, progress_callback=None) -> list[VideoResult]`
|
|
977
|
+
- Process multiple videos in parallel using ProcessPoolExecutor
|
|
978
|
+
- Each VideoResult contains success status, metrics, or error
|
|
979
|
+
- Error isolation: one failure doesn't crash the batch
|
|
980
|
+
|
|
981
|
+
- `VideoConfig(video_path, drop_height, quality="balanced", ...)`
|
|
982
|
+
- Configuration dataclass for video processing
|
|
983
|
+
- All CLI parameters available as attributes
|
|
984
|
+
|
|
985
|
+
- `VideoResult(video_path, success, metrics=None, error=None, processing_time=0.0)`
|
|
986
|
+
- Result dataclass with structured success/error handling
|
|
987
|
+
|
|
988
|
+
**Type Safety:**
|
|
989
|
+
- Fully typed API with PEP 561 compliance (py.typed marker)
|
|
990
|
+
- IDE autocomplete and type checking support
|
|
991
|
+
- All public functions have complete type annotations
|
|
992
|
+
|
|
818
993
|
## MCP Server Configuration
|
|
819
994
|
|
|
820
995
|
The repository includes MCP server configuration in `.mcp.json`:
|
|
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
|
|
|
17
17
|
Examples of behavior that contributes to a positive environment for our
|
|
18
18
|
community include:
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
24
|
and learning from the experience
|
|
25
|
-
|
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
|
26
26
|
community
|
|
27
27
|
|
|
28
28
|
Examples of unacceptable behavior include:
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
31
|
any kind
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
- Public or private harassment
|
|
34
|
+
- Publishing others' private information, such as a physical or email address,
|
|
35
35
|
without their explicit permission
|
|
36
|
-
|
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
37
|
professional setting
|
|
38
38
|
|
|
39
39
|
## Enforcement Responsibilities
|
|
@@ -120,14 +120,14 @@ version 2.1, available at
|
|
|
120
120
|
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
121
121
|
|
|
122
122
|
Community Impact Guidelines were inspired by
|
|
123
|
-
[Mozilla's code of conduct enforcement ladder][
|
|
123
|
+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
|
124
124
|
|
|
125
125
|
For answers to common questions about this code of conduct, see the FAQ at
|
|
126
|
-
[https://www.contributor-covenant.org/faq][
|
|
126
|
+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
|
|
127
127
|
[https://www.contributor-covenant.org/translations][translations].
|
|
128
128
|
|
|
129
|
+
[faq]: https://www.contributor-covenant.org/faq
|
|
129
130
|
[homepage]: https://www.contributor-covenant.org
|
|
130
|
-
[
|
|
131
|
-
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
132
|
-
[FAQ]: https://www.contributor-covenant.org/faq
|
|
131
|
+
[mozilla coc]: https://github.com/mozilla/diversity
|
|
133
132
|
[translations]: https://www.contributor-covenant.org/translations
|
|
133
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
@@ -37,12 +37,12 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
|
|
|
37
37
|
We actively welcome pull requests! Here's how to submit one:
|
|
38
38
|
|
|
39
39
|
1. Fork the repository
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
1. Create a new branch from `main` for your changes
|
|
41
|
+
1. Make your changes following our coding standards
|
|
42
|
+
1. Add or update tests as needed
|
|
43
|
+
1. Ensure all tests pass and code quality checks succeed
|
|
44
|
+
1. Update documentation if needed
|
|
45
|
+
1. Submit a pull request
|
|
46
46
|
|
|
47
47
|
## Development Setup
|
|
48
48
|
|
|
@@ -54,23 +54,27 @@ We actively welcome pull requests! Here's how to submit one:
|
|
|
54
54
|
### Installation Steps
|
|
55
55
|
|
|
56
56
|
1. **Clone your fork**:
|
|
57
|
+
|
|
57
58
|
```bash
|
|
58
59
|
git clone https://github.com/YOUR-USERNAME/kinemotion.git
|
|
59
60
|
cd kinemotion
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
1. **Install asdf plugins** (if not already installed):
|
|
64
|
+
|
|
63
65
|
```bash
|
|
64
66
|
asdf plugin add python
|
|
65
67
|
asdf plugin add uv
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
1. **Install versions specified in `.tool-versions`**:
|
|
71
|
+
|
|
69
72
|
```bash
|
|
70
73
|
asdf install
|
|
71
74
|
```
|
|
72
75
|
|
|
73
|
-
|
|
76
|
+
1. **Install project dependencies**:
|
|
77
|
+
|
|
74
78
|
```bash
|
|
75
79
|
uv sync
|
|
76
80
|
```
|
|
@@ -98,6 +102,7 @@ uv run mypy src/kinemotion
|
|
|
98
102
|
```
|
|
99
103
|
|
|
100
104
|
**Requirements**:
|
|
105
|
+
|
|
101
106
|
- All functions must have type annotations for parameters and return values
|
|
102
107
|
- No `Any` types without justification
|
|
103
108
|
- No untyped definitions
|
|
@@ -184,6 +189,7 @@ def calculate_jump_height(flight_time_ms, gravity=9.81):
|
|
|
184
189
|
- Update README.md if adding new features
|
|
185
190
|
|
|
186
191
|
Example:
|
|
192
|
+
|
|
187
193
|
```python
|
|
188
194
|
def detect_ground_contact(
|
|
189
195
|
positions: np.ndarray,
|
|
@@ -216,6 +222,7 @@ def detect_ground_contact(
|
|
|
216
222
|
- Include edge cases and error conditions
|
|
217
223
|
|
|
218
224
|
Example:
|
|
225
|
+
|
|
219
226
|
```python
|
|
220
227
|
def test_contact_detection_with_clean_landing():
|
|
221
228
|
"""Test contact detection with a clean landing (no bounces)."""
|
|
@@ -232,7 +239,7 @@ def test_contact_detection_with_clean_landing():
|
|
|
232
239
|
|
|
233
240
|
## Project Structure
|
|
234
241
|
|
|
235
|
-
```
|
|
242
|
+
```text
|
|
236
243
|
src/kinemotion/
|
|
237
244
|
├── __init__.py
|
|
238
245
|
├── cli.py # Main CLI entry point
|
|
@@ -256,9 +263,9 @@ tests/
|
|
|
256
263
|
### Adding New Features
|
|
257
264
|
|
|
258
265
|
1. **Core functionality** (reusable across jump types) → `core/`
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
266
|
+
1. **Jump-specific logic** → appropriate module (e.g., `dropjump/`)
|
|
267
|
+
1. **New jump type** → create new module alongside `dropjump/`
|
|
268
|
+
1. **Tests** → corresponding test file in `tests/`
|
|
262
269
|
|
|
263
270
|
## Commit Message Guidelines
|
|
264
271
|
|
|
@@ -270,7 +277,8 @@ Use clear, descriptive commit messages:
|
|
|
270
277
|
- Reference issues and pull requests when relevant
|
|
271
278
|
|
|
272
279
|
Examples:
|
|
273
|
-
|
|
280
|
+
|
|
281
|
+
```text
|
|
274
282
|
Add trajectory curvature analysis for landing detection
|
|
275
283
|
|
|
276
284
|
Fix sub-frame interpolation edge case at video boundaries
|
|
@@ -283,23 +291,27 @@ Refactor contact detection to use derivative-based velocity
|
|
|
283
291
|
## Review Process
|
|
284
292
|
|
|
285
293
|
1. **Automated checks** run on all pull requests:
|
|
294
|
+
|
|
286
295
|
- Type checking (mypy)
|
|
287
296
|
- Linting (ruff)
|
|
288
297
|
- Tests (pytest)
|
|
289
298
|
- Code formatting (black)
|
|
290
299
|
|
|
291
|
-
|
|
300
|
+
1. **Code review** by maintainers:
|
|
301
|
+
|
|
292
302
|
- Code quality and style
|
|
293
303
|
- Test coverage
|
|
294
304
|
- Documentation
|
|
295
305
|
- Performance implications
|
|
296
306
|
|
|
297
|
-
|
|
307
|
+
1. **Feedback and iteration**:
|
|
308
|
+
|
|
298
309
|
- Address review comments
|
|
299
310
|
- Push updates to your branch
|
|
300
311
|
- Checks re-run automatically
|
|
301
312
|
|
|
302
|
-
|
|
313
|
+
1. **Merge**:
|
|
314
|
+
|
|
303
315
|
- Once approved and all checks pass
|
|
304
316
|
- Squash and merge into `main`
|
|
305
317
|
|