v0.1.7-alpha
🎉 v0.1.7 – “Integer Integrity” 🎉
Building on our rock-solid foundations, v0.1.7 introduces full support for iterable signal lists, airtight dtype validation, and true integer‐typed injections—plus a major performance win in chunk handling. Up your CAN-ML game! 🚀
✨ New & Improved in v0.1.7
🛠 Bug Fixes & Stability
Iterable expected_signals support
Now accepts any iterable (set, tuple, etc.) without TypeError when concatenating—goodbye “list + set” issues (#13).
Integer‐dtype preservation
Missing integer signals are now injected with zeros (not NaN), so your int32, Int64, etc., stay intact.
dtype_map sanity checks
Invalid or unknown dtype mappings now raise clear ValueErrors immediately, preventing silent downstream type errors.
🎨 Usability & API Tweaks
Flexible expected_signals
Documented and validated as “any iterable of strings”—duplicates and non-string entries are detected up front.
Expose chunk_size
You can now control the per‐iteration chunk size directly in load_blf(...) for finer memory tuning.
Single‐pass concatenation
All BLF chunks are collected and concatenated once, yielding a noticeable speed boost on large logs.
Explicit index alignment
Uniform-timing Series are now aligned to df.index to avoid any subtle misalignments.
🧪 Testing & Coverage
New unit tests for:
Iterable vs. list‐only expected_signals
Integer‐typed injection (int32, Int64)
dtype_map key validation and invalid‐dtype errors
Single‐concat performance (via chunk list fixture)
100% branch coverage in load_blf, including all edge cases around empty logs, filters, and error paths.
📚 Docs & Examples
Updated docstrings to reflect flexible iterables, dtype_map requirements, and the new chunk_size parameter.
Quickstart snippet now shows chunk_size usage and integer‐dtype injection.
🔧 Quickstart
pip install canml==0.1.7from canml.canmlio import load_blf
# Full-file load with:
# • Set of expected signals
# • int32 injection preserved
# • custom chunk size
# • uniform timing
df = load_blf(
blf_path="session.blf",
db="vehicle.dbc",
message_ids={0x123, 0x456},
expected_signals={"Engine_RPM", "Brake_Active"},
dtype_map={"Engine_RPM": "int32", "Brake_Active": "Int64"},
force_uniform_timing=True,
interval_seconds=0.02,
chunk_size=5000
)
print(df.dtypes)Huge thanks to everyone who reported bugs and contributed patches—keep the feedback coming! 🎉