Skip to content

v0.2.3 - Simplified CLI for Threshold Fitting (2025-12-21)

What Changed?

This patch release further simplifies the fit_thresholds.py CLI by removing the required thresholds positional argument. Channels are now automatically detected from the measurement data, making the script even easier to use without requiring users to specify measurement parameters.


What's New

Main Change: Automatic Channel Detection

What it does: The script now automatically detects which channels are present in the measurement data instead of requiring users to provide threshold values as a command-line argument.

How to use it: Simply provide the measurements directory - that's it!

uv run fit_thresholds.py ./measurements
uv run fit_thresholds.py ./measurements --verbose
uv run fit_thresholds.py ./measurements --save

What changed internally:

  • Removed required thresholds positional argument
  • Channels are now auto-detected from DataFrame columns with threshold* pattern
  • Removed parse_thresholds import
  • Removed measurement metadata storage in results

Installation

Quick Start

# Get the release
git checkout v0.2.3

# Setup
uv sync

# Run the threshold fitting script
uv run examples/fit_thresholds.py ./measurements

What's Different from the Last Version?

✅ Added

  • Automatic channel detection from measurement data

🔧 Changed

  • fit_thresholds.py CLI now has single required argument: read_from directory
  • Channels are detected from DataFrame columns instead of CLI argument
  • Removed measurement metadata parameter from output

🐛 Fixed

  • Eliminated need for users to remember and specify measurement parameters

Is It Safe to Upgrade?

Backward Compatible: No - CLI breaking change

  • Scripts using the old CLI with thresholds argument will fail
  • Update scripts to remove the thresholds argument
  • No Python API changes - internal refactoring only
  • Measurement results are identical

Tests Passed

  • ✅ Builds without errors
  • ✅ Lint checks pass (ruff, mypy)
  • ✅ Pre-commit hooks pass (commitizen)

Release Details

  • Date: 2025-12-21
  • Version: v0.2.3
  • Files Changed: 1 (examples/fit_thresholds.py)
  • Commits:
  • 87c3782 - refactor: remove thresholds CLI argument (YAGNI)

Next Steps

Future improvements for fit_thresholds.py:

  • Add visualization of fitted curves with matplotlib
  • Support multiple fitting algorithms (sigmoid, logistic function)
  • Add statistical tests for goodness-of-fit validation
  • Optimize performance for large datasets