semvec/pypi-packages huggingface dataset:
rapidhrv 0.2.7
A package for preprocessing, analyzing and visualizing cardiac data
License: MIT
Requires Python: <3.13,>=3.11

# RapidHRV

RapidHRV is a data processing pipeline for the analysis and visualization of cardiac data.

Please provide credit where appropriate:

Kirk, P. A., Bryan, A. D., Garfinkel, S. N., & Robinson, O. J. (2022). RapidHRV: An open-source toolbox for extracting heart rate and heart rate variability. PeerJ, 10, e13147. https://doi.org/10.7717/peerj.13147

This library is distributed under an 
[MIT License](https://raw.githubusercontent.com/peterakirk/RapidHRV/main/LICENSE)

## Installation

```shell
pip install rapidhrv
```

## Usage

Given a numpy array, or something convertable to it (such as a list),
`rapidhrv.preprocess` can generate input suitable for analysis with
`rapidhrv.analyze`, which will return a pandas dataframe containing HRV data.

```python
import numpy as np
import rapidhrv as rhv

my_data = np.load("my_data.npy")  # Load data
data = rhv.Signal(my_data, sample_rate=50)  # Convert to rhv Signal class
preprocessed = rhv.preprocess(data)  # Preprocess: may interpolate data, check the docstring on `rapidhrv.preprocess`
result = rhv.analyze(preprocessed)  # Analyze signal
```

## Documentation

Please see the included [tutorial notebook](https://github.com/peterakirk/RapidHRV/blob/main/resources/tutorial.ipynb).

## Development

In order to get a working development environment,
please install [Poetry](https://python-poetry.org/) for your platform,
and run `poetry install` to generate a virtual environment.

If you plan on making any changes to the included notebooks,
please run `nbstripout --install` from within the poetry venv before committing any changes.

To run said notebooks from the environment provided by poetry,
install the required dependencies with `poetry install --extras notebooks`.
dag2langgraph 0.1.1
Converts a Directed Acyclic Graph (DAG) JSON to LangGraph JSON format.
License: MIT
Requires Python: <4.0,>=3.8

# dag2langgraph

Compiles a DAG JSON into LangGraph JSON. Includes validation for structure and cycles.

## Install / Run (Poetry)

- Ensure Poetry is installed: https://python-poetry.org/docs/#installation
- Create an in-project virtualenv and install deps (creates `.venv`):
  - `make setup`
- Run tests:
  - `make test`
- Convert a DAG file via console script:
  - `poetry run dag2langgraph examples/sample_dag.json -o /tmp/langgraph.json`
- Or via stdin/stdout:
  - `cat examples/sample_dag.json | poetry run dag2langgraph - > /tmp/langgraph.json`

## Makefile Targets

- `setup`: creates/uses `.venv` and installs deps via Poetry.
- `test`: `poetry run pytest -q`.
- `run-sample`: run CLI on `examples/sample_dag.json`.
- `lock`: (re)generate `poetry.lock` to match `pyproject.toml`.
- `patch`: bump patch version via Poetry, commit, and tag `vX.Y.Z`.
- `publish`: push branch and tag to `origin` (triggers GitHub Actions publish to PyPI).
- `clean`: remove `.venv` and caches.

## Publishing

- GitHub Actions workflow `Publish to PyPI` builds and uploads the package when:
  - A GitHub Release is published, or
  - You push a tag like `v0.1.0`, or
  - You manually dispatch the workflow.

- Required secret in the repo settings:
  - `PYPI_API_TOKEN`: PyPI API token (user: `__token__`).

## Releasing (Patch)

- Use the `Release Patch Version` workflow (workflow_dispatch) to:
  - Bump the patch version via Poetry
  - Commit the change and create tag `vX.Y.Z`
  - Create a GitHub Release
  - This will trigger the publish workflow to upload to PyPI


## Input DAG schema (summary)

- `nodes`: array of objects with `id` (string), `type` ("function" | "tool"), `name` (string)
- `edges`: array of objects with `source` (string), `target` (string), optional `condition` (string)
- `entry_point`: string (must match a node `id`)

## Output LangGraph JSON (summary)

- `nodes`: object keyed by node `id`, each with `{ type, name }`
- `edges`: array of `{ source, target }` plus `condition` when provided
- `entry_point`: copied from input

## Errors

- `Entry point not specified.` — when `entry_point` is missing/empty
- `Invalid DAG structure or cycles detected.` — for malformed fields, missing refs, duplicate ids, or cycles