Skip to content

v0.1.14-alpha

Latest

Choose a tag to compare

@CosminBMemetea CosminBMemetea released this 03 May 16:41

🎉 v0.1.14 – “Category Cleanse” 🎉

No more duplicate‐category crashes—v0.1.14 rounds out our enum handling with an important fix that deduplicates Categorical labels before assignment, ensuring flawless DataFrame creation even when your DBC defines repeated labels.

✨ What’s New in v0.1.14

🎨 Robust Enum Mapping

Unique categories guaranteed
Before building a pandas Categorical, we now dedupe the list of labels (preserving first‐seen order), so you’ll never hit “categories must be unique” errors—even if your DBC uses the same label multiple times.

🔧 Minor Tweaks & Polish

Improved error messaging around enum conversion failures.

Refreshed in‐docs example to showcase the deduped enum workflow.

🔧 Quickstart

pip install canml==0.1.13
from canml.canmlio import load_blf, to_csv, to_parquet, CanmlConfig

# 🔧 Configure for maximum resilience
cfg = CanmlConfig(
    chunk_size=5000,
    force_uniform_timing=True,
    interpolate_missing=True,
    dtype_map={"Speed": "float32", "RPM": "Int64"},
)

# 🚀 Full-file BLF decode with drop-summary logging & enum proofing
df = load_blf(
    blf_path="drive.blf",
    db="vehicle.dbc",
    config=cfg,
    message_ids={0x100, 0x200},
    expected_signals=["Speed", "RPM"]
)

# 🔍 Inspect attributes & export
print(df.attrs["signal_attributes"])

to_csv(df, "out.csv", metadata_path="out_meta.json")
to_parquet(df, "out.parquet", metadata_path="out_meta.json")

Huge thanks to everyone who pushed edge-case testing to the limit—canml is now truly unstoppable! 🎉