Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspaces CLI #5166

Merged
merged 32 commits into from Sep 20, 2018
Merged

Workspaces CLI #5166

merged 32 commits into from Sep 20, 2018

Conversation

@afshin
Copy link
Member

@afshin afshin commented Aug 20, 2018

Provides a command-line interface for workspace import and export:

$ # Export the default JupyterLab workspace.
$ jupyter lab workspaces export
{"data": {}, "metadata": {"id": "/lab"}}
$
$ # Export the workspaces named `foo`.
$ jupyter lab workspaces export foo
{"data": {}, "metadata": {"id": "/lab/workspaces/foo"}}
$
$ # Export the workspace named `foo` into a file called `any_file_name.json`.
$ jupyter lab workspaces export foo > any_file_name.json
$
$ # Import the workspace file `any_file_name.json`.
$ jupyter lab workspaces import any_file_name.json
Saved workspace: /Users/af/.jupyter/lab/workspaces/labworkspacesfoo-54d5.jupyterlab-workspace

The export functionality is as friendly as possible: if a workspace does not exist, it will still generate an empty workspace for export.

The import functionality validates the structure of the workspace file and validates the id field in the workspace metadata to make sure its URL is compatible with either the workspaces_url configuration or the page_url configuration (i.e., it is either a legitimate named workspace or it is the default workspace).

@afshin afshin self-assigned this Aug 20, 2018
@afshin afshin force-pushed the workspaces-cli branch from 8ad02ce to 45757bc Aug 20, 2018
@afshin afshin force-pushed the workspaces-cli branch 5 times, most recently from 6601008 to c408ef0 Aug 30, 2018
@blink1073 blink1073 added this to the 0.35 milestone Aug 31, 2018
@afshin afshin force-pushed the workspaces-cli branch 2 times, most recently from 728032a to c0924d1 Sep 5, 2018
@blink1073 blink1073 removed this from the 0.35 milestone Sep 5, 2018
@blink1073 blink1073 added this to the 1.0 milestone Sep 5, 2018
@afshin afshin force-pushed the workspaces-cli branch 3 times, most recently from 4a64e42 to 8f0bc56 Sep 11, 2018
@afshin afshin changed the title Workspaces CLI [WIP] Workspaces CLI Sep 11, 2018
@afshin afshin force-pushed the workspaces-cli branch from 8f0bc56 to f131e74 Sep 11, 2018
@blink1073
Copy link
Member

@blink1073 blink1073 commented Sep 13, 2018

Are you seeing a built app with no console errors if you run yarn build && jupyter lab --dev-mode?

@afshin
Copy link
Member Author

@afshin afshin commented Sep 13, 2018

I don't have a global yarn command, but if I run jlpm build && jupyter lab --dev-mode it builds and runs without any console errors.

@afshin afshin force-pushed the workspaces-cli branch 7 times, most recently from 564647f to bcc2a8a Sep 14, 2018
@afshin afshin force-pushed the workspaces-cli branch from 1bc3cb0 to 67b4dc0 Sep 19, 2018
@blink1073
Copy link
Member

@blink1073 blink1073 commented Sep 20, 2018

w00t!

@blink1073 blink1073 merged commit 5d9b409 into jupyterlab:master Sep 20, 2018
1 of 2 checks passed
@@ -162,20 +162,39 @@ function main() {

// Handle a browser test.
var browserTest = PageConfig.getOption('browserTest');
var el = document.createElement('div');
Copy link
Member

@ian-r-rose ian-r-rose Sep 27, 2018

@afshin This appears to be the cause of #5393. Is there a reason to add this div to the page with '[]', and to do it outside of the if-statement?

Copy link
Member Author

@afshin afshin Sep 27, 2018

This is a mistake, I did not realize this would have an impact on the non-test environment. Sorry! I mistook this PR's consequences as only being server-side.

Copy link
Member

@ian-r-rose ian-r-rose Sep 27, 2018

Sounds good. Should this be moved inside the if statement, or removed entirely?

@blink1073 blink1073 removed this from the 1.0 milestone Sep 28, 2018
@blink1073 blink1073 added this to the 0.35 milestone Sep 28, 2018
@blink1073 blink1073 mentioned this pull request Sep 28, 2018
31 tasks
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants