Skip to content

Read and write Windows paths (0.10.3) - #19

Draft
davidackerman wants to merge 5 commits into
mainfrom
windows-paths
Draft

davidackerman wants to merge 5 commits into
mainfrom
windows-paths

Conversation

@davidackerman

@davidackerman davidackerman commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

A Windows path (D:\data\vol.zarr) is normalised to forward slashes, which Windows reads the same and which parent, join, basename and tensorstore's own keys split on. A drive's root (D:/) keeps its slash and is a root: never probed, without a parent, and read as holding no document, because tensorstore's file kvstore will not open one (Invalid file path: "C:/"), and detect's look for a precomputed info in the parent reached it from any directory just under a drive. An array created just under a drive (D:/vol.zarr) now looks for its group in D:/, not in D:, the drive's working directory.

Before, normalize_path left the backslashes in, and opening any local volume on Windows failed (Invalid file path: "D:\\/"), which is what cellmap-flow's Windows CI job hit (janelia-cellmap/cellmap-flow#212).

CI gains windows-latest in both the lock's and the newest dependencies' jobs, and one test that runs only there. The tests compare paths as normalize_path writes them; the stale-login test is skipped on Windows, whose TLS (Schannel) refuses a test CA with no revocation list; and the stalled-write test gives the real write after two stalls 0.6 s, where 0.03 s was too little on a Windows runner. Linux and the Mac take the code path they did.

0.10.3, a patch: it reads more stores and places nothing differently. The spec states the Windows path rules.

… Windows in CI

normalize_path left a Windows path with backslashes, which parent, join,
basename and the keys tensorstore appends all split on a forward slash:
tensorstore refused the result (Invalid file path).
…pen; the tests' paths as normalize_path writes them
…west on Windows too

An array created just under a drive (D:/vol.zarr) found its group in "D:", the
drive's working directory: store.parent gives D:/. The spec states the forward
slashes and the drive's root. The newest dependencies, what cellmap-flow's Windows
CI installs, run on Windows as well. The stalled-write test gave the real write
after two stalls 0.03 s, too little on a Windows runner.
A patch: it reads more stores (local paths on Windows, where every local open
failed) and places nothing differently.
@davidackerman davidackerman changed the title Read and write Windows paths Read and write Windows paths (0.10.3) Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant