wristpy.core.cli

CLI for wristpy.

Functions

main([input, output, output_filetype, ...])

Run wristpy orchestrator with command line arguments.

version_check(version)

Print the current version of wristpy and exit.

Classes

ActivityMetric(value[, names, module, ...])

Valid activity metrics for physical activity categorization.

Calibrator(value[, names, module, qualname, ...])

Setting a calibrator class for typer.

Enum(value[, names, module, qualname, type, ...])

Create a collection of name/value pairs.

NonwearAlgorithms(value[, names, module, ...])

Setting a nonwear algorithm class for typer.

OutputFileType(value[, names, module, ...])

Valid output file types for saving data.

class wristpy.core.cli.ActivityMetric(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Valid activity metrics for physical activity categorization.

ag_count = 'ag_count'
enmo = 'enmo'
mad = 'mad'
mims = 'mims'
class wristpy.core.cli.Calibrator(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Setting a calibrator class for typer.

This class is used to define the literal types that are allowed for calibration, and parsing the strings for the orchestrator.

ggir = 'ggir'
gradient = 'gradient'
none = 'none'
class wristpy.core.cli.NonwearAlgorithms(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Setting a nonwear algorithm class for typer.

This class is used to define the literal types that are allowed for nonwear algorithms, and parsing the strings for the orchestrator.

cta = 'cta'
detach = 'detach'
ggir = 'ggir'
class wristpy.core.cli.OutputFileType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Valid output file types for saving data.

csv = '.csv'
parquet = '.parquet'
wristpy.core.cli._parse_thresholds(thresholds: list[str]) list[tuple[float, float, float]][source]

Parse the threshold strings into a list of tuples.

Parameters:

thresholds – List of threshold strings, each containing three space-separated floats.

Returns:

List of tuple float triplets containing the parsed threshold values.

Raises:
  • typer.BadParameter – If any threshold triplet does not contain exactly three floats

  • typer.BadParameter – If threshold format is invalid or values cannot be parsed.

wristpy.core.cli.main(input: ~pathlib.Path = <typer.models.ArgumentInfo object>, output: ~pathlib.Path = <typer.models.OptionInfo object>, output_filetype: ~wristpy.core.cli.OutputFileType = <typer.models.OptionInfo object>, calibrator: ~wristpy.core.cli.Calibrator = <typer.models.OptionInfo object>, activity_metric: list[~wristpy.core.cli.ActivityMetric] = <typer.models.OptionInfo object>, thresholds: list[str] = <typer.models.OptionInfo object>, nonwear_algorithm: list[~wristpy.core.cli.NonwearAlgorithms] = <typer.models.OptionInfo object>, epoch_length: int = <typer.models.OptionInfo object>, verbosity: bool = <typer.models.OptionInfo object>, version: bool = <typer.models.OptionInfo object>) None[source]

Run wristpy orchestrator with command line arguments.

wristpy.core.cli.version_check(version: bool) None[source]

Print the current version of wristpy and exit.