Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#595 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with wfdb/io/convert/csv.py, especially csv2ann near the referenced line, and compare its output path handling with csv_to_wfdb and wrann. Add tests for dotted paths and write_dir, then update docs/convert.rst to list csv2ann; done means path handling is consistent and the function is covered and documented.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Found while reviewing #591.

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

  • The record name is derived with file_name.split(".")[0] (https://github.com/MIT-LCP/wfdb-python/blob/b8914e1c9c777c45571c894cb7b6579550a86f13/src/wfdb/io/convert/csv.py#L627), 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).
Lingua principale
Jupyter Notebook
Stelle
853
Fork
324
Merge medio
17h 39m
PR unite (30g)
10

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MIT-LCP/wfdb-python

Tutte le issue di MIT-LCP/wfdb-python

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.