kinemotion 0.11.7__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.11.7/.dockerignore +59 -0
- kinemotion-0.11.7/.github/ISSUE_TEMPLATE/bug_report.yml +105 -0
- kinemotion-0.11.7/.github/ISSUE_TEMPLATE/config.yml +11 -0
- kinemotion-0.11.7/.github/ISSUE_TEMPLATE/feature_request.yml +96 -0
- kinemotion-0.11.7/.github/pull_request_template.md +102 -0
- kinemotion-0.11.7/.github/workflows/release.yml +111 -0
- kinemotion-0.11.7/.gitignore +66 -0
- kinemotion-0.11.7/.pre-commit-config.yaml +48 -0
- kinemotion-0.11.7/.tool-versions +2 -0
- kinemotion-0.11.7/CHANGELOG.md +326 -0
- kinemotion-0.11.7/CLAUDE.md +259 -0
- kinemotion-0.11.7/CODE_OF_CONDUCT.md +133 -0
- kinemotion-0.11.7/CONTRIBUTING.md +330 -0
- kinemotion-0.11.7/Dockerfile +107 -0
- kinemotion-0.11.7/GEMINI.md +162 -0
- kinemotion-0.11.7/LICENSE +21 -0
- kinemotion-0.11.7/PKG-INFO +530 -0
- kinemotion-0.11.7/README.md +501 -0
- kinemotion-0.11.7/SECURITY.md +45 -0
- kinemotion-0.11.7/docs/BULK_PROCESSING.md +932 -0
- kinemotion-0.11.7/docs/CAMERA_SETUP.md +440 -0
- kinemotion-0.11.7/docs/CAMERA_SETUP_ES.md +440 -0
- kinemotion-0.11.7/docs/CMJ_GUIDE.md +451 -0
- kinemotion-0.11.7/docs/ERRORS_FINDINGS.md +260 -0
- kinemotion-0.11.7/docs/FRAMERATE.md +748 -0
- kinemotion-0.11.7/docs/IMU_METADATA_PRESERVATION.md +267 -0
- kinemotion-0.11.7/docs/PARAMETERS.md +1395 -0
- kinemotion-0.11.7/docs/REAL_TIME_ANALYSIS.md +838 -0
- kinemotion-0.11.7/docs/TRIPLE_EXTENSION.md +310 -0
- kinemotion-0.11.7/docs/VALIDATION_PLAN.md +726 -0
- kinemotion-0.11.7/examples/bulk/README.md +468 -0
- kinemotion-0.11.7/examples/bulk/bulk_processing.py +326 -0
- kinemotion-0.11.7/examples/bulk/simple_example.py +94 -0
- kinemotion-0.11.7/examples/programmatic_usage.py +102 -0
- kinemotion-0.11.7/pyproject.toml +139 -0
- kinemotion-0.11.7/samples/cmjs/README.md +47 -0
- kinemotion-0.11.7/src/kinemotion/__init__.py +31 -0
- kinemotion-0.11.7/src/kinemotion/api.py +953 -0
- kinemotion-0.11.7/src/kinemotion/cli.py +22 -0
- kinemotion-0.11.7/src/kinemotion/cmj/__init__.py +5 -0
- kinemotion-0.11.7/src/kinemotion/cmj/analysis.py +528 -0
- kinemotion-0.11.7/src/kinemotion/cmj/cli.py +543 -0
- kinemotion-0.11.7/src/kinemotion/cmj/debug_overlay.py +466 -0
- kinemotion-0.11.7/src/kinemotion/cmj/joint_angles.py +290 -0
- kinemotion-0.11.7/src/kinemotion/cmj/kinematics.py +191 -0
- kinemotion-0.11.7/src/kinemotion/core/__init__.py +40 -0
- kinemotion-0.11.7/src/kinemotion/core/auto_tuning.py +289 -0
- kinemotion-0.11.7/src/kinemotion/core/cli_utils.py +306 -0
- kinemotion-0.11.7/src/kinemotion/core/debug_overlay_utils.py +166 -0
- kinemotion-0.11.7/src/kinemotion/core/filtering.py +345 -0
- kinemotion-0.11.7/src/kinemotion/core/pose.py +220 -0
- kinemotion-0.11.7/src/kinemotion/core/smoothing.py +412 -0
- kinemotion-0.11.7/src/kinemotion/core/video_io.py +166 -0
- kinemotion-0.11.7/src/kinemotion/dropjump/__init__.py +29 -0
- kinemotion-0.11.7/src/kinemotion/dropjump/analysis.py +639 -0
- kinemotion-0.11.7/src/kinemotion/dropjump/cli.py +716 -0
- kinemotion-0.11.7/src/kinemotion/dropjump/debug_overlay.py +167 -0
- kinemotion-0.11.7/src/kinemotion/dropjump/kinematics.py +551 -0
- kinemotion-0.11.7/src/kinemotion/py.typed +0 -0
- kinemotion-0.11.7/tests/__init__.py +1 -0
- kinemotion-0.11.7/tests/test_adaptive_threshold.py +201 -0
- kinemotion-0.11.7/tests/test_api.py +319 -0
- kinemotion-0.11.7/tests/test_aspect_ratio.py +119 -0
- kinemotion-0.11.7/tests/test_cmj_analysis.py +158 -0
- kinemotion-0.11.7/tests/test_cmj_kinematics.py +184 -0
- kinemotion-0.11.7/tests/test_com_estimation.py +167 -0
- kinemotion-0.11.7/tests/test_contact_detection.py +70 -0
- kinemotion-0.11.7/tests/test_filtering.py +395 -0
- kinemotion-0.11.7/tests/test_kinematics.py +75 -0
- kinemotion-0.11.7/tests/test_polyorder.py +155 -0
- kinemotion-0.11.7/uv.lock +1658 -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,105 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug or issue with Kinemotion
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thank you for taking the time to report a bug! Please fill out the form below with as much detail as possible.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Bug Description
|
|
15
|
+
description: A clear and concise description of what the bug is.
|
|
16
|
+
placeholder: Describe what happened...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: reproduction
|
|
22
|
+
attributes:
|
|
23
|
+
label: Steps to Reproduce
|
|
24
|
+
description: Detailed steps to reproduce the behavior.
|
|
25
|
+
placeholder: |
|
|
26
|
+
1. Run command '...'
|
|
27
|
+
2. With video file '...'
|
|
28
|
+
3. See error '...'
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: expected
|
|
34
|
+
attributes:
|
|
35
|
+
label: Expected Behavior
|
|
36
|
+
description: What you expected to happen.
|
|
37
|
+
placeholder: Describe the expected behavior...
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: actual
|
|
43
|
+
attributes:
|
|
44
|
+
label: Actual Behavior
|
|
45
|
+
description: What actually happened.
|
|
46
|
+
placeholder: Describe what actually happened...
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
49
|
+
|
|
50
|
+
- type: textarea
|
|
51
|
+
id: command
|
|
52
|
+
attributes:
|
|
53
|
+
label: Command Used
|
|
54
|
+
description: The exact command you ran (please remove any sensitive paths if needed).
|
|
55
|
+
placeholder: |
|
|
56
|
+
kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --output debug.mp4
|
|
57
|
+
render: bash
|
|
58
|
+
validations:
|
|
59
|
+
required: false
|
|
60
|
+
|
|
61
|
+
- type: textarea
|
|
62
|
+
id: environment
|
|
63
|
+
attributes:
|
|
64
|
+
label: Environment
|
|
65
|
+
description: Information about your environment.
|
|
66
|
+
value: |
|
|
67
|
+
- OS: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11]
|
|
68
|
+
- Python version: [run `python --version`]
|
|
69
|
+
- Kinemotion version: [run `kinemotion --version` or check `pyproject.toml`]
|
|
70
|
+
- Video format: [e.g., MP4 H.264, MOV, AVI]
|
|
71
|
+
- Video specs: [e.g., 1920x1080, 30fps, iPhone 15 Pro recording]
|
|
72
|
+
validations:
|
|
73
|
+
required: true
|
|
74
|
+
|
|
75
|
+
- type: textarea
|
|
76
|
+
id: logs
|
|
77
|
+
attributes:
|
|
78
|
+
label: Error Messages / Logs
|
|
79
|
+
description: Any error messages, stack traces, or relevant log output.
|
|
80
|
+
placeholder: Paste error messages or logs here...
|
|
81
|
+
render: text
|
|
82
|
+
validations:
|
|
83
|
+
required: false
|
|
84
|
+
|
|
85
|
+
- type: textarea
|
|
86
|
+
id: additional
|
|
87
|
+
attributes:
|
|
88
|
+
label: Additional Context
|
|
89
|
+
description: Add any other context about the problem here (screenshots, debug videos, etc.).
|
|
90
|
+
placeholder: Any additional information...
|
|
91
|
+
validations:
|
|
92
|
+
required: false
|
|
93
|
+
|
|
94
|
+
- type: checkboxes
|
|
95
|
+
id: checklist
|
|
96
|
+
attributes:
|
|
97
|
+
label: Pre-submission Checklist
|
|
98
|
+
description: Please confirm the following before submitting.
|
|
99
|
+
options:
|
|
100
|
+
- label: I have searched existing issues to avoid duplicates
|
|
101
|
+
required: true
|
|
102
|
+
- label: I am using the latest version of Kinemotion
|
|
103
|
+
required: false
|
|
104
|
+
- label: I have included all relevant environment details
|
|
105
|
+
required: true
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
blank_issues_enabled: true
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Question or Discussion
|
|
4
|
+
url: https://github.com/feniix/kinemotion/discussions
|
|
5
|
+
about: Ask questions or discuss ideas with the community
|
|
6
|
+
- name: Documentation
|
|
7
|
+
url: https://github.com/feniix/kinemotion/blob/main/README.md
|
|
8
|
+
about: Read the documentation, usage guides, and troubleshooting tips
|
|
9
|
+
- name: Contributing Guide
|
|
10
|
+
url: https://github.com/feniix/kinemotion/blob/main/CONTRIBUTING.md
|
|
11
|
+
about: Learn how to contribute to Kinemotion
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or enhancement for Kinemotion
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thank you for suggesting a new feature! Please describe your idea in detail below.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem Statement
|
|
15
|
+
description: Is your feature request related to a problem? Please describe.
|
|
16
|
+
placeholder: "I'm frustrated when... / It would be helpful if..."
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: solution
|
|
22
|
+
attributes:
|
|
23
|
+
label: Proposed Solution
|
|
24
|
+
description: Describe the solution or feature you'd like to see.
|
|
25
|
+
placeholder: "I would like Kinemotion to..."
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: alternatives
|
|
31
|
+
attributes:
|
|
32
|
+
label: Alternatives Considered
|
|
33
|
+
description: Describe any alternative solutions or features you've considered.
|
|
34
|
+
placeholder: "Another approach could be..."
|
|
35
|
+
validations:
|
|
36
|
+
required: false
|
|
37
|
+
|
|
38
|
+
- type: dropdown
|
|
39
|
+
id: feature-type
|
|
40
|
+
attributes:
|
|
41
|
+
label: Feature Type
|
|
42
|
+
description: What type of feature is this?
|
|
43
|
+
options:
|
|
44
|
+
- New analysis capability
|
|
45
|
+
- Improved accuracy/precision
|
|
46
|
+
- Performance improvement
|
|
47
|
+
- Better output/visualization
|
|
48
|
+
- CLI/UX improvement
|
|
49
|
+
- Documentation improvement
|
|
50
|
+
- Other
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
|
|
54
|
+
- type: textarea
|
|
55
|
+
id: use-case
|
|
56
|
+
attributes:
|
|
57
|
+
label: Use Case
|
|
58
|
+
description: Describe your specific use case for this feature.
|
|
59
|
+
placeholder: "I want to analyze... / This would help me..."
|
|
60
|
+
validations:
|
|
61
|
+
required: true
|
|
62
|
+
|
|
63
|
+
- type: dropdown
|
|
64
|
+
id: priority
|
|
65
|
+
attributes:
|
|
66
|
+
label: Priority
|
|
67
|
+
description: How important is this feature to you?
|
|
68
|
+
options:
|
|
69
|
+
- Critical - blocking my work
|
|
70
|
+
- High - would significantly improve my workflow
|
|
71
|
+
- Medium - would be nice to have
|
|
72
|
+
- Low - minor enhancement
|
|
73
|
+
validations:
|
|
74
|
+
required: false
|
|
75
|
+
|
|
76
|
+
- type: textarea
|
|
77
|
+
id: additional
|
|
78
|
+
attributes:
|
|
79
|
+
label: Additional Context
|
|
80
|
+
description: Add any other context, screenshots, examples, or references about the feature request.
|
|
81
|
+
placeholder: "Related papers, similar tools, mockups, etc..."
|
|
82
|
+
validations:
|
|
83
|
+
required: false
|
|
84
|
+
|
|
85
|
+
- type: checkboxes
|
|
86
|
+
id: contribution
|
|
87
|
+
attributes:
|
|
88
|
+
label: Contribution
|
|
89
|
+
description: Would you be willing to contribute to this feature?
|
|
90
|
+
options:
|
|
91
|
+
- label: I would be willing to submit a PR for this feature
|
|
92
|
+
required: false
|
|
93
|
+
- label: I can help with testing this feature
|
|
94
|
+
required: false
|
|
95
|
+
- label: I can help with documentation for this feature
|
|
96
|
+
required: false
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Provide a brief description of the changes in this PR -->
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
<!-- Mark the relevant option with an "x" -->
|
|
8
|
+
|
|
9
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
10
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
11
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
12
|
+
- [ ] Documentation update
|
|
13
|
+
- [ ] Code refactoring (no functional changes)
|
|
14
|
+
- [ ] Performance improvement
|
|
15
|
+
- [ ] Test coverage improvement
|
|
16
|
+
|
|
17
|
+
## Related Issues
|
|
18
|
+
|
|
19
|
+
<!-- Link to related issues using #issue_number -->
|
|
20
|
+
|
|
21
|
+
Closes #
|
|
22
|
+
Related to #
|
|
23
|
+
|
|
24
|
+
## Changes Made
|
|
25
|
+
|
|
26
|
+
<!-- Describe the changes in detail -->
|
|
27
|
+
|
|
28
|
+
-
|
|
29
|
+
-
|
|
30
|
+
-
|
|
31
|
+
|
|
32
|
+
## Testing
|
|
33
|
+
|
|
34
|
+
<!-- Describe the testing you've done -->
|
|
35
|
+
|
|
36
|
+
### Test Environment
|
|
37
|
+
|
|
38
|
+
- OS: <!-- e.g., macOS 14.0, Ubuntu 22.04 -->
|
|
39
|
+
- Python version: <!-- e.g., 3.12.7 -->
|
|
40
|
+
- Video specs tested: <!-- e.g., 1920x1080 30fps MP4 -->
|
|
41
|
+
|
|
42
|
+
### Test Cases
|
|
43
|
+
|
|
44
|
+
<!-- Describe what you tested -->
|
|
45
|
+
|
|
46
|
+
- [ ] Tested with sample videos
|
|
47
|
+
- [ ] Added/updated unit tests
|
|
48
|
+
- [ ] All existing tests pass
|
|
49
|
+
- [ ] Tested edge cases
|
|
50
|
+
|
|
51
|
+
### Commands Run
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Example test commands
|
|
55
|
+
uv run kinemotion dropjump-analyze test_video.mp4 --drop-height 0.40
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Code Quality Checklist
|
|
59
|
+
|
|
60
|
+
<!-- Confirm all checks pass -->
|
|
61
|
+
|
|
62
|
+
- [ ] Code follows the project's style guidelines
|
|
63
|
+
- [ ] Code is formatted with Black: `uv run black src/`
|
|
64
|
+
- [ ] Linting passes: `uv run ruff check`
|
|
65
|
+
- [ ] Type checking passes: `uv run mypy src/kinemotion`
|
|
66
|
+
- [ ] All tests pass: `uv run pytest`
|
|
67
|
+
- [ ] Added type annotations to all new functions
|
|
68
|
+
- [ ] Added docstrings to public functions/classes
|
|
69
|
+
- [ ] No new linting warnings introduced
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
<!-- Update documentation as needed -->
|
|
74
|
+
|
|
75
|
+
- [ ] Updated README.md (if needed)
|
|
76
|
+
- [ ] Updated CLAUDE.md (if needed)
|
|
77
|
+
- [ ] Updated docs/PARAMETERS.md (if adding/changing parameters)
|
|
78
|
+
- [ ] Added/updated code comments
|
|
79
|
+
- [ ] Added docstrings
|
|
80
|
+
|
|
81
|
+
## Screenshots / Videos
|
|
82
|
+
|
|
83
|
+
<!-- If applicable, add screenshots or demo videos -->
|
|
84
|
+
|
|
85
|
+
## Breaking Changes
|
|
86
|
+
|
|
87
|
+
<!-- If this PR introduces breaking changes, describe them and migration steps -->
|
|
88
|
+
|
|
89
|
+
## Additional Notes
|
|
90
|
+
|
|
91
|
+
<!-- Any additional information reviewers should know -->
|
|
92
|
+
|
|
93
|
+
## Reviewer Checklist
|
|
94
|
+
|
|
95
|
+
<!-- For reviewers -->
|
|
96
|
+
|
|
97
|
+
- [ ] Code quality meets project standards
|
|
98
|
+
- [ ] Tests are comprehensive and pass
|
|
99
|
+
- [ ] Documentation is clear and complete
|
|
100
|
+
- [ ] No security concerns
|
|
101
|
+
- [ ] Performance impact is acceptable
|
|
102
|
+
- [ ] Breaking changes are justified and documented
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
env:
|
|
97
|
+
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
|
98
|
+
|
|
99
|
+
- name: Build and push Docker image
|
|
100
|
+
id: push
|
|
101
|
+
uses: docker/build-push-action@v6
|
|
102
|
+
with:
|
|
103
|
+
context: .
|
|
104
|
+
push: true
|
|
105
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
106
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
107
|
+
annotations: ${{ steps.meta.outputs.annotations }}
|
|
108
|
+
platforms: linux/amd64
|
|
109
|
+
# Multi-scope caching: Docker layers + uv cache
|
|
110
|
+
cache-from: type=gha
|
|
111
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# Virtual environments
|
|
24
|
+
venv/
|
|
25
|
+
ENV/
|
|
26
|
+
env/
|
|
27
|
+
.venv
|
|
28
|
+
|
|
29
|
+
# uv
|
|
30
|
+
.uv/
|
|
31
|
+
|
|
32
|
+
# IDEs
|
|
33
|
+
.vscode/
|
|
34
|
+
.idea/
|
|
35
|
+
*.swp
|
|
36
|
+
*.swo
|
|
37
|
+
*~
|
|
38
|
+
|
|
39
|
+
# Testing
|
|
40
|
+
.pytest_cache/
|
|
41
|
+
.coverage
|
|
42
|
+
htmlcov/
|
|
43
|
+
|
|
44
|
+
# Output files
|
|
45
|
+
*.mov
|
|
46
|
+
*.MOV
|
|
47
|
+
*.mp4
|
|
48
|
+
*.avi
|
|
49
|
+
*.json
|
|
50
|
+
*.csv
|
|
51
|
+
!pyproject.toml
|
|
52
|
+
|
|
53
|
+
# Logs
|
|
54
|
+
*.log
|
|
55
|
+
combined.log
|
|
56
|
+
error.log
|
|
57
|
+
|
|
58
|
+
# OS
|
|
59
|
+
.DS_Store
|
|
60
|
+
Thumbs.db
|
|
61
|
+
|
|
62
|
+
*.mp4
|
|
63
|
+
*.jpeg
|
|
64
|
+
*.jpg
|
|
65
|
+
|
|
66
|
+
.claude/settings.local.json*
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
repos:
|
|
4
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
+
rev: v6.0.0
|
|
6
|
+
hooks:
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
args: ['--maxkb=1000']
|
|
12
|
+
- id: check-merge-conflict
|
|
13
|
+
- id: check-toml
|
|
14
|
+
- id: debug-statements
|
|
15
|
+
- id: mixed-line-ending
|
|
16
|
+
|
|
17
|
+
- repo: https://github.com/psf/black
|
|
18
|
+
rev: 25.9.0
|
|
19
|
+
hooks:
|
|
20
|
+
- id: black
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
23
|
+
rev: v0.14.3
|
|
24
|
+
hooks:
|
|
25
|
+
- id: ruff
|
|
26
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
27
|
+
|
|
28
|
+
- repo: https://github.com/RobertCraigie/pyright-python
|
|
29
|
+
rev: v1.1.407
|
|
30
|
+
hooks:
|
|
31
|
+
- id: pyright
|
|
32
|
+
files: ^src/
|
|
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]
|