This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from jtpio/settings
Ensure `@retrolab` settings
- Loading branch information
Showing
13 changed files
with
112 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* ----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
import commander from 'commander'; | ||
|
||
import fs from 'fs-extra'; | ||
|
||
import path from 'path'; | ||
|
||
import process from 'process'; | ||
|
||
import { run } from '@jupyterlab/buildutils'; | ||
|
||
commander | ||
.description('Setup the repository for develop mode') | ||
.option('--overwrite', 'Force linking the RetroLab schemas') | ||
.option('--source', 'The path to the retrolab package') | ||
.action((options: any) => { | ||
const { overwrite } = options; | ||
const prefix = run( | ||
'python -c "import sys; print(sys.prefix)"', | ||
{ | ||
stdio: 'pipe' | ||
}, | ||
true | ||
); | ||
const source = path.resolve(options.source ?? process.cwd()); | ||
const sourceDir = path.join(source, 'retrolab', 'schemas', '@retrolab'); | ||
const destDir = path.join( | ||
prefix, | ||
'share', | ||
'jupyter', | ||
'lab', | ||
'schemas', | ||
'@retrolab' | ||
); | ||
if (overwrite) { | ||
try { | ||
fs.unlinkSync(destDir); | ||
console.log('Removed previous symlink:', destDir); | ||
} catch (e) { | ||
console.info('Skip unlinkink', destDir); | ||
} | ||
} | ||
console.log('Symlinking:', sourceDir, destDir); | ||
fs.symlinkSync(sourceDir, destDir, 'dir'); | ||
}); | ||
|
||
commander.parse(process.argv); |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"jupyter.lab.setting-icon": "retro-ui-components:retroSun", | ||
"jupyter.lab.setting-icon-label": "RetroLab Top Area", | ||
"title": "RetroLab Top Area", | ||
"description": "RetroLab Top Area settings", | ||
"properties": { | ||
"visible": { | ||
"type": "boolean", | ||
"title": "Top Bar Visibility", | ||
"description": "Whether to show the top bar or not", | ||
"default": true | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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