Skip to content

Commit 147eeeb

Browse files
Merge pull request #82 from InfoMusCP/dev
Dev
2 parents 08ec98a + f3d0828 commit 147eeeb

4 files changed

Lines changed: 67 additions & 46 deletions

File tree

.github/workflows/pypi_deploy.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Semantic Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Python Semantic Release
22+
id: release
23+
uses: python-semantic-release/python-semantic-release@v9.12.0
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Publish package to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
if: steps.release.outputs.released == 'true'
30+
with:
31+
password: ${{ secrets.PYPI_API_KEY }}

examples/00_quickstart_pipeline.ipynb

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,29 @@
99
"\n",
1010
"Welcome to PyEyesWeb! This library is designed to extract expressive and biomechanical features from motion data in real-time.\n",
1111
"\n",
12-
"In this quickstart, we will build a complete, unified pipeline that extracts:\n",
12+
"## Understanding the Architecture: Concepts vs. Implementation\n",
1313
"\n",
14-
"1. A Static Feature: Bounding Box Contraction (How folded/expanded is the body?)\n",
14+
"PyEyesWeb separates **what** we measure (the conceptual framework) from **how** it is computed (the implementation API).\n",
1515
"\n",
16-
"2. A Dynamic Feature: Kinetic Energy (How much total energy is in the movement?)\n",
16+
"### 1. The Conceptual Framework (What we measure)\n",
17+
"* **Low-Level Features**: Physical biomechanics, including spatial geometry (Contraction, Expansion) and raw kinematics (Kinetic Energy, Velocity).\n",
18+
"* **Mid-Level Features**: Qualitative, expressive aspects of movement that represent behavior or intent (e.g., Smoothness, Directness, Rhythmicity).\n",
19+
"* **Analysis Primitives**: Domain-agnostic mathematical and statistical tools (e.g., Probability/Rarity, Signal Synchronization, Volatility) that can be applied to any data stream.\n",
1720
"\n",
18-
"3. An Analysis Primitive: Smoothness (How fluid is the right hand moving?)"
21+
"### 2. The Implementation API (How we compute it)\n",
22+
"In the code, every metric is implemented as either a **Static** or **Dynamic** feature, defined purely by its memory requirements:\n",
23+
"* **Static Features**: Require only the instantaneous state of the *current frame*. For example, the spatial Contraction of a single pose, or instantaneous Kinetic Energy. They operate on a sliding window of size 1.\n",
24+
"* **Dynamic Features**: Require a historical trajectory to evaluate changes *over time*. For example, checking if a movement was Smooth over the last second. They require a rolling sliding window to store past frames.\n",
25+
"\n",
26+
"In this quickstart, we will build a unified pipeline extracting three metrics that cross-reference these categories:\n",
27+
"1. **Contraction** (Concept: Low-Level | API: Static Feature)\n",
28+
"2. **Kinetic Energy** (Concept: Low-Level | API: Static Feature)\n",
29+
"3. **Smoothness** (Concept: Low-Level | API: Dynamic Feature)"
1930
]
2031
},
2132
{
2233
"cell_type": "code",
23-
"execution_count": 1,
34+
"execution_count": null,
2435
"id": "initial_id",
2536
"metadata": {
2637
"ExecuteTime": {
@@ -39,15 +50,18 @@
3950
}
4051
],
4152
"source": [
42-
"from utils.data_loader import load_qualisys_tsv\n",
53+
"from utils.data_loader import load_motion_data\n",
4354
"from utils.plot_utils import plot_feature_timeseries\n",
4455
"\n",
4556
"# Load data into clean 3D tensors: (Time, Joints, Dimensions)\n",
46-
"pos_tensor, vel_tensor, _, marker_names = load_qualisys_tsv(\"data/trial0001_impulsive.tsv\")\n",
57+
"pos_tensor, vel_tensor, acc_tensor, marker_names = load_motion_data(\"data/trial0001_impulsive.tsv\")\n",
58+
"\n",
59+
"# Let's track the Right Hand\n",
4760
"hand_idx = marker_names.index(\"HAND_RIGHT\")\n",
4861
"\n",
4962
"N_frames, N_joints, N_dims = pos_tensor.shape\n",
50-
"print(f\"Ready to process {N_frames} frames tracking {N_joints} joints!\")"
63+
"print(f\"Loaded {N_frames} frames tracking {N_joints} joints.\")\n",
64+
"print(f\"Position Tensor Shape: ({N_frames}, {N_joints}, {N_dims})\")"
5165
]
5266
},
5367
{
@@ -186,21 +200,21 @@
186200
],
187201
"metadata": {
188202
"kernelspec": {
189-
"display_name": "Python 3",
203+
"display_name": "pwb",
190204
"language": "python",
191205
"name": "python3"
192206
},
193207
"language_info": {
194208
"codemirror_mode": {
195209
"name": "ipython",
196-
"version": 2
210+
"version": 3
197211
},
198212
"file_extension": ".py",
199213
"mimetype": "text/x-python",
200214
"name": "python",
201215
"nbconvert_exporter": "python",
202-
"pygments_lexer": "ipython2",
203-
"version": "2.7.6"
216+
"pygments_lexer": "ipython3",
217+
"version": "3.12.11"
204218
}
205219
},
206220
"nbformat": 4,

pyproject.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pyeyesweb"
7-
version = "0.0.1a5"
7+
version = "1.0.0b1"
88
requires-python = ">=3.8"
99
authors = [
1010
{name = "InfoMus Lab - Casa Paganini", email = "cp.infomus@gmail.com"}
@@ -87,4 +87,12 @@ where = ["."]
8787
[tool.pytest.ini_options]
8888
pythonpath = [
8989
"."
90-
]
90+
]
91+
92+
[tool.semantic_release]
93+
version_toml = [
94+
"pyproject.toml:project.version",
95+
]
96+
branch = "main"
97+
build_command = "pip install build && python -m build"
98+
commit_parser = "angular"

0 commit comments

Comments
 (0)