Skip to content

fix upload_magic truncating integer counts ending in 0#853

Merged
Swanson-Hysell merged 2 commits into
masterfrom
upload_magic_0_drop_bug_fix
May 6, 2026
Merged

fix upload_magic truncating integer counts ending in 0#853
Swanson-Hysell merged 2 commits into
masterfrom
upload_magic_0_drop_bug_fix

Conversation

@Swanson-Hysell

Copy link
Copy Markdown
Member

str.strip(".0") removes any leading/trailing '.' or '0' chars, so values like "10" became "1" and "100" became "1" in dir_n_samples and other count columns of the upload file. Replace with a helper that only collapses values whose float form is integer-valued (e.g. "10.0" -> "10") and leaves all other values untouched. Closes #848.

Swanson-Hysell and others added 2 commits May 4, 2026 15:10
str.strip(".0") removes any leading/trailing '.' or '0' chars, so values
like "10" became "1" and "100" became "1" in dir_n_samples and other
count columns of the upload file. Replace with a helper that only
collapses values whose float form is integer-valued (e.g. "10.0" -> "10")
and leaves all other values untouched. Closes #848.
@Swanson-Hysell Swanson-Hysell requested a review from Copilot May 6, 2026 15:57
@Swanson-Hysell Swanson-Hysell merged commit 6c735d7 into master May 6, 2026
6 checks passed
@Swanson-Hysell Swanson-Hysell deleted the upload_magic_0_drop_bug_fix branch May 6, 2026 20:53
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.

upload_magic() truncates dir_n_samples (and other _n* columns) when value ends in 0`

1 participant