v0.1.5-alpha
🎉 v0.1.5-alpha – “CAN-do Attitude” 🎉
Buckle up, canml fans! v0.1.5-alpha rolls in with bug fixes, polish, and fresh enhancements that bring your CAN ML workflows even closer to perfection. Let’s dive in! 🚗💨
✨ New & Improved in v0.1.5-alpha
🛠 Bug Fixes & Stability
DBC string parsing resilience: Handle malformed DBC comments and whitespace quirks without crashing (no more ParseError on stray headers).
iter_blf_chunks cleanup: Ensured BLFReader.stop() always runs—even on exceptions or empty files—to free resources.
load_blf FileNotFoundError order: Now checks BLF path before DBC parsing to fail fast on missing logs.
Signal injection logic: Fixed edge-case where an expected signal named timestamp was overwritten.
🎨 Usability & API tweaks
Return empty DataFrame for load_blf when no messages decoded (rather than a multi-index mishap).
to_csv header control: Added header flag documentation and fixed header duplication when mode='a' and header=False.
to_parquet compression: Supported additional codecs (brotli, gzip) with explicit error messages on unsupported options.
Logging verbosity: Downgraded info logs in loops; major events still logged but no more flooding for high-frequency messages.
🧪 Testing & Coverage
97% coverage across module - Added new unit tests for DBC comment anomalies and empty-BLF edge cases.
Integration tests for round-trip CSV
📚 Docs & Examples
Tutorial: “End-to-End CAN ML”: New step-by-step guide on ReadTheDocs covering raw BLF → feature extraction → modeling.
🔧 Quickstart
pip install canml==0.1.5-alpha
from canml.canmlio import (
load_dbc_files, iter_blf_chunks, load_blf, to_csv, to_parquet
)
# Merge DBCs with robust comment parsing
db = load_dbc_files("vehicle.dbc", prefix_signals=True)
# Stream-decode and write Parquet shards
for idx, chunk in enumerate(iter_blf_chunks(
blf_path="drive.blf", db=db, chunk_size=5000
)):
to_parquet(chunk, f"drive_shard_{idx}.parquet", compression="brotli")
# Full-load, inject any missing signals, uniform timing
df = load_blf(
blf_path="session.blf", db=db,
expected_signals=["Engine_RPM","Brake_Active"],
force_uniform_timing=True
)
# Export to CSV for reporting
to_csv(df, "session_report.csv")
print("Done! v0.1.5-alpha at your service 🤖")Thanks to everyone who reported issues, wrote tests, and contributed improvements! Keep the feedback coming via GitHub issues and PRs—let’s keep CAN logs crunching! 🚀