Skip to content

Commit

Permalink
Merge pull request #174 from timkpaine/main
Browse files Browse the repository at this point in the history
Reconcile hard fork now that access is restored
  • Loading branch information
vidartf authored Nov 1, 2023
2 parents 49ffa3e + 55e2a00 commit 135811c
Show file tree
Hide file tree
Showing 37 changed files with 12,783 additions and 10,386 deletions.
9 changes: 0 additions & 9 deletions .github/CODEOWNERS

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ If you have any questions about the contribution process, please feel free to se

Note: You will need NodeJS to build the extension package.

```bash
pip install -e .[dev]
```

The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
`yarn` or `npm` in lieu of `jlpm` below.
Expand All @@ -20,12 +24,16 @@ The `jlpm` command is JupyterLab's pinned version of
# Clone the repo to your local environment
# Change directory to the jupyter-fs directory
# Install package in development mode
make dev_install
jlpm
cd js
jlpm build
cd ..
jlpm develop
```

### Configure

You'll need to set the contents manager class in the jupyter server config. Paste the following json:
You'll need to set the contents manager class in the jupyter server config. Paste the following json into your config:

```json
{
Expand All @@ -35,6 +43,12 @@ You'll need to set the contents manager class in the jupyter server config. Past
}
```

or run lab with

```bash
jupyter lab --ServerApp.contents_manager_class="jupyterfs.metamanager.MetaManager"
```

into a file named `${CONFIG}/jupyter_server_config.json`, where `CONFIG` is any of the config paths returned by the `jupyter --paths` command.

### Rebuild after you make changes
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build: ## build python/javascript
python -m build .

develop: ## install to site-packages in editable mode
python -m pip install --upgrade build docker-compose "jupyterlab>=3.5,<4" pip setuptools twine wheel
python -m pip install --upgrade build docker-compose jupyterlab pip setuptools twine wheel
python -m pip install -vvv .[develop]

install: ## install to site-packages
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#

<p>
<a href="https://dev.azure.com/tpaine154/jupyter/_apis/build/status/jpmorganchase.jupyter-fs?branchName=main"><img alt="azure ci status" src="https://dev.azure.com/tpaine154/jupyter/_apis/build/status/jpmorganchase.jupyter-fs?branchName=main"></a>
<a href="https://ci.appveyor.com/project/telamonian/jupyter-fs/branch/main"><img alt="appveyor ci status (telamonian fork)" src="https://ci.appveyor.com/api/projects/status/d8flhw12vpvgime4/branch/main?svg=true"></a>
<a href="https://github.com/jpmorganchase/jupyter-fs/actions?query=workflow%3A%22Build+Status%22"><img alt="build status" src="https://github.com/jpmorganchase/jupyter-fs/workflows/Build%20Status/badge.svg?branch=main"></a>
<a href="https://pypi.python.org/pypi/jupyter-fs"><img alt="pypi package" src="https://img.shields.io/pypi/v/jupyter-fs.svg"></a>
<a href="https://www.npmjs.com/package/jupyter-fs"><img alt="npm package" src="https://img.shields.io/npm/v/jupyter-fs.svg"></a>
</p>
Expand Down Expand Up @@ -69,7 +68,7 @@ Add specifications for additional contents managers in your user settings (in th

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

![](https://raw.githubusercontent.com/jpmorganchase/jupyter-fs/master/docs/osfs_example.png)
![](https://raw.githubusercontent.com/jpmorganchase/jupyter-fs/main/docs/osfs_example.png)


## Use with auth/credentials
Expand All @@ -91,7 +90,7 @@ Any stretch of a `"url"` that is enclosed in double-brackets `{{VAR}}` will be t

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

![](https://raw.githubusercontent.com/jpmorganchase/jupyter-fs/master/docs/remote_example.png)
![](https://raw.githubusercontent.com/jpmorganchase/jupyter-fs/main/docs/remote_example.png)

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

Expand Down Expand Up @@ -160,10 +159,10 @@ Any filesystem resources specified in any server-side config file will be merged

## Development

See [CONTRIBUTING.md](https://github.com/jpmorganchase/jupyter-fs/blob/master/CONTRIBUTING.md) for guidelines.
See [CONTRIBUTING.md](https://github.com/jpmorganchase/jupyter-fs/blob/main/CONTRIBUTING.md) for guidelines.


## License

This software is licensed under the Apache 2.0 license. See the
[LICENSE](https://github.com/jpmorganchase/jupyter-fs/blob/master/LICENSE) and [AUTHORS](https://github.com/jpmorganchase/jupyter-fs/blob/master/AUTHORS) files for details.
[LICENSE](https://github.com/jpmorganchase/jupyter-fs/blob/main/LICENSE) and [AUTHORS](https://github.com/jpmorganchase/jupyter-fs/blob/main/AUTHORS) files for details.
Empty file modified ci/mac/enable_sharing.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions jupyterfs/tests/conftest.py → conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
PLATFORM_INFO = {"darwin": "mac", "linux": "linux", "win32": "windows"}
PLATFORMS = set(PLATFORM_INFO.keys())

pytest_plugins = ["pytest_jupyter.jupyter_server"]


def pytest_configure(config):
# register the platform markers
Expand Down
13 changes: 6 additions & 7 deletions js/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ module.exports = {
testPathIgnorePatterns: ["/lib/", "/node_modules/"],
testRegex: "tests\/.*\.test\.ts[x]?$", // eslint-disable-line no-useless-escape
transform: {
"\\.tsx?$": "ts-jest",
"\\.tsx?$": [
"ts-jest", {
// in tsconfig.test.json, rootDir is parent of both tests and src dirs
tsconfig: "tsconfig.test.json",
},
],
"\\.jsx?$": "babel-jest",
},
transformIgnorePatterns: [`node_modules/(?!(${esModules}))`],
globals: {
"ts-jest": {
// in tsconfig.test.json, rootDir is parent of both tests and src dirs
tsconfig: "tsconfig.test.json",
},
},
};
67 changes: 36 additions & 31 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"postpack": "shx rm README.md",
"prepack": "shx cp ../README.md .",
"prepublishOnly": "jlpm clean && jlpm clean:labextension && jlpm integrity && jlpm build:prod",
"test": "jest --coverage --collectCoverageFrom=src/*.{ts,tsx}",
"test": "jest --coverage",
"test:browser": "../ci/browser_check.sh",
"watch": "run-p watch:lib watch:labextension",
"watch:lib": "tsc -b -w",
Expand All @@ -41,55 +41,60 @@
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
],
"dependencies": {
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/apputils": "^3.0.0",
"@jupyterlab/coreutils": "^5.0.0",
"@jupyterlab/docmanager": "^3.0.0",
"@jupyterlab/docregistry": "^3.0.0",
"@jupyterlab/filebrowser": "^3.0.0",
"@jupyterlab/services": "^6.0.0",
"@jupyterlab/settingregistry": "^3.0.0",
"@jupyterlab/ui-components": "^3.0.0",
"@lumino/algorithm": "^1.3.3",
"@lumino/disposable": "^1.4.3",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
"@jupyterlab/coreutils": "^6.0.0",
"@jupyterlab/docmanager": "^4.0.0",
"@jupyterlab/docregistry": "^4.0.0",
"@jupyterlab/filebrowser": "^4.0.0",
"@jupyterlab/services": "^7.0.0",
"@jupyterlab/settingregistry": "^4.0.0",
"@jupyterlab/statusbar": "^4.0.0",
"@jupyterlab/translation": "^4.0.0",
"@jupyterlab/ui-components": "^4.0.0",
"@lumino/algorithm": "^2.0.0",
"@lumino/commands": "^2.0.0",
"@lumino/disposable": "^2.1.1",
"@lumino/messaging": "^2.0.0",
"@lumino/signaling": "^2.0.0",
"@lumino/widgets": "^2.0.0",
"@material-ui/core": "^4.11.3",
"@types/file-saver": "^2.0.1",
"@types/jszip": "^3.4.1",
"file-saver": "^2.0.5",
"jszip": "^3.7.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tree-finder": "^0.0.13"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.20.2",
"@jupyterlab/builder": "^3.0.0",
"@types/jest": "^26.0.22",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@jupyterlab/builder": "^4.0.0",
"@types/file-saver": "^2.0.1",
"@types/jest": "^29.5.1",
"@types/jszip": "^3.4.1",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.29.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^39.6.4",
"eslint-plugin-jsdoc": "^44.2.4",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-unicorn": "^45.0.1",
"eslint-plugin-unicorn": "^47.0.0",
"isomorphic-fetch": "^3.0.0",
"jest": "^26",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-junit": "^16.0.0",
"jest-raw-loader": "^1.0.1",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.1",
"shx": "^0.3.3",
"ts-jest": "^26.5.4",
"typescript": "^4.2.4",
"source-map-loader": "^4.0.1",
"ts-jest": "^29.1.0",
"typescript": "^4.5.0",
"yarn-deduplicate": "^6.0.0"
},
"resolutions": {
"**/@types/react": "^17.0.0"
},
"sideEffects": [
"style/**/*.css",
"style/index.js"
Expand All @@ -106,7 +111,7 @@
}
}
},
"extension": true,
"extension": "lib/index.js",
"outputDir": "../jupyterfs/labextension",
"schemaDir": "schema"
}
Expand Down
42 changes: 42 additions & 0 deletions js/schema/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,34 @@
"type": "object",
"additionalProperties": false,

"jupyter.lab.shortcuts": [
{
"command": "treefinder:copy",
"keys": ["Ctrl C"],
"selector": ".jp-tree-finder-sidebar"
},
{
"command": "treefinder:cut",
"keys": ["Ctrl X"],
"selector": ".jp-tree-finder-sidebar"
},
{
"command": "treefinder:paste",
"keys": ["Ctrl V"],
"selector": ".jp-tree-finder-sidebar"
},
{
"command": "treefinder:rename",
"keys": ["F2"],
"selector": ".jp-tree-finder-sidebar"
},
{
"command": "treefinder:delete",
"keys": ["Delete"],
"selector": ".jp-tree-finder-sidebar.jfs-mod-notRenaming"
}
],

"definitions": {
"resource": {
"description": "Specification for an fs resource",
Expand Down Expand Up @@ -38,12 +66,14 @@

"properties": {
"resources": {
"title": "Resources",
"description": "The list of fs resource specifications",
"items": { "$ref": "#/definitions/resource" },
"type": "array",
"default": []
},
"options": {
"title": "Options",
"description": "Global options for jupyter-fs",
"type": "object",
"additionalProperties": false,
Expand All @@ -60,6 +90,18 @@
}
},
"default": {}
},
"display_columns": {
"title": "Display Columns",
"description": "The list of columns that will be displayed",
"type": "array",
"items": {
"type": "string",
"enum": ["size", "last_modified", "writable", "mimetype"]
},
"default": ["size"],
"maxItems": 4,
"uniqueItems": true
}
}
}
Loading

0 comments on commit 135811c

Please sign in to comment.