Replace `pathlib.Path` with raw strings in `prototype.datasets`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🐛 Describe the bug
We currently use pathlib.Path everywhere in the new datasets.
pathlib.Path is nice, but doesn't work well at all with URL-like paths. Indeed, it replaces // with /, so that http://www becomes an invalid url http:/www.
We should either remove pathlib.Path altogether and depend on raw strings, using os.path.join (which works without issues), or figure out a way of pathlib to work with urls,
Versions
Current nightly
cc @pmeier @bjuncek
Contributor guide
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 in prototype.datasets and inspect where pathlib.Path is used to assemble dataset paths. Reproduce the URL-like path case described in the issue, then verify that paths preserve // in URLs while local dataset paths continue to work with the chosen path handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100