A filesystem-like contents manager for multiple backends in Jupyter

jpmorganchase, updated 🕥 2023-03-15 08:45:47

jupyter-fs

azure ci status appveyor ci status (telamonian fork) pypi package npm package

A plugin for JupyterLab that lets you set up and use as many filebrowsers as you like, connected to whatever local and/or remote filesystem-like resources you want.

The backend is built on top of PyFilesystem, while the frontend is built on top of JupyterLab Filetree.

Install

bash pip install jupyter-fs

Configure

Add the following to your jupyter_server_config.json:

json { "ServerApp": { "contents_manager_class": "jupyterfs.metamanager.MetaManager", "jpserver_extensions": { "jupyterfs.extension": true } } }

Simple use (no auth/credentials)

Add specifications for additional contents managers in your user settings (in the Settings menu under Advanced Settings Editor -> jupyter-fs). Here's an example config that sets up several new filebrowsers side-by-side:

json { "resources": [ { "name": "root at test dir", "url": "osfs:///Users/foo/test" }, { "name": "s3 test bucket", "url": "s3://test" }, { "name": "s3 test key", "url": "s3://test-2/prefix/", "defaultWritable": false }, { "name": "samba guest share", "url": "smb://[email protected]/test?name-port=3669" } ] }

You should see your new filebrowsers pop up in the left-hand sidebar instantly when you save your settings:

Use with auth/credentials

Any stretch of a "url" that is enclosed in double-brackets {{VAR}} will be treated as a template, and will be handled by jupyter-fs's auth system. For example, you can pass a username/password to the "samba guest share" resource in the Simple use example above by modifying its "url" like so:

```json { "resources": [ ...

{
  "name": "samba share",
  "url": "smb://{{user}}:{{passwd}}@127.0.0.1/test?name-port=3669"
}

] } ```

When you save the above "resouces" config, a dialog box will pop asking for the username and passwd values:

Once you enter those values and hit ok, the new filebrowsers will then immediately appear in the sidebar:

The auth dialog will only appear when needed

The jupyter-fs auth dialog will only appear when: - JupyterLab first loads, if any fs resources reqiure auth - a new fs resouce is added that requires auth, or its "url" field is modified

Supported filesystems

The type of resource each filebrowser will point to is determined by the protocol at the start of its url:

  • osfs: os filesystem. The will open a new view of your local filesystem, with the specified root
  • s3: opens a filesystem pointing to an Amazon S3 bucket
  • smb: opens a filesystem pointing to a Samba share

jupyter-fs can open a filebrowser pointing to any of the diverse resources supported by PyFilesystem. Currently, we test only test the S3 and smb/samba backends as part of our CI, so your milleage may vary with the other PyFilesystem backends.

The filesystem url

The "url" field jupyter-fs config is based on the PyFilesystem opener url standard. For more info on how to write these urls, see the documentation of the relevant PyFilesystem plugin: - S3: S3FS docs - smb: fs.smbfs docs

Server-side settings

If you prefer to set up your filesystem resources in the server-side config, you can do so. For example, you can set up a local filesystem by adding the following to your jupyter_server_config.py file:

python c.Jupyterfs.resources = [ { "name": "local_test", "url": "osfs:///Users/foo/test" }, ]

ALternatively, you can add resource specifications alongside the basic jupyter-fs config in your jupyter_server_config.json file:

json { "ServerApp": { "contents_manager_class": "jupyterfs.metamanager.MetaManager", "jpserver_extensions": { "jupyterfs.extension": true } }, "Jupyterfs": { "resources": [ { "name": "local_test", "url": "osfs:///Users/foo/test" } ] } }

Any filesystem resources specified in any server-side config file will be merged with the resources given in a user's settings.

Development

See CONTRIBUTING.md for guidelines.

License

This software is licensed under the Apache 2.0 license. See the LICENSE and AUTHORS files for details.

Issues

Bump webpack from 5.75.0 to 5.76.1

opened on 2023-03-15 08:45:46 by dependabot[bot]

Bumps webpack from 5.75.0 to 5.76.1.

Release notes

Sourced from webpack's releases.

v5.76.1

Fixed

  • Added assert/strict built-in to NodeTargetPlugin

Revert

v5.76.0

Bugfixes

Features

Security

Repo Changes

New Contributors

Full Changelog: https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0

Commits
  • 21be52b Merge pull request #16804 from webpack/chore-patch-release
  • 1cce945 chore(release): 5.76.1
  • e76ad9e Merge pull request #16803 from ryanwilsonperkin/revert-16759-real-content-has...
  • 52b1b0e Revert "Improve performance of hashRegExp lookup"
  • c989143 Merge pull request #16766 from piranna/patch-1
  • 710eaf4 Merge pull request #16789 from dmichon-msft/contenthash-hashsalt
  • 5d64468 Merge pull request #16792 from webpack/update-version
  • 67af5ec chore(release): 5.76.0
  • 97b1718 Merge pull request #16781 from askoufis/loader-context-target-type
  • b84efe6 Merge pull request #16759 from ryanwilsonperkin/real-content-hash-regex-perf
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by evilebottnawi, a new releaser for webpack since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/jpmorganchase/jupyter-fs/network/alerts).

Add `Copy Path` to context menu for folders

opened on 2023-03-06 03:27:32 by dhirschfeld

As it says in the title!

This functionality would enable easily opening a terminal at the specified location.

An Open in Terminal context menu entry would also be very convenient but a simple Copy Path gets you 90% of the way there as you can manually open a terminal and paste the path.

Allow configuring displayed columns

opened on 2023-03-06 00:25:08 by dhirschfeld-shell

The FileTree seems to include size/mimetype/last_modified as default columns:

image

...which takes up quite a lot of horizontal space. By default I'd probably choose to not include the mimetype column as horizontal space is more important to me.

It would be great if the user could easily choose which columns to display (ideally as a right-click context menu)

Bump http-cache-semantics from 4.1.0 to 4.1.1

opened on 2023-02-03 20:28:24 by dependabot[bot]

Bumps http-cache-semantics from 4.1.0 to 4.1.1.

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/jpmorganchase/jupyter-fs/network/alerts).

Use PEP440 version spec

opened on 2023-02-03 13:32:59 by mahendrapaipuri

Seems like setuptools>v66.0 will fail the installation if version specs are not conforming to PEP440.

jupyter lab build fails on Windows

opened on 2022-12-01 19:03:36 by PaulKGrimes

After installing the extension in Jupyter Lab, and installing the package in the virtual environment via pip install jupyter-fs, Jupyter Lab says that it needs a rebuild.

This rebuild fails with an number of errors: ` [LabBuildApp] > node D:\Software\Anaconda3\envs\data-analysis\lib\site-packages\jupyterlab\staging\yarn.js run build:prod:minimize [LabBuildApp] yarn run v1.21.1 $ webpack --config webpack.prod.minimize.config.js [webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve 'jupyter-fs/style/index.js' in 'D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\build' at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\Compilation.js:1768:28 at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:742:13 at eval (eval at create (D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\tapable\lib\HookCodeFactory.js:33:10), :10:1) at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:276:22 at eval (eval at create (D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\tapable\lib\HookCodeFactory.js:33:10), :9:1) at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:405:22 at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:119:11 at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:650:24 at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:813:8 at D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\webpack\lib\NormalModuleFactory.js:933:5 resolve 'jupyter-fs/style/index.js' in 'D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\build' Parsed request is a module using description file: D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\build\package.json (relative path: .) Field 'browser' doesn't contain a valid alias configuration resolve as module D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\build\node_modules doesn't exist or is not a directory looking for modules in D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules existing directory D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs using description file: D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\package.json (relative path: .) using description file: D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\package.json (relative path: ./style/index.js) no extension Field 'browser' doesn't contain a valid alias configuration D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\style\index.js doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\style\index.js.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\style\index.js.json doesn't exist .wasm Field 'browser' doesn't contain a valid alias configuration D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\style\index.js.wasm doesn't exist as directory D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\staging\node_modules\jupyter-fs\style\index.js doesn't exist D:\Software\Anaconda3\envs\data-analysis\share\jupyter\lab\node_modules doesn't exist or is not a directory D:\Software\Anaconda3\envs\data-analysis\share\jupyter\node_modules doesn't exist or is not a directory D:\Software\Anaconda3\envs\data-analysis\share\node_modules doesn't exist or is not a directory looking for modules in D:\Software\Anaconda3\envs\data-analysis\node_modules D:\Software\Anaconda3\envs\data-analysis\node_modules\jupyter-fs doesn't exist D:\Software\Anaconda3\envs\node_modules doesn't exist or is not a directory looking for modules in D:\Software\Anaconda3\node_modules D:\Software\Anaconda3\node_modules\jupyter-fs doesn't exist D:\Software\node_modules doesn't exist or is not a directory D:\node_modules doesn't exist or is not a directory error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[LabBuildApp] JupyterLab failed to build [LabBuildApp] Traceback (most recent call last):

[LabBuildApp] File "D:\Software\Anaconda3\envs\data-analysis\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging yield

[LabBuildApp] File "D:\Software\Anaconda3\envs\data-analysis\lib\site-packages\jupyterlab\labapp.py", line 196, in start raise e

[LabBuildApp] File "D:\Software\Anaconda3\envs\data-analysis\lib\site-packages\jupyterlab\labapp.py", line 187, in start build(

[LabBuildApp] File "D:\Software\Anaconda3\envs\data-analysis\lib\site-packages\jupyterlab\commands.py", line 506, in build return handler.build(

[LabBuildApp] File "D:\Software\Anaconda3\envs\data-analysis\lib\site-packages\jupyterlab\commands.py", line 722, in build raise RuntimeError(msg)

[LabBuildApp] RuntimeError: JupyterLab failed to build

[LabBuildApp] Exiting application: JupyterLab `

The error associated with the Field 'browser' doesn't contain a valid alias configuration line may be due to ../ci/browser.sh not being included in the pip distributed package, but this may be a spurious issue.

J.P. Morgan Chase & Co.

Welcome to the open source project repositories for JPMorgan Chase

GitHub Repository

jupyter jupyter-notebook jupyterlab jupyterlab-extension jupyter-lab