ECG-k-Fold
Utilities for creating reproducible k-fold splits for open-access ECG datasets (FAIR compliant), packaged as a Python library with a CLI and CI/CD. Includes an option to push datasets to the Hugging Face Hub.
Install
pip install ecg-k-fold
For development:
git clone <this-repo>
cd ECG-k-Fold
make init
Or manually:
git clone <this-repo>
cd ECG-k-Fold
# Install uv if not already installed: curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install -e .[dev]
uv run pre-commit install
CLI
Push a local dataset directory to the Hugging Face Hub. Requires an access token with write permissions.
export HF_TOKEN=hf_************************
ecg-k-fold push-dataset ./path/to/dataset \
--repo-id org_or_user/dataset-name \
--private \
--commit-message "Add v1"
Flags:
--repo-id: target dataset repo, e.g.your-org/ecg-dataset--private/--public: repository visibility (default private)--commit-message: commit title for the upload--token: overrideHF_TOKENenv var
Dataset contents are uploaded as-is; common temp files are ignored.
Python API
from pathlib import Path
from ecg_k_fold.datasets.push_hf import push_local_dataset_to_hub
push_local_dataset_to_hub(
local_dir=Path("./path/to/dataset"),
repo_id="your-org/ecg-dataset",
private=True,
commit_message="Initial upload",
hf_token="hf_...",
)
CI/CD
- Lint, type-check, and tests run on PRs and pushes to
developandmain(.github/workflows/ci.yml). - Publishing to PyPI happens on pushing a tag like
vX.Y.Z(.github/workflows/publish.yml). Uses PyPI Trusted Publishers, no PyPI token needed. See https://docs.pypi.org/trusted-publishers/ - A manual workflow can push datasets to Hugging Face (
.github/workflows/hf-dataset-push.yml). SetHF_TOKENin repo secrets.
Gitflow
- Default branches:
main(stable),develop(integration). - Create feature branches off
develop(feature/<name>), open PRs intodevelop. - Release by creating a tag
vX.Y.Zonmainto trigger PyPI publish.
See CONTRIBUTING.md for details.
License
Apache-2.0. See LICENSE.
Metadata
Release files for ecg-k-fold 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ecg_k_fold-0.1.3.tar.gz | 3.9 kB | Without provenance | Details for ecg_k_fold-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecg_k_fold-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for ecg_k_fold-0.1.3-py3-none-any.whl |
Total release size: 7.6 kB
Release files / ecg_k_fold-0.1.3.tar.gz
| Download URL | ecg_k_fold-0.1.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91a0715086a5568c64e854bd98944adebfd57dc291ae7639bc6e5e68cb4f2b74
|
|
BLAKE2b-256 checksum How to use checksums |
eb1bf284f402e02ec84267d052e858b85e519b68d94f9fc910fa0f79ad87e474
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / ecg_k_fold-0.1.3-py3-none-any.whl
| Download URL | ecg_k_fold-0.1.3-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1d2f7eb96d9df2fafb76f7107623d0d86a50b4ac7c919997d798bcb55d71620
|
|
BLAKE2b-256 checksum How to use checksums |
5e4f18f88d0d0fbef1257d28e4691dd41669eb2bfe1661df0707f691bb14c5ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for ecg-k-fold 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.