opensafely-core / opensafely-core/opencodelists
Whitespace should be trimmed from CSV output
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
Here's an example of a codelist which has trailing whitespace (ischaemic ) in the type column:
https://codelists.opensafely.org/codelist/opensafely/stroke-secondary-care/2020-10-05/
https://github.com/opensafely/anticoagulants-research/c0f1328846bc2d8184c48d405b3941e4498822a3/codelists/opensafely-stroke-secondary-care.csv
I suspect that this is because, being an ICD-10 list, it's gone through the "dump storage of CSV" pathway and thus is just output exactly as it was uploaded.
I think probably the right thing to do here is to trim whitespace (and maybe normalise to UNIX line endings).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CSV output for the linked codelist through the suspected "dump storage of CSV" pathway. Compare the generated output with the uploaded CSV and define done as removing trailing whitespace consistently, with the line-ending behavior clarified before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100