Repository navigation
Desktop app: Batch Import reads folders on the computer (D5.2) - #54
Merged
Merged
Conversation
The desktop app's Python runs on Pyodide, whose file system isn't the computer's. The folder the user types is now mounted into the app (Emscripten NODEFS) when it's read: full Windows, macOS or Linux paths, ~ for the home folder, quotes from Copy as path. Only folders the user names are mounted, each once. - eagleplot/utils/host_folders.py: host_path() (pure) and local_folder() - runtime: desktop local_folders=True; access: the desktop app reads its own disk - Data Upload passes the typed folder through local_folder() - desktop smoke test: Batch Import loads a real folder, a missing one gets a message Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The desktop app (#53) shipped with folder import switched off: its Python runs on Pyodide, whose file system isn't the computer's, so a typed path such as
C:\Users\you\datapointed at nothing. This PR turns it on.eagleplot/utils/host_folders.py:local_folder(text)mounts the folder the user typed into the app (Emscripten NODEFS, the mechanism @stlite/desktop already uses fornodefsMountpoints) and returns the path to read. Elsewhere it returns the path unchanged.~for the home folder, and the quotes added by Windows "Copy as path".local_folders=True. The desktop app reads the user's own disk with no server in between, so the shared-server IP check doesn't apply. The browser build is unchanged: still no folders.local_folder()..txtthat is skipped), and a missing folder shows the message.Test plan
tests/test_host_folders.py: path normalisation on win32/darwin/linux, relative paths, mounting once, and that failed mounts aren't remembered. Run on Python 3.13 and 3.9.scripts/desktop/smoke.jsas a non-root user under Xvfb: everything passes, including the two new Batch Import checks. Start-up is about 12 s and there are no network requests.🤖 Generated with Claude Code