ease-ecg 0.0.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.
- ease_ecg-0.0.1/CLAUDE.md +75 -0
- ease_ecg-0.0.1/LICENSE +21 -0
- ease_ecg-0.0.1/PKG-INFO +25 -0
- ease_ecg-0.0.1/README.md +10 -0
- ease_ecg-0.0.1/pyproject.toml +25 -0
- ease_ecg-0.0.1/src/ease_ecg/__init__.py +3 -0
ease_ecg-0.0.1/CLAUDE.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# EASE — Ecg Analysis SoftwarE
|
|
2
|
+
|
|
3
|
+
## What this is
|
|
4
|
+
|
|
5
|
+
A Python port of a MATLAB ECG analysis tool. It analyses 10-second 12-lead ECG snippets:
|
|
6
|
+
automatically detects fiducial points, lets the user confirm caliper positions and labels
|
|
7
|
+
in a browser-based review UI, then computes several hundred parameters per record.
|
|
8
|
+
|
|
9
|
+
Target users are research students processing hundreds to thousands of snippets on their
|
|
10
|
+
own laptops, with no Python knowledge required beyond `uvx ease-ecg`.
|
|
11
|
+
|
|
12
|
+
The original MATLAB source lives OUTSIDE this repo (sibling directory `../ease-matlab/`,
|
|
13
|
+
read-only reference). Never copy it into this repo; its ownership and licensing are
|
|
14
|
+
separate from the Python port.
|
|
15
|
+
|
|
16
|
+
## Names
|
|
17
|
+
|
|
18
|
+
- PyPI distribution: `ease-ecg`
|
|
19
|
+
- Import name: `ease_ecg`
|
|
20
|
+
- CLI command: `ease-ecg`
|
|
21
|
+
- Licence: MIT
|
|
22
|
+
|
|
23
|
+
## Architecture rules
|
|
24
|
+
|
|
25
|
+
- `src/ease_ecg/` is the analysis library. It must have NO UI dependencies
|
|
26
|
+
(no dash, plotly, or any web framework imports).
|
|
27
|
+
- `src/ease_ecg/ui/` is a thin Dash shell over the library's data model. No signal
|
|
28
|
+
processing or parameter calculation lives here. Dash/plotly are an optional extra
|
|
29
|
+
(`pip install ease-ecg[ui]`).
|
|
30
|
+
- `src/ease_ecg/cli.py` exposes `ease-ecg batch` and `ease-ecg review`.
|
|
31
|
+
- Core data model in `src/ease_ecg/model.py`: `Record` (signal, sampling rate, lead names,
|
|
32
|
+
metadata), `Fiducials`, `Annotations` (labels, review status), `Results`.
|
|
33
|
+
Pydantic models or dataclasses; decide once and be consistent.
|
|
34
|
+
- On-disk formats: one JSON sidecar per record (fiducials, annotations, review status),
|
|
35
|
+
parameters in Parquet. Every results file records the ease-ecg version and the analysis
|
|
36
|
+
parameters used. Treat the schema as a contract; changes require a migration note.
|
|
37
|
+
- Workflow is batch-then-review: automatic analysis over a whole folder first, then a
|
|
38
|
+
keyboard-driven review queue. Design for throughput of human review, not per-record
|
|
39
|
+
analysis.
|
|
40
|
+
|
|
41
|
+
## Correctness
|
|
42
|
+
|
|
43
|
+
- `tests/reference/` contains inputs and MATLAB outputs for a set of reference records.
|
|
44
|
+
These are the oracle. Public test data must be synthetic or openly licensed
|
|
45
|
+
(e.g. PhysioNet PTB-XL); real study data stays private.
|
|
46
|
+
- Every ported function gets a test comparing against the MATLAB output with an explicit,
|
|
47
|
+
justified tolerance. Never loosen a tolerance to make a test pass; investigate the
|
|
48
|
+
difference and report it.
|
|
49
|
+
- Known MATLAB -> NumPy traps: 1-based indexing, `round` (half-away-from-zero vs
|
|
50
|
+
banker's), `filtfilt` padding defaults, FFT normalisation, `std` ddof, column-major
|
|
51
|
+
`reshape`, `find` semantics, inclusive ranges. When one bites, add a comment at the
|
|
52
|
+
call site explaining the MATLAB-equivalence choice.
|
|
53
|
+
- If MATLAB code looks buggy, do not silently port the bug. Stop, describe it, and ask
|
|
54
|
+
whether to replicate or fix.
|
|
55
|
+
|
|
56
|
+
## Tooling
|
|
57
|
+
|
|
58
|
+
- Python >=3.12, managed with `uv`. Commands: `uv sync`, `uv run pytest`,
|
|
59
|
+
`uv run ruff check`, `uv run ruff format`, `uv run mypy src`, `uv build`.
|
|
60
|
+
- Build backend: hatchling. Type hints everywhere.
|
|
61
|
+
- Core deps: numpy, scipy, pandas, pyarrow, pydantic. I/O: wfdb, pyedflib.
|
|
62
|
+
UI extra: dash, plotly. Ask before adding anything else.
|
|
63
|
+
- CI: GitHub Actions. Pin third-party actions to full commit SHAs. Publishing uses
|
|
64
|
+
PyPI trusted publishing (OIDC) only; never API tokens.
|
|
65
|
+
- Conventional commits. Update CHANGELOG.md (Unreleased section) for user-visible changes.
|
|
66
|
+
|
|
67
|
+
## Working style
|
|
68
|
+
|
|
69
|
+
- Port one function at a time, test-first against the reference data, then commit.
|
|
70
|
+
- Do not port MATLAB GUI logic. Only signal processing, fiducial detection and parameter
|
|
71
|
+
calculation. The UI is redesigned, not translated.
|
|
72
|
+
- Maintain `PORTING_NOTES.md`: every MATLAB function, with status
|
|
73
|
+
(ported / skipped / blocked) and a one-line reason.
|
|
74
|
+
- Prefer small, reviewable changes. Show a plan before multi-file changes.
|
|
75
|
+
- Do not push or create tags unless explicitly asked.
|
ease_ecg-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tuomas Kenttä
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ease_ecg-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ease-ecg
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: EASE (Ecg Analysis SoftwarE): automated analysis of 12-lead ECG snippets with interactive caliper review.
|
|
5
|
+
Project-URL: Homepage, https://github.com/tkentta/ease-ecg
|
|
6
|
+
Author: Your Name
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 1 - Planning
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
13
|
+
Requires-Python: >=3.12
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# EASE: ECG Analysis Software
|
|
17
|
+
|
|
18
|
+
Automated analysis of 10-second 12-lead ECG snippets with interactive review. Python port of the original MATLAB tool.
|
|
19
|
+
|
|
20
|
+
**Status:** early development — not yet usable. Watch this repo or check back
|
|
21
|
+
for the first release.
|
|
22
|
+
|
|
23
|
+
## Licence
|
|
24
|
+
|
|
25
|
+
MIT
|
ease_ecg-0.0.1/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# EASE: ECG Analysis Software
|
|
2
|
+
|
|
3
|
+
Automated analysis of 10-second 12-lead ECG snippets with interactive review. Python port of the original MATLAB tool.
|
|
4
|
+
|
|
5
|
+
**Status:** early development — not yet usable. Watch this repo or check back
|
|
6
|
+
for the first release.
|
|
7
|
+
|
|
8
|
+
## Licence
|
|
9
|
+
|
|
10
|
+
MIT
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ease-ecg"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "EASE (Ecg Analysis SoftwarE): automated analysis of 12-lead ECG snippets with interactive caliper review."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
authors = [{ name = "Your Name" }]
|
|
13
|
+
requires-python = ">=3.12"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 1 - Planning",
|
|
16
|
+
"Intended Audience :: Science/Research",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Topic :: Scientific/Engineering :: Medical Science Apps.",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://github.com/tkentta/ease-ecg"
|
|
23
|
+
|
|
24
|
+
[tool.hatch.build.targets.wheel]
|
|
25
|
+
packages = ["src/ease_ecg"]
|