Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ node_modules/

# JupyterLab extension
lib/
cs3_jupyter_client/labextension/
cs3_jupyter/labextension/

# Test files
fake-eos/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The CS3 Contents Manager consists of several key components:

### JupyterLab Extension

The bundled labextension (`@cs3org/cs3-jupyter-client`) provides three plugins:
The bundled labextension (`@cs3org/cs3-jupyter`) provides three plugins:

- **Spaces** - sidebar panel listing CERNBox Spaces (projects) the user has access to
- **Shares** - sidebar panel showing incoming and outgoing CERNBox shared folders
Expand Down Expand Up @@ -92,7 +92,7 @@ jupyter lab \
Add the following to your `jupyter_server_config.py`:

```python
from cs3_jupyter_client.cs3largefilemanager import CS3LargeFileManager
from cs3_jupyter.cs3largefilemanager import CS3LargeFileManager

c.ServerApp.contents_manager_class = CS3LargeFileManager
c.CS3FileManagerMixin.host = '<host>'
Expand Down
4 changes: 2 additions & 2 deletions cs3_jupyter_client/__init__.py → cs3_jupyter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
def _jupyter_server_extension_points():
return [{
"module": "cs3_jupyter_client.server_extension"
"module": "cs3_jupyter.server_extension"
}]


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "@cs3org/cs3-jupyter-client",
"dest": "@cs3org/cs3-jupyter",
}]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions install.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageManager": "python",
"packageName": "cs3_jupyter_client",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package cs3_jupyter_client"
"packageName": "cs3_jupyter",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package cs3_jupyter"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ServerApp": {
"jpserver_extensions": {
"cs3_jupyter_client": true
"cs3_jupyter": true
}
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@cs3org/cs3-jupyter-client",
"name": "@cs3org/cs3-jupyter",
"version": "0.1.0",
"description": "A JupyterLab extension providing CERNBox integration",
"keywords": [
Expand Down Expand Up @@ -37,7 +37,7 @@
"build:labextension:dev": "jupyter labextension build --development True .",
"clean": "jlpm clean:lib && jlpm clean:labextension",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:labextension": "rimraf cs3_jupyter_client/labextension cs3_jupyter_client/_version.py",
"clean:labextension": "rimraf cs3_jupyter/labextension cs3_jupyter/_version.py",
"install:extension": "jlpm build",
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
Expand Down Expand Up @@ -72,7 +72,7 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "cs3_jupyter_client/labextension",
"outputDir": "cs3_jupyter/labextension",
"schemaDir": "schema"
}
}
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["hatchling==1.28.0", "hatch-nodejs-version==0.4.0", "jupyterlab>=4.5
build-backend = "hatchling.build"

[project]
name = "cs3_jupyter_client"
name = "cs3_jupyter"
version = "0.1.0"
readme = "README.md"
license = { file = "LICENSE" }
Expand All @@ -21,19 +21,19 @@ dev = [
]

[tool.hatch.build.targets.wheel]
packages = ["cs3_jupyter_client"]
packages = ["cs3_jupyter"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"
"cs3_jupyter_client/labextension" = "share/jupyter/labextensions/@cs3org/cs3-jupyter-client"
"install.json" = "share/jupyter/labextensions/@cs3org/cs3-jupyter-client/install.json"
"cs3_jupyter/labextension" = "share/jupyter/labextensions/@cs3org/cs3-jupyter"
"install.json" = "share/jupyter/labextensions/@cs3org/cs3-jupyter/install.json"

[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder==0.9.1"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"cs3_jupyter_client/labextension/static/style.js",
"cs3_jupyter_client/labextension/package.json",
"cs3_jupyter/labextension/static/style.js",
"cs3_jupyter/labextension/package.json",
]

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
Expand All @@ -44,7 +44,7 @@ npm = ["jlpm"]
build_cmd = "install:extension"
npm = ["jlpm"]
source_dir = "src"
build_dir = "cs3_jupyter_client/labextension"
build_dir = "cs3_jupyter/labextension"

[tool.ruff]
target-version = "py310"
Expand Down
6 changes: 3 additions & 3 deletions src/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import { LabIcon } from '@jupyterlab/ui-components';
export const CERNBOX_LOGO_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -1 70 79"><polygon fill="#78b6e4" points="33.847,38.36 33.847,55.915 49.767,49.075 49.767,30.13 33.729,37.444"/><path fill="currentColor" d="M34.289 76.691c-9.242.0-16.483-16.843-16.483-38.346C17.806 16.845 25.047.0 34.289.0c9.24.0 16.482 16.845 16.482 38.346.0 21.503-7.242 38.345-16.482 38.345zm0-74.725c-7.868.0-14.517 16.657-14.517 36.38s6.648 36.38 14.517 36.38c7.866.0 14.515-16.657 14.515-36.38S42.155 1.966 34.289 1.966z"/><path fill="currentColor" d="M12.516 62.298c-5.683.0-9.647-1.669-11.467-4.834-4.607-8.014 6.382-22.688 25.024-33.407 10.521-6.051 21.732-9.666 29.989-9.666 5.681.0 9.646 1.669 11.467 4.835 2.272 3.956.822 9.654-4.098 16.045-4.733 6.159-12.165 12.322-20.925 17.36-10.525 6.053-21.734 9.667-29.99 9.667zM56.062 16.356c-7.927.0-18.771 3.516-29.015 9.406C9.958 35.593-1.167 49.661 2.753 56.487c1.831 3.18 6.32 3.846 9.763 3.846 7.925.0 18.771-3.516 29.011-9.409 8.541-4.91 15.768-10.896 20.347-16.85 4.338-5.639 5.774-10.693 3.95-13.873-1.829-3.176-6.32-3.845-9.762-3.845z"/><path fill="currentColor" d="M56.063 62.298c-8.258.0-19.471-3.614-29.99-9.667C17.31 47.593 9.88 41.43 5.145 35.271.229 28.88-1.227 23.182 1.049 19.226c1.819-3.166 5.784-4.835 11.467-4.835 8.257.0 19.466 3.615 29.991 9.666 18.637 10.72 29.629 25.394 25.022 33.407C65.709 60.629 61.743 62.298 56.063 62.298zM12.516 16.356c-3.442.0-7.932.669-9.763 3.845-1.824 3.18-.386 8.234 3.951 13.873 4.582 5.953 11.804 11.939 20.344 16.85 10.24 5.894 21.085 9.409 29.015 9.409h.001c3.443.0 7.932-.666 9.76-3.846 3.924-6.826-7.203-20.895-24.297-30.725C31.287 19.872 20.44 16.356 12.516 16.356z"/><polygon fill="#27aae1" points="34.816,20.646 19.294,29.13 33.599,37.566 48.683,29.104"/><path fill="currentColor" d="M33.599 38.549c-.167.0-.333-.044-.484-.132l-14.308-8.434c-.303-.18-.486-.512-.481-.867.006-.357.201-.681.512-.852l15.521-8.485c.297-.163.664-.156.955.026l13.865 8.457c.295.181.478.507.471.86-.007.351-.195.674-.503.841l-15.078 8.464C33.92 38.509 33.762 38.549 33.599 38.549zM21.275 29.163l12.336 7.274 13.134-7.369L34.789 21.78 21.275 29.163z"/><rect fill="currentColor" x="32.746" y="37.566" width="1.965" height="16.848"/><polygon fill="currentColor" points="33.847,38.36 19.294,30.13 19.294,49.075 33.847,55.915"/></svg>';

export const spacesIcon = new LabIcon({
name: '@cs3org/cs3-jupyter-client:spaces',
name: '@cs3org/cs3-jupyter:spaces',
svgstr: `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path xmlns="http://www.w3.org/2000/svg" d="M22 12.999V20C22 20.5523 21.5523 21 21 21H13V12.999H22ZM11 12.999V21H3C2.44772 21 2 20.5523 2 20V12.999H11ZM11 3V10.999H2V4C2 3.44772 2.44772 3 3 3H11ZM21 3C21.5523 3 22 3.44772 22 4V10.999H13V3H21Z"></path></svg>`
});

export const cernboxIcon = new LabIcon({
name: '@cs3org/cs3-jupyter-client:cernbox',
name: '@cs3org/cs3-jupyter:cernbox',
svgstr: CERNBOX_LOGO_SVG
});

export const shareIcon = new LabIcon({
name: '@cs3org/cs3-jupyter-client:shares',
name: '@cs3org/cs3-jupyter:shares',
svgstr: `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path xmlns="http://www.w3.org/2000/svg" d="M13 14H11C7.54202 14 4.53953 15.9502 3.03239 18.8107C3.01093 18.5433 3 18.2729 3 18C3 12.4772 7.47715 8 13 8V3L23 11L13 19V14Z"></path></svg>`
});

Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { openEditShareModal } from './share-edit-modal';
* to the corresponding EOS path.
*/
const sharesPlugin: JupyterFrontEndPlugin<void> = {
id: '@cs3org/cs3-jupyter-client:shares',
id: '@cs3org/cs3-jupyter:shares',
description: 'Browse CERNBox shared folders from the JupyterLab sidebar',
autoStart: true,
requires: [IDefaultFileBrowser, IDocumentManager],
Expand All @@ -24,7 +24,7 @@ const sharesPlugin: JupyterFrontEndPlugin<void> = {
docManager: IDocumentManager,
labShell: ILabShell | null
) => {
console.log('[cs3org/cs3-jupyter-client] Activating shares plugin');
console.log('[cs3org/cs3-jupyter] Activating shares plugin');

const widget = new SharesWidget(fileBrowser, app.shell, app.commands, docManager.registry);
widget.title.icon = shareIcon;
Expand All @@ -35,7 +35,7 @@ const sharesPlugin: JupyterFrontEndPlugin<void> = {
app.shell.add(widget, 'left');
}

const SHARE_COMMAND = '@cs3org/cs3-jupyter-client:share-file';
const SHARE_COMMAND = '@cs3org/cs3-jupyter:share-file';

app.commands.addCommand(SHARE_COMMAND, {
label: 'Share',
Expand Down
2 changes: 1 addition & 1 deletion src/shares-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function SharesPanel({
shell.activateById(fileBrowser.id);
}
} catch (err) {
console.error(`[cs3org/cs3-jupyter-client:shares] Failed to open ${share.path}:`, err);
console.error(`[cs3org/cs3-jupyter:shares] Failed to open ${share.path}:`, err);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/spaces-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class SpacesWidget extends Widget {
// Switch to the file browser tab in the sidebar
this._shell.activateById(this._fileBrowser.id);
} catch (err) {
console.error(`[cs3org/cs3-jupyter-client:spaces] Failed to navigate to ${space.path}:`, err);
console.error(`[cs3org/cs3-jupyter:spaces] Failed to navigate to ${space.path}:`, err);
}
}

Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ __metadata:
languageName: node
linkType: hard

"@cs3org/cs3-jupyter-client@workspace:.":
"@cs3org/cs3-jupyter@workspace:.":
version: 0.0.0-use.local
resolution: "@cs3org/cs3-jupyter-client@workspace:."
resolution: "@cs3org/cs3-jupyter@workspace:."
dependencies:
"@eslint/js": ^9.39.2
"@jupyterlab/application": ^4.5.1
Expand Down
Loading