Skip to content

fix: pin csvtk to 0.37.0 to avoid broken csvtk round in 0.38.0 - #75

Merged
cademirch merged 1 commit into
mainfrom
fix/pin-csvtk-0.37
Oct 29, 2026
Merged

cademirch merged 1 commit into
mainfrom
fix/pin-csvtk-0.37

Conversation

@cademirch

Copy link
Copy Markdown
Contributor

Fixes #74.

Problem

workflow/envs/env.yaml left csvtk unpinned, so fresh environments resolve to csvtk 0.38.0 (released 2026-10-05). In 0.38.0, csvtk round writes the rounded value followed by the original text:

$ printf 'a\n1.26\n' | csvtk round -n 1 -f 1
1.3        # 0.37.0
1.31.26    # 0.38.0

helper_fdr_peaks_by_fire_elements rounds peak_start/peak_end with csvtk round -n 0 -f 2,3, so coordinates like 5470858 become 54708585470858. merge_fire_peaks.py then fails with polars.exceptions.InvalidOperationError: conversion from i64 to u32 failed in column 'peak_start'. Because the bug comes from the environment, v0.1.3 is affected too. The upstream change is probably shenwei356/csvtk#359.

Fix

Pin csvtk==0.37.0, which matches how the other tools in the env are pinned. Output is byte-identical to before the regression. csvtk filter, used elsewhere in the pipeline, behaves correctly on both versions.

Testing

  • Isolated repro: 0.38.0 doubles the coordinates and 0.37.0 rounds them correctly.
  • pixi run test: 49/49 steps. pixi run test-verify: all checks pass (1181 peak lines, 46223 FIRE elements). None of the 1180 peaks has a coordinate above 3e8.

csvtk 0.38.0's `round` writes the rounded value followed by the original
text (e.g. 5470858 -> 54708585470858), corrupting peak_start/peak_end in
helper_fdr_peaks_by_fire_elements and crashing merge_fire_peaks.py with a
polars i64->u32 conversion error.

Fixes #74
@cademirch
cademirch merged commit e6e888b into main Oct 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FIRE peak coordinates duplicated, look like concatenated strings?

1 participant