vak icon indicating copy to clipboard operation
vak copied to clipboard

CLN: rewrite `vak.files` and `vak.io` functions to use `pathlib`

Open NickleDave opened this issue 4 years ago • 0 comments

to hopefully avoid issues like #431 -- specifically we want to handle Windows paths better if possible.

The main issue here is the regex in files.from_fname?

  • [ ] remove regex from files.from_fname
  • [ ] replace with calling pathlib.suffix repeatedly? Can this work? If so it's more readable IMO.

Another issue here be the way vak.io.dataframe converts paths to strings.
Need to read the code more to be sure.
We might need to be filesystem aware when we write to csv or load from csv? I guess the most robust / ideal way to handle it would be to dynamically determine whether we need to use PureWindowsPath or PurePosixPath.

NickleDave avatar Jan 03 '22 13:01 NickleDave