Skip to content

v0.11.3 - Code Quality & Variable Naming Standardization (2025-12-28)

What Changed?

This patch release standardizes variable naming conventions across example scripts for improved code consistency and readability. The refactoring focuses on output file variable naming, ensuring all measurement scripts follow the same convention as data conversion scripts. All changes maintain full backward compatibility.


What's New

Output Variable Naming Standardization

What it does: All example measurement scripts (get_thresholds.py, get_events.py, get_runs.py) now use consistent variable naming for output file paths. The filename variable has been standardized to output across all scripts, matching the convention established in data conversion scripts (from_jsonl_to_parquet.py, from_parquet_to_root.py, from_jsonl_to_root.py, create_run_summary.py).

Benefits:

  • Code Consistency: All scripts now follow the same naming convention for output file paths
  • Improved Readability: Clearer variable names make intent more obvious
  • Easier Maintenance: New developers quickly understand the pattern used across scripts
  • Reduced Cognitive Load: Less time spent understanding naming conventions

Example:

The refactored pattern is now consistent across all scripts:

# Before (inconsistent)
filename = _generate_filename(mac_address=measure.metadata.mac_address, run_id=0)
stderr.print(f"[cyan]Saving data to {filename}[/cyan]")
fd = filename.open("w", encoding="utf-8")

# After (consistent)
output = _generate_filename(mac_address=measure.metadata.mac_address, run_id=0)
stderr.print(f"[cyan]Saving data to {output}[/cyan]")
fd = output.open("w", encoding="utf-8")

Installation

Quick Start

# Get the release
git checkout v0.11.3

# Setup
task env:setup

# Run measurement script with new naming convention
uv run get_events.py "1:300;2:320;3:310" 100 --save --verbose

What's Different from the Last Version?

✅ Added

  • Code quality improvement: Standardized output variable naming across all example measurement scripts

🔧 Changed

  • get_thresholds.py: Output file variable renamed from filename to output (8 occurrences)
  • get_events.py: Output file variable renamed from filename to output (17 occurrences)
  • get_runs.py: Output file variable renamed from filename to output (11 occurrences)
  • All scripts now follow the naming convention: output for output file paths, input_dir for input directories

🐛 Fixed

  • No bug fixes in this release (code quality improvement only)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • All changes are internal variable naming only with no behavioral changes
  • Command-line interface and functionality remain unchanged
  • Output file handling is identical to previous version
  • All measurement data collection works as before
  • No impact on users' measurement workflows or data quality
  • Existing scripts and automation continue to work unchanged

Tests Passed

  • ✅ Builds without errors
  • ✅ All example scripts execute successfully with new variable naming
  • ✅ Measurement data collection produces identical results
  • ✅ File I/O operations work correctly with renamed variables
  • ✅ Code consistency verified across all affected scripts

Release Details

  • Date: 2025-12-28
  • Version: v0.11.3
  • Files Changed: 3 (get_thresholds.py, get_events.py, get_runs.py)
  • Total Commits: 4 (3 refactoring commits + 1 version bump)

Commit Summary:

  • 589f6bd - refactor(examples): standardize output variable naming in get_thresholds.py
  • 80e0f74 - refactor(examples): standardize output variable naming in get_events.py
  • 332f241 - refactor(examples): standardize output variable naming in get_runs.py
  • fe2f798 - bump: version 0.11.2 → 0.11.3

Next Steps

Future enhancements planned:

  • Broader Code Quality: Apply similar naming consistency to other variable types (e.g., cmdcommand)
  • Documentation: Add coding style guide documenting variable naming conventions
  • Testing: Expand automated tests to verify code quality standards
  • Performance: Continue optimizing measurement data collection efficiency