kinemotion 0.18.0__tar.gz → 0.22.0__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.
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/workflows/docs.yml +21 -23
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/workflows/release.yml +8 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.pre-commit-config.yaml +2 -2
- {kinemotion-0.18.0 → kinemotion-0.22.0}/CHANGELOG.md +79 -0
- kinemotion-0.22.0/CLAUDE.md +247 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/PKG-INFO +62 -14
- {kinemotion-0.18.0 → kinemotion-0.22.0}/README.md +61 -13
- kinemotion-0.22.0/docs/development/testing.md +311 -0
- kinemotion-0.22.0/docs/development/type-hints.md +294 -0
- kinemotion-0.22.0/docs/technical/implementation-details.md +80 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/pyproject.toml +5 -2
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cmj/kinematics.py +25 -4
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/smoothing.py +19 -12
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/video_io.py +12 -2
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/dropjump/kinematics.py +27 -5
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_api.py +99 -0
- kinemotion-0.22.0/tests/test_aspect_ratio.py +341 -0
- kinemotion-0.22.0/tests/test_cli_cmj.py +356 -0
- kinemotion-0.22.0/tests/test_cli_dropjump.py +354 -0
- kinemotion-0.22.0/tests/test_cmj_analysis.py +583 -0
- kinemotion-0.22.0/tests/test_contact_detection.py +222 -0
- kinemotion-0.22.0/tests/test_joint_angles.py +613 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/uv.lock +356 -314
- kinemotion-0.18.0/CLAUDE.md +0 -347
- kinemotion-0.18.0/tests/test_aspect_ratio.py +0 -119
- kinemotion-0.18.0/tests/test_cmj_analysis.py +0 -158
- kinemotion-0.18.0/tests/test_contact_detection.py +0 -70
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.dockerignore +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/pull_request_template.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.github/workflows/test.yml +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.gitignore +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.readthedocs.yml +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/.tool-versions +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/CODE_OF_CONDUCT.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/CONTRIBUTING.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/Dockerfile +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/GEMINI.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/LICENSE +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/SECURITY.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/README.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/api/cmj.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/api/core.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/api/dropjump.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/api/overview.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/development/errors-findings.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/development/validation-plan.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/development/wallball-norep-detection.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/guides/bulk-processing.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/guides/camera-setup.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/guides/cmj-guide.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/index.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/reference/parameters.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/reference/pose-systems.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/research/sports-biomechanics-pose-estimation.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/technical/framerate.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/technical/imu-metadata.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/technical/real-time-analysis.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/technical/triple-extension.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/docs/translations/es/camera-setup.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/examples/bulk/README.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/examples/bulk/bulk_processing.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/examples/bulk/simple_example.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/examples/programmatic_usage.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/mkdocs.yml +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/requirements-docs.txt +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/samples/cmjs/README.md +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/sonar-project.properties +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/__init__.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/api.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cli.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cmj/__init__.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cmj/analysis.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cmj/cli.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cmj/debug_overlay.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/cmj/joint_angles.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/__init__.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/auto_tuning.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/cli_utils.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/debug_overlay_utils.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/filtering.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/core/pose.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/dropjump/__init__.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/dropjump/analysis.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/dropjump/cli.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/dropjump/debug_overlay.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/src/kinemotion/py.typed +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/__init__.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_adaptive_threshold.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_cli_imports.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_cmj_kinematics.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_com_estimation.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_filtering.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_kinematics.py +0 -0
- {kinemotion-0.18.0 → kinemotion-0.22.0}/tests/test_polyorder.py +0 -0
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
name: Documentation
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
#
|
|
5
|
-
workflow_run:
|
|
6
|
-
workflows: ["Release"]
|
|
7
|
-
types:
|
|
8
|
-
- completed
|
|
9
|
-
branches: [main]
|
|
10
|
-
# Also allow manual trigger and PR builds
|
|
4
|
+
# Build docs on PRs for validation (not deployed)
|
|
11
5
|
pull_request:
|
|
12
6
|
branches: [main]
|
|
13
|
-
|
|
7
|
+
# Called by release workflow for deployment
|
|
8
|
+
workflow_call:
|
|
14
9
|
|
|
15
10
|
jobs:
|
|
16
11
|
build:
|
|
17
12
|
runs-on: ubuntu-latest
|
|
18
13
|
steps:
|
|
19
|
-
-
|
|
14
|
+
- name: Checkout repository
|
|
15
|
+
uses: actions/checkout@v4
|
|
20
16
|
with:
|
|
21
|
-
# Check out main to get the version bump commit from semantic-release
|
|
22
|
-
ref: main
|
|
23
17
|
fetch-depth: 0
|
|
24
18
|
|
|
25
19
|
- name: Set up Python
|
|
@@ -27,9 +21,10 @@ jobs:
|
|
|
27
21
|
with:
|
|
28
22
|
python-version: "3.12"
|
|
29
23
|
|
|
30
|
-
- name:
|
|
31
|
-
uses: astral-sh/setup-uv@
|
|
24
|
+
- name: Set up uv
|
|
25
|
+
uses: astral-sh/setup-uv@v5
|
|
32
26
|
with:
|
|
27
|
+
version: "0.8.17"
|
|
33
28
|
enable-cache: true
|
|
34
29
|
|
|
35
30
|
- name: Install dependencies
|
|
@@ -47,29 +42,33 @@ jobs:
|
|
|
47
42
|
path: site/
|
|
48
43
|
|
|
49
44
|
deploy:
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
name: Deploy to GitHub Pages
|
|
46
|
+
# Only deploy when called from release workflow, not on PRs
|
|
47
|
+
if: github.event_name == 'workflow_call'
|
|
52
48
|
needs: build
|
|
53
49
|
runs-on: ubuntu-latest
|
|
54
50
|
permissions:
|
|
55
51
|
contents: write
|
|
56
52
|
steps:
|
|
57
|
-
-
|
|
53
|
+
- name: Checkout repository
|
|
54
|
+
uses: actions/checkout@v4
|
|
58
55
|
with:
|
|
59
56
|
ref: main
|
|
60
|
-
fetch-depth: 0
|
|
57
|
+
fetch-depth: 0
|
|
61
58
|
|
|
62
59
|
- name: Set up Python
|
|
63
60
|
uses: actions/setup-python@v5
|
|
64
61
|
with:
|
|
65
62
|
python-version: "3.12"
|
|
66
63
|
|
|
67
|
-
- name:
|
|
68
|
-
uses: astral-sh/setup-uv@
|
|
64
|
+
- name: Set up uv
|
|
65
|
+
uses: astral-sh/setup-uv@v5
|
|
66
|
+
with:
|
|
67
|
+
version: "0.8.17"
|
|
68
|
+
enable-cache: true
|
|
69
69
|
|
|
70
70
|
- name: Install dependencies
|
|
71
|
-
run:
|
|
72
|
-
uv sync --frozen
|
|
71
|
+
run: uv sync --frozen
|
|
73
72
|
|
|
74
73
|
- name: Configure git
|
|
75
74
|
run: |
|
|
@@ -77,5 +76,4 @@ jobs:
|
|
|
77
76
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
78
77
|
|
|
79
78
|
- name: Deploy to GitHub Pages
|
|
80
|
-
run:
|
|
81
|
-
uv run mkdocs gh-deploy --force
|
|
79
|
+
run: uv run mkdocs gh-deploy --force
|
|
@@ -66,6 +66,14 @@ jobs:
|
|
|
66
66
|
if: steps.get_version.outputs.released == 'true'
|
|
67
67
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
68
68
|
|
|
69
|
+
docs:
|
|
70
|
+
name: Deploy Documentation
|
|
71
|
+
needs: release
|
|
72
|
+
if: needs.release.outputs.released == 'true'
|
|
73
|
+
uses: ./.github/workflows/docs.yml
|
|
74
|
+
permissions:
|
|
75
|
+
contents: write
|
|
76
|
+
|
|
69
77
|
docker:
|
|
70
78
|
name: Build and Push Docker Image
|
|
71
79
|
needs: release
|
|
@@ -15,12 +15,12 @@ repos:
|
|
|
15
15
|
- id: mixed-line-ending
|
|
16
16
|
|
|
17
17
|
- repo: https://github.com/psf/black
|
|
18
|
-
rev: 25.
|
|
18
|
+
rev: 25.11.0
|
|
19
19
|
hooks:
|
|
20
20
|
- id: black
|
|
21
21
|
|
|
22
22
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
23
|
-
rev: v0.14.
|
|
23
|
+
rev: v0.14.4
|
|
24
24
|
hooks:
|
|
25
25
|
- id: ruff
|
|
26
26
|
args: [--fix, --exit-non-zero-on-fix]
|
|
@@ -7,6 +7,85 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
<!-- version list -->
|
|
9
9
|
|
|
10
|
+
## v0.22.0 (2025-11-10)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Make CLI batch tests resilient to processing failures in CI
|
|
15
|
+
([`1f3dfed`](https://github.com/feniix/kinemotion/commit/1f3dfedbe88a2c9be21c907053e549ee2431c500))
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- Comprehensive test coverage expansion and documentation refactoring
|
|
20
|
+
([`dc3cda4`](https://github.com/feniix/kinemotion/commit/dc3cda4e022b61f635e537784aafc08e0f6e78fe))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## v0.21.0 (2025-11-10)
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- Add TypedDict and type aliases for improved type safety
|
|
28
|
+
([`053e010`](https://github.com/feniix/kinemotion/commit/053e010cf80e1c91d5900c39d49b1d7ac2ac6ab4))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## v0.20.2 (2025-11-10)
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
- Achieve 80%+ coverage on video_io for SonarCloud quality gate
|
|
36
|
+
([`ed77fdb`](https://github.com/feniix/kinemotion/commit/ed77fdb080f143c492c724c9f4a138b2a364ad7e))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## v0.20.1 (2025-11-10)
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
- Add test coverage for ffprobe warning path
|
|
44
|
+
([`8ae3e55`](https://github.com/feniix/kinemotion/commit/8ae3e552a3bfb749d4e9bad10c634093db5eddee))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## v0.20.0 (2025-11-10)
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
- Add platform-specific installation guide and ffprobe warnings
|
|
52
|
+
([`b61c8c6`](https://github.com/feniix/kinemotion/commit/b61c8c6dbc2191ca321a2b813aa995c3a68b0b0b))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## v0.19.0 (2025-11-10)
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
- Add comprehensive badge layout to README
|
|
60
|
+
([`e1e2ca3`](https://github.com/feniix/kinemotion/commit/e1e2ca38c67077092bfc1455acfbe8a424e5d4b4))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## v0.18.2 (2025-11-10)
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
- Ci build
|
|
68
|
+
([`5bbfc0f`](https://github.com/feniix/kinemotion/commit/5bbfc0fa610ff811e765dea2021602f09d02f9f8))
|
|
69
|
+
|
|
70
|
+
### Testing
|
|
71
|
+
|
|
72
|
+
- Add comprehensive test coverage for joint angles and CMJ analysis
|
|
73
|
+
([`815c9be`](https://github.com/feniix/kinemotion/commit/815c9be1019414acf61563312a5d58f6305a17a4))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## v0.18.1 (2025-11-10)
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
- Ci build
|
|
81
|
+
([`f45e2c3`](https://github.com/feniix/kinemotion/commit/f45e2c3c11ae241d24de3e44836206e111defc2a))
|
|
82
|
+
|
|
83
|
+
### Refactoring
|
|
84
|
+
|
|
85
|
+
- **ci**: Use reusable workflow for docs deployment
|
|
86
|
+
([`013dbd1`](https://github.com/feniix/kinemotion/commit/013dbd112cd5bcbe69bc405066b39bb142996d46))
|
|
87
|
+
|
|
88
|
+
|
|
10
89
|
## v0.18.0 (2025-11-10)
|
|
11
90
|
|
|
12
91
|
### Bug Fixes
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Repository Purpose
|
|
4
|
+
|
|
5
|
+
Kinemotion: Video-based kinematic analysis for athletic performance using MediaPipe pose tracking.
|
|
6
|
+
|
|
7
|
+
**Supported Jump Types:**
|
|
8
|
+
|
|
9
|
+
- **Drop Jump**: Ground contact time, flight time, reactive strength index
|
|
10
|
+
- **Counter Movement Jump (CMJ)**: Jump height, flight time, countermovement depth, triple extension
|
|
11
|
+
|
|
12
|
+
## Quick Setup
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
asdf install # Install Python 3.12.7 + uv
|
|
16
|
+
uv sync # Install dependencies
|
|
17
|
+
uv run kinemotion dropjump-analyze video.mp4
|
|
18
|
+
uv run kinemotion cmj-analyze video.mp4
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Development:**
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv run pytest # Run all 206 tests with coverage (73.03%)
|
|
25
|
+
uv run pytest --cov-report=html # Generate HTML coverage report
|
|
26
|
+
uv run ruff check --fix && uv run pyright # Lint + type check
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Coverage Reports:**
|
|
30
|
+
|
|
31
|
+
- Terminal: Automatic with `uv run pytest`
|
|
32
|
+
- HTML: `htmlcov/index.html` (open in browser)
|
|
33
|
+
- XML: `coverage.xml` (for CI integration)
|
|
34
|
+
|
|
35
|
+
**SonarQube Cloud Integration:**
|
|
36
|
+
|
|
37
|
+
The project integrates with SonarQube Cloud for continuous code quality and coverage tracking.
|
|
38
|
+
|
|
39
|
+
Setup (one-time):
|
|
40
|
+
|
|
41
|
+
1. Visit [SonarCloud](https://sonarcloud.io/) and sign in with GitHub
|
|
42
|
+
2. Import the `feniix/kinemotion` repository
|
|
43
|
+
3. Generate a token: My Account > Security > Generate Tokens
|
|
44
|
+
4. Add token to GitHub: Repository > Settings > Secrets and variables > Actions
|
|
45
|
+
- Name: `SONAR_TOKEN`
|
|
46
|
+
- Value: Your generated token
|
|
47
|
+
|
|
48
|
+
Configuration files:
|
|
49
|
+
|
|
50
|
+
- `sonar-project.properties` - SonarQube project configuration
|
|
51
|
+
- `.github/workflows/test.yml` - CI workflow with SonarQube scan
|
|
52
|
+
|
|
53
|
+
The workflow automatically:
|
|
54
|
+
|
|
55
|
+
- Runs tests with coverage on every PR and push to main
|
|
56
|
+
- Uploads coverage.xml to SonarQube Cloud
|
|
57
|
+
- Runs quality gate checks
|
|
58
|
+
|
|
59
|
+
View results: <https://sonarcloud.io/project/overview?id=feniix_kinemotion>
|
|
60
|
+
|
|
61
|
+
## Architecture
|
|
62
|
+
|
|
63
|
+
### Module Structure
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
src/kinemotion/
|
|
67
|
+
├── cli.py # Main CLI (registers subcommands)
|
|
68
|
+
├── api.py # Python API (process_video, process_cmj_video, bulk)
|
|
69
|
+
├── core/ # Shared: pose, smoothing, filtering, auto_tuning, video_io
|
|
70
|
+
├── dropjump/ # Drop jump: cli, analysis, kinematics, debug_overlay
|
|
71
|
+
└── cmj/ # CMJ: cli, analysis, kinematics, joint_angles, debug_overlay
|
|
72
|
+
|
|
73
|
+
tests/ # 206 tests total (comprehensive coverage across all modules)
|
|
74
|
+
docs/ # CMJ_GUIDE, TRIPLE_EXTENSION, REAL_TIME_ANALYSIS, etc.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Design**: Each jump type is a sibling module with its own CLI command, metrics, and visualization.
|
|
78
|
+
|
|
79
|
+
### Key Differences: Drop Jump vs CMJ
|
|
80
|
+
|
|
81
|
+
| Feature | Drop Jump | CMJ |
|
|
82
|
+
|---------|-----------|-----|
|
|
83
|
+
| Starting | Elevated box | Floor level |
|
|
84
|
+
| Algorithm | Forward search | Backward search from peak |
|
|
85
|
+
| Velocity | Absolute (magnitude) | Signed (direction matters) |
|
|
86
|
+
| Parameters | Auto-tuned quality presets | Auto-tuned quality presets |
|
|
87
|
+
| Key Metric | Ground contact time | Jump height from flight time |
|
|
88
|
+
|
|
89
|
+
## Critical Gotchas
|
|
90
|
+
|
|
91
|
+
**Video Processing:**
|
|
92
|
+
|
|
93
|
+
- Read first frame for dimensions (not OpenCV properties)
|
|
94
|
+
- Handle rotation metadata (mobile videos)
|
|
95
|
+
- Convert NumPy types for JSON: `int()`, `float()`
|
|
96
|
+
|
|
97
|
+
**CMJ Specific:**
|
|
98
|
+
|
|
99
|
+
- Use signed velocity (not absolute)
|
|
100
|
+
- Backward search algorithm (find peak first)
|
|
101
|
+
- Lateral view required
|
|
102
|
+
|
|
103
|
+
See [Implementation Details](docs/technical/implementation-details.md) for complete technical reference.
|
|
104
|
+
|
|
105
|
+
## Testing & Quality
|
|
106
|
+
|
|
107
|
+
### Before Commit
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
uv run ruff check --fix # Auto-fix linting
|
|
111
|
+
uv run pyright # Type check (strict)
|
|
112
|
+
uv run pytest # All 206 tests with coverage
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Standards
|
|
116
|
+
|
|
117
|
+
- Pyright strict mode (all functions typed)
|
|
118
|
+
- Ruff (100 char lines)
|
|
119
|
+
- Conventional Commits (see below)
|
|
120
|
+
- **Code duplication target: < 3%**
|
|
121
|
+
- **Test coverage: ≥ 50% (current: 73.03% with branch coverage)**
|
|
122
|
+
|
|
123
|
+
### Coverage Summary
|
|
124
|
+
|
|
125
|
+
**Current:** 73.03% (206 tests, 2225 statements, 752 branches)
|
|
126
|
+
|
|
127
|
+
**Coverage by tier:**
|
|
128
|
+
|
|
129
|
+
- Core algorithms: 85-100% ✅ (analysis, kinematics, filtering, pose)
|
|
130
|
+
- API/Integration: 63% ✅ (api.py)
|
|
131
|
+
- CLI modules: 62-89% ✅ (dropjump: 88.75%, cmj: 62.27%)
|
|
132
|
+
- Visualization: 10-36% ✅ (debug overlays - appropriate)
|
|
133
|
+
|
|
134
|
+
**Key metrics:**
|
|
135
|
+
|
|
136
|
+
- All 206 tests pass
|
|
137
|
+
- 0 type errors (pyright strict)
|
|
138
|
+
- 0 linting errors (ruff)
|
|
139
|
+
|
|
140
|
+
See [Testing Guide](docs/development/testing.md) for:
|
|
141
|
+
|
|
142
|
+
- Detailed coverage breakdown by module
|
|
143
|
+
- Test file organization
|
|
144
|
+
- CLI testing strategy (maintainable patterns)
|
|
145
|
+
- Test breakdown by category
|
|
146
|
+
|
|
147
|
+
View HTML report: `uv run pytest --cov-report=html && open htmlcov/index.html`
|
|
148
|
+
|
|
149
|
+
### Code Quality
|
|
150
|
+
|
|
151
|
+
- **Duplication target:** < 3% (current: 2.96%)
|
|
152
|
+
- **Check:** `npx jscpd src/kinemotion`
|
|
153
|
+
|
|
154
|
+
**Principles:**
|
|
155
|
+
|
|
156
|
+
1. Extract common logic to shared utilities
|
|
157
|
+
2. Use inheritance for shared behavior
|
|
158
|
+
3. Create helper functions (testable, reusable)
|
|
159
|
+
4. Use function composition (pass functions as parameters)
|
|
160
|
+
|
|
161
|
+
See [Testing Guide](docs/development/testing.md) for detailed duplication avoidance strategies.
|
|
162
|
+
|
|
163
|
+
## Quick Reference
|
|
164
|
+
|
|
165
|
+
### CLI
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Drop jump (auto-tuned parameters)
|
|
169
|
+
kinemotion dropjump-analyze video.mp4
|
|
170
|
+
|
|
171
|
+
# CMJ with debug video
|
|
172
|
+
kinemotion cmj-analyze video.mp4 --output debug.mp4
|
|
173
|
+
|
|
174
|
+
# Batch processing
|
|
175
|
+
kinemotion cmj-analyze videos/*.mp4 --batch --workers 4
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Python API
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
# Drop jump
|
|
182
|
+
from kinemotion import process_dropjump_video
|
|
183
|
+
metrics = process_dropjump_video("video.mp4", quality="balanced")
|
|
184
|
+
|
|
185
|
+
# CMJ
|
|
186
|
+
from kinemotion import process_cmj_video
|
|
187
|
+
metrics = process_cmj_video("video.mp4", quality="balanced")
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Type Safety & Dependencies
|
|
191
|
+
|
|
192
|
+
**Type hints:** Use TypedDict, type aliases, NDArray[dtype]. See [Type Hints Guide](docs/development/type-hints.md).
|
|
193
|
+
|
|
194
|
+
**Key versions:**
|
|
195
|
+
|
|
196
|
+
- Python: 3.12.7
|
|
197
|
+
- NumPy: 2.3.4
|
|
198
|
+
- pytest: 9.0.0
|
|
199
|
+
- MediaPipe: 0.10.14
|
|
200
|
+
|
|
201
|
+
## Documentation
|
|
202
|
+
|
|
203
|
+
Documentation follows the [Diátaxis framework](https://diataxis.fr/):
|
|
204
|
+
|
|
205
|
+
- **guides/** - How-to tutorials
|
|
206
|
+
- **reference/** - Technical specs
|
|
207
|
+
- **technical/** - Implementation details
|
|
208
|
+
- **development/** - Testing, typing, contribution guides
|
|
209
|
+
- **research/** - Background theory
|
|
210
|
+
|
|
211
|
+
See [docs/README.md](docs/README.md) for complete navigation.
|
|
212
|
+
|
|
213
|
+
## Commit Format
|
|
214
|
+
|
|
215
|
+
**Required**: [Conventional Commits](https://www.conventionalcommits.org/) - enforced by pre-commit hook
|
|
216
|
+
|
|
217
|
+
**Format**: `<type>(<scope>): <description>`
|
|
218
|
+
|
|
219
|
+
**Types** (triggers version bumps):
|
|
220
|
+
|
|
221
|
+
- `feat`: New feature → minor version bump (0.x.0)
|
|
222
|
+
- `fix`: Bug fix → patch version bump (0.0.x)
|
|
223
|
+
- `perf`: Performance improvement → patch
|
|
224
|
+
- `docs`, `test`, `refactor`, `chore`, `style`, `ci`, `build` → no version bump
|
|
225
|
+
|
|
226
|
+
**Examples:**
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
feat: add CMJ analysis with triple extension tracking
|
|
230
|
+
fix: correct takeoff detection in backward search algorithm
|
|
231
|
+
docs: add triple extension biomechanics guide
|
|
232
|
+
test: add CMJ phase detection tests
|
|
233
|
+
refactor: extract signed velocity to separate function
|
|
234
|
+
chore(release): 0.11.0 [skip ci]
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Breaking changes**: Add `!` or `BREAKING CHANGE:` footer
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
feat!: change API signature for process_video
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Important**: Commit messages must never reference Claude or AI assistance. Keep messages professional and focused on the technical changes.
|
|
244
|
+
|
|
245
|
+
## MCP Servers
|
|
246
|
+
|
|
247
|
+
Configured in `.mcp.json`: web-search, sequential-thinking, context7, etc.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kinemotion
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: Video-based kinematic analysis for athletic performance
|
|
5
5
|
Project-URL: Homepage, https://github.com/feniix/kinemotion
|
|
6
6
|
Project-URL: Repository, https://github.com/feniix/kinemotion
|
|
@@ -30,13 +30,18 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
# Kinemotion
|
|
31
31
|
|
|
32
32
|
[](https://pypi.org/project/kinemotion/)
|
|
33
|
+
[](https://pypi.org/project/kinemotion/)
|
|
33
34
|
[](https://opensource.org/licenses/MIT)
|
|
34
|
-
|
|
35
|
-
[](https://github.com/feniix/kinemotion/actions)
|
|
37
|
+
[](https://sonarcloud.io/summary/overall?id=feniix_kinemotion)
|
|
38
|
+
[](https://sonarcloud.io/summary/overall?id=feniix_kinemotion)
|
|
39
|
+
|
|
36
40
|
[](https://github.com/astral-sh/ruff)
|
|
37
|
-
[](https://github.com/microsoft/pyright)
|
|
42
|
+
[](https://github.com/pre-commit/pre-commit)
|
|
38
43
|
|
|
39
|
-
A video-based kinematic analysis tool for athletic performance. Analyzes vertical jump videos to estimate key performance metrics using MediaPipe pose tracking and advanced kinematics.
|
|
44
|
+
> A video-based kinematic analysis tool for athletic performance. Analyzes vertical jump videos to estimate key performance metrics using MediaPipe pose tracking and advanced kinematics.
|
|
40
45
|
|
|
41
46
|
**Supported jump types:**
|
|
42
47
|
|
|
@@ -88,27 +93,70 @@ For clinical, research, or performance assessment requiring validated accuracy,
|
|
|
88
93
|
|
|
89
94
|
## Setup
|
|
90
95
|
|
|
91
|
-
###
|
|
96
|
+
### System Requirements
|
|
97
|
+
|
|
98
|
+
**All Platforms:**
|
|
99
|
+
|
|
100
|
+
- Python 3.10, 3.11, or 3.12
|
|
101
|
+
|
|
102
|
+
**Platform-Specific:**
|
|
103
|
+
|
|
104
|
+
#### Windows
|
|
92
105
|
|
|
93
|
-
|
|
94
|
-
- asdf plugins for Python and uv
|
|
106
|
+
No additional system dependencies required.
|
|
95
107
|
|
|
96
|
-
|
|
108
|
+
**Recommended for mobile video support:**
|
|
97
109
|
|
|
98
|
-
|
|
110
|
+
- [FFmpeg](https://ffmpeg.org/download.html) - Download and add to PATH
|
|
111
|
+
|
|
112
|
+
#### macOS
|
|
113
|
+
|
|
114
|
+
No additional system dependencies required.
|
|
115
|
+
|
|
116
|
+
**Recommended for mobile video support:**
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
brew install ffmpeg
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Linux (Ubuntu/Debian)
|
|
123
|
+
|
|
124
|
+
**Recommended system libraries:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
sudo apt-get update
|
|
128
|
+
sudo apt-get install -y \
|
|
129
|
+
libgl1-mesa-glx \
|
|
130
|
+
libglib2.0-0 \
|
|
131
|
+
ffmpeg
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Note:** `ffmpeg` provides the `ffprobe` tool for video metadata extraction (rotation, aspect ratio). Kinemotion works without it, but mobile/rotated videos may not process correctly. A warning will be shown if `ffprobe` is not available.
|
|
135
|
+
|
|
136
|
+
### Installation Methods
|
|
137
|
+
|
|
138
|
+
#### From PyPI (Recommended)
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
pip install kinemotion
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### From Source (Development)
|
|
145
|
+
|
|
146
|
+
**Step 1:** Install asdf plugins (if not already installed):
|
|
99
147
|
|
|
100
148
|
```bash
|
|
101
149
|
asdf plugin add python
|
|
102
150
|
asdf plugin add uv
|
|
103
151
|
```
|
|
104
152
|
|
|
105
|
-
|
|
153
|
+
**Step 2:** Install versions specified in `.tool-versions`:
|
|
106
154
|
|
|
107
155
|
```bash
|
|
108
156
|
asdf install
|
|
109
157
|
```
|
|
110
158
|
|
|
111
|
-
|
|
159
|
+
**Step 3:** Install project dependencies using uv:
|
|
112
160
|
|
|
113
161
|
```bash
|
|
114
162
|
uv sync
|
|
@@ -120,7 +168,7 @@ This will install all dependencies and make the `kinemotion` command available.
|
|
|
120
168
|
|
|
121
169
|
Kinemotion supports two jump types with intelligent auto-tuning that automatically optimizes parameters based on video characteristics.
|
|
122
170
|
|
|
123
|
-
### Drop
|
|
171
|
+
### Analyzing Drop Jumps
|
|
124
172
|
|
|
125
173
|
Analyzes reactive strength and ground contact time:
|
|
126
174
|
|
|
@@ -129,7 +177,7 @@ Analyzes reactive strength and ground contact time:
|
|
|
129
177
|
kinemotion dropjump-analyze video.mp4
|
|
130
178
|
```
|
|
131
179
|
|
|
132
|
-
###
|
|
180
|
+
### Analyzing CMJ
|
|
133
181
|
|
|
134
182
|
Analyzes jump height and biomechanics:
|
|
135
183
|
|