kinemotion 0.7.1__tar.gz → 0.8.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.
Potentially problematic release.
This version of kinemotion might be problematic. Click here for more details.
- kinemotion-0.8.0/.dockerignore +59 -0
- kinemotion-0.8.0/.github/workflows/release.yml +108 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/.gitignore +0 -1
- {kinemotion-0.7.1 → kinemotion-0.8.0}/CHANGELOG.md +8 -0
- kinemotion-0.8.0/Dockerfile +96 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/PKG-INFO +1 -1
- {kinemotion-0.7.1 → kinemotion-0.8.0}/pyproject.toml +1 -1
- kinemotion-0.8.0/uv.lock +1678 -0
- kinemotion-0.7.1/.github/workflows/release.yml +0 -43
- {kinemotion-0.7.1 → kinemotion-0.8.0}/.pre-commit-config.yaml +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/.tool-versions +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/CLAUDE.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/GEMINI.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/LICENSE +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/README.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/docs/ERRORS_FINDINGS.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/docs/FRAMERATE.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/docs/IMU_METADATA_PRESERVATION.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/docs/PARAMETERS.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/docs/VALIDATION_PLAN.md +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/examples/programmatic_usage.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/__init__.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/cli.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/core/__init__.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/core/auto_tuning.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/core/filtering.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/core/pose.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/core/smoothing.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/core/video_io.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/dropjump/__init__.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/dropjump/analysis.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/dropjump/cli.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/dropjump/debug_overlay.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/src/kinemotion/dropjump/kinematics.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/__init__.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/test_adaptive_threshold.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/test_aspect_ratio.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/test_com_estimation.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/test_contact_detection.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/test_filtering.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/tests/test_kinematics.py +0 -0
- {kinemotion-0.7.1 → kinemotion-0.8.0}/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
|
|
@@ -7,6 +7,14 @@ 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.0 (2025-11-02)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- Add Docker support and GitHub Container Registry publishing
|
|
15
|
+
([`249ca4c`](https://github.com/feniix/kinemotion/commit/249ca4c0c0ab40cda5acfebac012db8075b9694f))
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
## v0.7.1 (2025-11-01)
|
|
11
19
|
|
|
12
20
|
### Bug Fixes
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
# Install system dependencies required by OpenCV and MediaPipe
|
|
39
|
+
# - libgl1: OpenGL library for OpenCV
|
|
40
|
+
# - libglib2.0-0: GLib library for MediaPipe
|
|
41
|
+
# - libgomp1: GNU OpenMP library for multi-threading
|
|
42
|
+
# - ffmpeg: Video codec support for OpenCV
|
|
43
|
+
# hadolint ignore=DL3008
|
|
44
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
45
|
+
libgl1 \
|
|
46
|
+
libglib2.0-0 \
|
|
47
|
+
libgomp1 \
|
|
48
|
+
ffmpeg \
|
|
49
|
+
&& apt-get clean \
|
|
50
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
51
|
+
|
|
52
|
+
WORKDIR /app
|
|
53
|
+
|
|
54
|
+
# Copy virtual environment from builder (contains installed package)
|
|
55
|
+
COPY --from=builder /app/.venv /app/.venv
|
|
56
|
+
|
|
57
|
+
# Set environment variables
|
|
58
|
+
# PATH: Use virtual environment binaries
|
|
59
|
+
# PYTHONUNBUFFERED: Force stdout/stderr to be unbuffered for real-time logging
|
|
60
|
+
# PYTHONDONTWRITEBYTECODE: Don't create .pyc files (saves space)
|
|
61
|
+
ENV PATH="/app/.venv/bin:$PATH" \
|
|
62
|
+
PYTHONUNBUFFERED=1 \
|
|
63
|
+
PYTHONDONTWRITEBYTECODE=1
|
|
64
|
+
|
|
65
|
+
# Create non-root user for security
|
|
66
|
+
RUN useradd -m -u 1000 kinemotion && \
|
|
67
|
+
chown -R kinemotion:kinemotion /app
|
|
68
|
+
|
|
69
|
+
USER kinemotion
|
|
70
|
+
|
|
71
|
+
# Verify installation
|
|
72
|
+
RUN python -c "import kinemotion; print('kinemotion installed successfully')"
|
|
73
|
+
|
|
74
|
+
# Set entrypoint to kinemotion CLI
|
|
75
|
+
ENTRYPOINT ["kinemotion"]
|
|
76
|
+
|
|
77
|
+
# Default command: show help
|
|
78
|
+
CMD ["--help"]
|
|
79
|
+
|
|
80
|
+
# ============================================================================
|
|
81
|
+
# Usage examples:
|
|
82
|
+
#
|
|
83
|
+
# Build:
|
|
84
|
+
# docker build -t kinemotion:latest .
|
|
85
|
+
#
|
|
86
|
+
# Run with help:
|
|
87
|
+
# docker run --rm kinemotion:latest --help
|
|
88
|
+
#
|
|
89
|
+
# Analyze video:
|
|
90
|
+
# docker run --rm -v $(pwd):/data kinemotion:latest \
|
|
91
|
+
# dropjump-analyze /data/video.mp4 --drop-height 0.40 \
|
|
92
|
+
# --output /data/debug.mp4 --json-output /data/metrics.json
|
|
93
|
+
#
|
|
94
|
+
# Interactive shell:
|
|
95
|
+
# docker run --rm -it --entrypoint /bin/bash kinemotion:latest
|
|
96
|
+
# ============================================================================
|