Skip to content

Fix outdated str function call to correct Path suffix swap for CSV to h5 conversion - #3465

Draft
C-Achard wants to merge 1 commit into
mainfrom
cy/fix-h5-conversion-pathlib
Draft

Fix outdated str function call to correct Path suffix swap for CSV to h5 conversion#3465
C-Achard wants to merge 1 commit into
mainfrom
cy/fix-h5-conversion-pathlib

Conversation

@C-Achard

Copy link
Copy Markdown
Collaborator

Update convertcsv2h5 to build the HDF5 output path with Path.with_suffix(".h5") instead of string replacement. This makes filename handling safer and consistent with Path objects, avoiding edge cases with .replace() on path strings.

… H5 conversion

Update `convertcsv2h5` to build the HDF5 output path with `Path.with_suffix(".h5")` instead of string replacement. This makes filename handling safer and consistent with `Path` objects, avoiding edge cases with `.replace()` on path strings.
@C-Achard C-Achard added this to the v3.1.0 milestone Aug 28, 2026
@C-Achard
C-Achard requested a lite review from Copilot August 28, 2026 11:42
@C-Achard C-Achard self-assigned this Aug 28, 2026
@C-Achard C-Achard added the bug fix! fix for a real buggy one... label Aug 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates convertcsv2h5 to construct the HDF5 output filename using pathlib.Path.with_suffix(".h5") rather than calling .replace() on the CSV path, aligning output path handling with Path-based code and avoiding incorrect .replace() behavior on Path objects.

Changes:

  • Build the .h5 output path via fn.with_suffix(".h5").
  • Pass the resulting Path directly to pandas.DataFrame.to_hdf(...) for writing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@deruyter92 deruyter92 added the 3.1 label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.1 bug fix! fix for a real buggy one...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants