kinemotion 0.7.1__tar.gz → 0.8.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.

Files changed (42) hide show
  1. kinemotion-0.8.1/.dockerignore +59 -0
  2. kinemotion-0.8.1/.github/workflows/release.yml +108 -0
  3. {kinemotion-0.7.1 → kinemotion-0.8.1}/.gitignore +0 -1
  4. {kinemotion-0.7.1 → kinemotion-0.8.1}/CHANGELOG.md +16 -0
  5. kinemotion-0.8.1/Dockerfile +107 -0
  6. {kinemotion-0.7.1 → kinemotion-0.8.1}/PKG-INFO +1 -1
  7. {kinemotion-0.7.1 → kinemotion-0.8.1}/pyproject.toml +1 -1
  8. kinemotion-0.8.1/uv.lock +1678 -0
  9. kinemotion-0.7.1/.github/workflows/release.yml +0 -43
  10. {kinemotion-0.7.1 → kinemotion-0.8.1}/.pre-commit-config.yaml +0 -0
  11. {kinemotion-0.7.1 → kinemotion-0.8.1}/.tool-versions +0 -0
  12. {kinemotion-0.7.1 → kinemotion-0.8.1}/CLAUDE.md +0 -0
  13. {kinemotion-0.7.1 → kinemotion-0.8.1}/GEMINI.md +0 -0
  14. {kinemotion-0.7.1 → kinemotion-0.8.1}/LICENSE +0 -0
  15. {kinemotion-0.7.1 → kinemotion-0.8.1}/README.md +0 -0
  16. {kinemotion-0.7.1 → kinemotion-0.8.1}/docs/ERRORS_FINDINGS.md +0 -0
  17. {kinemotion-0.7.1 → kinemotion-0.8.1}/docs/FRAMERATE.md +0 -0
  18. {kinemotion-0.7.1 → kinemotion-0.8.1}/docs/IMU_METADATA_PRESERVATION.md +0 -0
  19. {kinemotion-0.7.1 → kinemotion-0.8.1}/docs/PARAMETERS.md +0 -0
  20. {kinemotion-0.7.1 → kinemotion-0.8.1}/docs/VALIDATION_PLAN.md +0 -0
  21. {kinemotion-0.7.1 → kinemotion-0.8.1}/examples/programmatic_usage.py +0 -0
  22. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/__init__.py +0 -0
  23. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/cli.py +0 -0
  24. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/core/__init__.py +0 -0
  25. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/core/auto_tuning.py +0 -0
  26. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/core/filtering.py +0 -0
  27. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/core/pose.py +0 -0
  28. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/core/smoothing.py +0 -0
  29. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/core/video_io.py +0 -0
  30. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/dropjump/__init__.py +0 -0
  31. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/dropjump/analysis.py +0 -0
  32. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/dropjump/cli.py +0 -0
  33. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/dropjump/debug_overlay.py +0 -0
  34. {kinemotion-0.7.1 → kinemotion-0.8.1}/src/kinemotion/dropjump/kinematics.py +0 -0
  35. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/__init__.py +0 -0
  36. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_adaptive_threshold.py +0 -0
  37. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_aspect_ratio.py +0 -0
  38. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_com_estimation.py +0 -0
  39. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_contact_detection.py +0 -0
  40. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_filtering.py +0 -0
  41. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_kinematics.py +0 -0
  42. {kinemotion-0.7.1 → kinemotion-0.8.1}/tests/test_polyorder.py +0 -0
@@ -0,0 +1,59 @@
1
+ # Python
2
+ __pycache__
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ *.egg-info/
8
+ dist/
9
+ build/
10
+ .venv/
11
+ venv/
12
+ ENV/
13
+
14
+ # Testing
15
+ .pytest_cache/
16
+ .coverage
17
+ htmlcov/
18
+ .tox/
19
+
20
+ # IDEs
21
+ .vscode/
22
+ .idea/
23
+ *.swp
24
+ *.swo
25
+ *~
26
+
27
+ # Git
28
+ .git/
29
+ .gitignore
30
+ .gitattributes
31
+
32
+ # CI/CD
33
+ .github/
34
+ .pre-commit-config.yaml
35
+
36
+ # Documentation
37
+ docs/
38
+ CHANGELOG.md
39
+ CLAUDE.md
40
+ *.md
41
+ !README.md
42
+
43
+ # Sample files
44
+ samples/
45
+ examples/
46
+
47
+ # Development tools
48
+ .mypy_cache/
49
+ .ruff_cache/
50
+ .pytest_cache/
51
+
52
+ # OS
53
+ .DS_Store
54
+ Thumbs.db
55
+
56
+ # MCP and Claude
57
+ .mcp.json
58
+ .claude/
59
+ CLAUDE.md
@@ -0,0 +1,108 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ name: Create Release
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ id-token: write
15
+ packages: write
16
+ outputs:
17
+ version: ${{ steps.get_version.outputs.version }}
18
+ released: ${{ steps.get_version.outputs.released }}
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.12"
29
+
30
+ - name: Set up uv
31
+ uses: astral-sh/setup-uv@v5
32
+ with:
33
+ version: "0.8.17"
34
+
35
+ - name: Install dependencies
36
+ run: uv sync
37
+
38
+ - name: Create Release
39
+ env:
40
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41
+ run: |
42
+ git config user.name "github-actions"
43
+ git config user.email "github-actions@github.com"
44
+ uv run semantic-release version
45
+
46
+ - name: Get version from pyproject.toml
47
+ id: get_version
48
+ run: |
49
+ VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
50
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
51
+ # Check if semantic-release created a new release by checking if there's a new tag
52
+ if git describe --exact-match --tags HEAD 2>/dev/null; then
53
+ echo "released=true" >> $GITHUB_OUTPUT
54
+ else
55
+ echo "released=false" >> $GITHUB_OUTPUT
56
+ fi
57
+
58
+ - name: Publish to PyPI
59
+ if: steps.get_version.outputs.released == 'true'
60
+ uses: pypa/gh-action-pypi-publish@release/v1
61
+
62
+ docker:
63
+ name: Build and Push Docker Image
64
+ needs: release
65
+ if: needs.release.outputs.released == 'true'
66
+ runs-on: ubuntu-latest
67
+ permissions:
68
+ contents: read
69
+ packages: write
70
+ steps:
71
+ - name: Checkout repository
72
+ uses: actions/checkout@v4
73
+ with:
74
+ ref: v${{ needs.release.outputs.version }}
75
+
76
+ - name: Set up Docker Buildx
77
+ uses: docker/setup-buildx-action@v3
78
+
79
+ - name: Log in to GitHub Container Registry
80
+ uses: docker/login-action@v3
81
+ with:
82
+ registry: ghcr.io
83
+ username: ${{ github.actor }}
84
+ password: ${{ secrets.GITHUB_TOKEN }}
85
+
86
+ - name: Extract metadata (tags, labels) for Docker
87
+ id: meta
88
+ uses: docker/metadata-action@v5
89
+ with:
90
+ images: ghcr.io/${{ github.repository }}
91
+ tags: |
92
+ type=semver,pattern={{version}},value=v${{ needs.release.outputs.version }}
93
+ type=semver,pattern={{major}}.{{minor}},value=v${{ needs.release.outputs.version }}
94
+ type=semver,pattern={{major}},value=v${{ needs.release.outputs.version }}
95
+ type=raw,value=latest
96
+
97
+ - name: Build and push Docker image
98
+ id: push
99
+ uses: docker/build-push-action@v6
100
+ with:
101
+ context: .
102
+ push: true
103
+ tags: ${{ steps.meta.outputs.tags }}
104
+ labels: ${{ steps.meta.outputs.labels }}
105
+ platforms: linux/amd64
106
+ # Multi-scope caching: Docker layers + uv cache
107
+ cache-from: type=gha
108
+ cache-to: type=gha,mode=max
@@ -28,7 +28,6 @@ env/
28
28
 
29
29
  # uv
30
30
  .uv/
31
- uv.lock
32
31
 
33
32
  # IDEs
34
33
  .vscode/
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  <!-- version list -->
9
9
 
10
+ ## v0.8.1 (2025-11-02)
11
+
12
+ ### Bug Fixes
13
+
14
+ - Add OCI-compliant labels to Docker image
15
+ ([`6b18b33`](https://github.com/feniix/kinemotion/commit/6b18b33538615048c8ea572c4ebc402160ee1c5e))
16
+
17
+
18
+ ## v0.8.0 (2025-11-02)
19
+
20
+ ### Features
21
+
22
+ - Add Docker support and GitHub Container Registry publishing
23
+ ([`249ca4c`](https://github.com/feniix/kinemotion/commit/249ca4c0c0ab40cda5acfebac012db8075b9694f))
24
+
25
+
10
26
  ## v0.7.1 (2025-11-01)
11
27
 
12
28
  ### Bug Fixes
@@ -0,0 +1,107 @@
1
+ # Multi-stage Dockerfile for kinemotion
2
+ # Optimized for Python 3.12, uv, OpenCV, and MediaPipe
3
+ # Note: Only linux/amd64 platform supported (MediaPipe lacks ARM64 Linux wheels)
4
+
5
+ # ============================================================================
6
+ # Stage 1: Builder - Install dependencies with uv
7
+ # ============================================================================
8
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
9
+
10
+ # Optimization: Compile Python bytecode at build time for faster startup
11
+ # Optimization: Copy mode for dependencies to work across build stages
12
+ ENV UV_COMPILE_BYTECODE=1 \
13
+ UV_LINK_MODE=copy
14
+
15
+ WORKDIR /app
16
+
17
+ # Install dependencies FIRST (cached layer - only invalidated when dependencies change)
18
+ # Use bind mounts to avoid copying files into the image
19
+ # Use cache mount to reuse uv downloads across builds
20
+ RUN --mount=type=cache,target=/root/.cache/uv \
21
+ --mount=type=bind,source=uv.lock,target=uv.lock \
22
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
23
+ uv sync --frozen --no-install-project --no-dev
24
+
25
+ # Copy source code AFTER dependencies (source changes don't invalidate dependency cache)
26
+ COPY . /app
27
+
28
+ # Install the project itself as a non-editable package (fast since dependencies are already installed)
29
+ # --no-editable ensures the package is properly installed, not as editable
30
+ RUN --mount=type=cache,target=/root/.cache/uv \
31
+ uv sync --frozen --no-dev --no-editable
32
+
33
+ # ============================================================================
34
+ # Stage 2: Runtime - Minimal production image
35
+ # ============================================================================
36
+ FROM python:3.12-slim-bookworm AS runtime
37
+
38
+ # OCI annotations for image metadata
39
+ LABEL org.opencontainers.image.title="kinemotion" \
40
+ org.opencontainers.image.description="Video-based kinematic analysis for athletic performance. Analyzes drop-jump videos using MediaPipe pose tracking." \
41
+ org.opencontainers.image.authors="Sebastian Otaegui <feniix@gmail.com>" \
42
+ org.opencontainers.image.vendor="kinemotion" \
43
+ org.opencontainers.image.licenses="MIT" \
44
+ org.opencontainers.image.url="https://github.com/feniix/kinemotion" \
45
+ org.opencontainers.image.source="https://github.com/feniix/kinemotion" \
46
+ org.opencontainers.image.documentation="https://github.com/feniix/kinemotion#readme" \
47
+ org.opencontainers.image.base.name="docker.io/library/python:3.12-slim-bookworm"
48
+
49
+ # Install system dependencies required by OpenCV and MediaPipe
50
+ # - libgl1: OpenGL library for OpenCV
51
+ # - libglib2.0-0: GLib library for MediaPipe
52
+ # - libgomp1: GNU OpenMP library for multi-threading
53
+ # - ffmpeg: Video codec support for OpenCV
54
+ # hadolint ignore=DL3008
55
+ RUN apt-get update && apt-get install -y --no-install-recommends \
56
+ libgl1 \
57
+ libglib2.0-0 \
58
+ libgomp1 \
59
+ ffmpeg \
60
+ && apt-get clean \
61
+ && rm -rf /var/lib/apt/lists/*
62
+
63
+ WORKDIR /app
64
+
65
+ # Copy virtual environment from builder (contains installed package)
66
+ COPY --from=builder /app/.venv /app/.venv
67
+
68
+ # Set environment variables
69
+ # PATH: Use virtual environment binaries
70
+ # PYTHONUNBUFFERED: Force stdout/stderr to be unbuffered for real-time logging
71
+ # PYTHONDONTWRITEBYTECODE: Don't create .pyc files (saves space)
72
+ ENV PATH="/app/.venv/bin:$PATH" \
73
+ PYTHONUNBUFFERED=1 \
74
+ PYTHONDONTWRITEBYTECODE=1
75
+
76
+ # Create non-root user for security
77
+ RUN useradd -m -u 1000 kinemotion && \
78
+ chown -R kinemotion:kinemotion /app
79
+
80
+ USER kinemotion
81
+
82
+ # Verify installation
83
+ RUN python -c "import kinemotion; print('kinemotion installed successfully')"
84
+
85
+ # Set entrypoint to kinemotion CLI
86
+ ENTRYPOINT ["kinemotion"]
87
+
88
+ # Default command: show help
89
+ CMD ["--help"]
90
+
91
+ # ============================================================================
92
+ # Usage examples:
93
+ #
94
+ # Build:
95
+ # docker build -t kinemotion:latest .
96
+ #
97
+ # Run with help:
98
+ # docker run --rm kinemotion:latest --help
99
+ #
100
+ # Analyze video:
101
+ # docker run --rm -v $(pwd):/data kinemotion:latest \
102
+ # dropjump-analyze /data/video.mp4 --drop-height 0.40 \
103
+ # --output /data/debug.mp4 --json-output /data/metrics.json
104
+ #
105
+ # Interactive shell:
106
+ # docker run --rm -it --entrypoint /bin/bash kinemotion:latest
107
+ # ============================================================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinemotion
3
- Version: 0.7.1
3
+ Version: 0.8.1
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kinemotion"
3
- version = "0.7.1"
3
+ version = "0.8.1"
4
4
  description = "Video-based kinematic analysis for athletic performance"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10,<3.13"