Skip to content

csv2ann truncates paths containing dots, lacks write_dir, tests and docs #595

Closed

Description

@tompollard

Found while reviewing #591.

csv2ann in wfdb/io/convert/csv.py has some problems:

  • The record name is derived with file_name.split(".")[0] (
    file_name = file_name.split(".")[0]
    ), which breaks on paths containing dots: ./x.csv becomes "" and data/v1.2/x.csv becomes data/v1. os.path.splitext would avoid this. (csv_to_wfdb also uses the base name only, so the expected output location should be the same for both.)
  • There is no write_dir parameter, unlike csv_to_wfdb and wrann, so output paths depend on the input path and the current directory.
  • It has no tests.
  • It is not included in the API docs (docs/convert.rst only lists csv_to_wfdb).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions