scipp / scipp/scippnexus

Support windows-style path...?

Open
#240 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation good first issue
Dominant language
Python
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

We're not handling str path and just pass it to h5py.File here

https://github.com/scipp/scippnexus/blob/94779e6d5e10666eaccc7d343079f9762ef9e3ea/src/scippnexus/file.py#L50-L53

But maybe we can wrap it with pathlib.Path to make sure it works...?

Since you copy + paste from windows finder, it gives you path with \
but users might not know of pathlib.Path, especially when you're using high-level interface like workflows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/scippnexus/file.py at lines 50-53 and inspect how string paths are passed to h5py.File. Reproduce the behavior with a Windows-style path copied as a string, then verify that the file-opening interface accepts it and that the existing test suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.