Skip to content

Commit

Permalink
Update to jupyterlab 3.1.0 (QuantStack#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Jul 28, 2021
1 parent 504f102 commit 4086fc8
Show file tree
Hide file tree
Showing 18 changed files with 4,760 additions and 1,237 deletions.
5 changes: 1 addition & 4 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ name: ipydrawio-demo

channels:
- conda-forge
- conda-forge/label/jupyterlab_rc

dependencies:
- python >=3.9
# demo toys
- bqplot
- graphviz2drawio
- jupyter-lsp-python-lsp-server
- retrolab
- jupyterlab-link-share
- jupyter-videochat
- jupyterlab-lsp
- matplotlib-base
- nbgitpuller
Expand Down Expand Up @@ -74,7 +71,7 @@ dependencies:
- python # this gets patched in ci
# run
- ipywidgets >=7.6
- jupyterlab >=3.1.0rc2,<4.0.0a0
- jupyterlab >=3.1.0,<4.0.0a0
- jupyterlab_widgets >=1
- lxml
- pillow
Expand Down
3 changes: 0 additions & 3 deletions .binder/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
},
"@jupyterlab/extensionmanager-extension:plugin": {
"enabled": false
},
"jupyterlab-videochat": {
"area": "main"
}
}
3 changes: 1 addition & 2 deletions .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ name: ipydrawio-dev

channels:
- conda-forge
- conda-forge/label/jupyterlab_rc
- nodefaults

dependencies:
Expand All @@ -30,7 +29,7 @@ dependencies:
- python # this gets patched in ci
# run
- ipywidgets >=7.6
- jupyterlab >=3.1.0rc2,<4.0.0a0
- jupyterlab >=3.1.0,<4.0.0a0
- jupyterlab_widgets >=1
- lxml
- pillow
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__pycache__
_output
.coverage*
*doit.db
.eslintcache
.ipynb_checkpoints
.pabotsuitenames
.virtual_documents/
Expand All @@ -14,6 +14,7 @@ _output
*.tgz
*.tsbuildinfo
**/*DRAWIO_DEBUG*
*doit.db
atest/output/
build/
dist/
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ pip install ipydrawio[all]
- plus some Jupyter ones
- Jupyter [rich display][] output
- Jupyter [Widgets][]
- Basic collaborative editing
- requires the `--collaborative` flag, added in JupyterLab 3.1+
- token sharing, _a la_ [jupyterlab-link-share], or a custom connector (no
known yet)
- no presence indicators for other editors
- `ipydrawio-export`
- Export print-quality PDF from diagrams
- optionally include editable Drawio XML as a PDF attachment
Expand Down Expand Up @@ -227,3 +232,5 @@ limitations under the License.
[launcher]:
https://jupyterlab.readthedocs.io/en/stable/user/files.html?highlight=Launcher#creating-files-and-activities
[file manager]: https://jupyterlab.readthedocs.io/en/stable/user/files.html
[jupyterlab-link-share]:
https://github.com/jupyterlab-contrib/jupyterlab-link-share
11 changes: 9 additions & 2 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ outputs:
home: https://github.com/deathbeds/ipydrawio
summary: Draw.io Diagrams as Jupyter Widgets
license: Apache-2.0
license_file: ipydrawio/LICENSE.txt
license_file:
- ipydrawio/LICENSE.txt
- ipydrawio/src/ipydrawio/ext/ipd/static/third-party-licenses.json
- ipydrawio/src/ipydrawio/ext/ipdnb/static/third-party-licenses.json
- ipydrawio/src/ipydrawio/ext/ipdwp/static/third-party-licenses.json
- ipydrawio/src/ipydrawio/ext/ipjt/static/third-party-licenses.json

- name: ipydrawio-export
version: {{ version }}
Expand Down Expand Up @@ -126,7 +131,9 @@ outputs:
home: https://github.com/deathbeds/ipydrawio
summary: PDF export for IPyDrawio
license: Apache-2.0
license_file: ipydrawio-export/LICENSE.txt
license_file:
- ipydrawio-export/LICENSE.txt
- ipydrawio-export/src/ipydrawio_export/ext/ipdpdf/static/third-party-licenses.json

about:
home: https://github.com/deathbeds/ipydrawio
Expand Down
3 changes: 1 addition & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ name: ipydrawio-docs

channels:
- conda-forge
- conda-forge/label/jupyterlab_rc
- nodefaults

dependencies:
Expand Down Expand Up @@ -49,7 +48,7 @@ dependencies:
- python # this gets patched in ci
# run
- ipywidgets >=7.6
- jupyterlab >=3.1.0rc2,<4.0.0a0
- jupyterlab >=3.1.0,<4.0.0a0
- jupyterlab_widgets >=1
- lxml
- pillow
Expand Down
1 change: 1 addition & 0 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def task_lint():
actions=[P._echo_ok("all ok")],
file_dep=[
P.OK_BLACK,
P.OK_ESLINT,
P.OK_FLAKE8,
P.OK_ISORT,
P.OK_PRETTIER,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"prettier": "^2.1.1",
"prettier-plugin-sort-json": "^0.0.2",
"typedoc": "^0.20.36",
"typedoc-plugin-markdown": "^3.7.2"
"typedoc-plugin-markdown": "~3.9.0"
},
"prettier": {
"singleQuote": true,
Expand All @@ -22,8 +22,8 @@
},
"scripts": {
"bootstrap": "jlpm --prefer-offline && lerna bootstrap",
"eslint": "cd packages && eslint --ext .js,.ts,.tsx --fix .",
"eslint:check": "cd packages && eslint --ext .js,.ts,.tsx ."
"eslint": "cd packages && eslint --cache --fix --ext .js,.ts,.tsx .",
"eslint:check": "cd packages && eslint --cache --ext .js,.ts,.tsx ."
},
"workspaces": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/_meta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@deathbeds/ipydrawio": "file:../ipydrawio"
},
"devDependencies": {
"typescript": "~4.2.4"
"typescript": "~4.2.3"
},
"scripts": {
"build": "tsc --build src",
Expand Down
6 changes: 3 additions & 3 deletions packages/ipydrawio-jupyter-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
},
"homepage": "https://ipydrawio.rtfd.io",
"dependencies": {
"@jupyterlab/application": "3",
"@jupyterlab/application": "^3.1.0",
"@deathbeds/ipydrawio": "^1.1.1"
},
"description": "Jupyter Templates for IPyDrawio",
"devDependencies": {
"@jupyterlab/builder": "^3.0.2",
"typescript": "~4.2.4"
"@jupyterlab/builder": "^3.1.0",
"typescript": "~4.2.3"
},
"peerDependencies": {},
"files": [
Expand Down
8 changes: 4 additions & 4 deletions packages/ipydrawio-notebook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
},
"homepage": "https://ipydrawio.rtfd.io",
"dependencies": {
"@jupyterlab/application": "3",
"@jupyterlab/notebook": "3"
"@jupyterlab/application": "^3.1.0",
"@jupyterlab/notebook": "^3.1.0"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.2",
"typescript": "~4.2.4"
"@jupyterlab/builder": "^3.1.0",
"typescript": "~4.2.3"
},
"peerDependencies": {
"@deathbeds/ipydrawio": "^1.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/ipydrawio-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"homepage": "https://ipydrawio.rtfd.io",
"version": "1.1.1",
"dependencies": {
"@jupyterlab/application": "3"
"@jupyterlab/application": "^3.1.0"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.2",
"typescript": "~4.2.4"
"@jupyterlab/builder": "^3.1.0",
"typescript": "~4.2.3"
},
"peerDependencies": {
"@deathbeds/ipydrawio": "^1.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/ipydrawio-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"url": "https://github.com/deathbeds/ipydrawio/issues"
},
"dependencies": {
"@jupyterlab/application": "3"
"@jupyterlab/application": "^3.1.0"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.2",
"typescript": "~4.2.4"
"@jupyterlab/builder": "^3.1.0",
"typescript": "~4.2.3"
},
"description": "A webpack-ready repackaging of drawio",
"homepage": "https://ipydrawio.rtfd.io",
Expand Down
20 changes: 10 additions & 10 deletions packages/ipydrawio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
},
"homepage": "https://ipydrawio.rtfd.io",
"dependencies": {
"@jupyterlab/application": "3",
"@jupyterlab/launcher": "3",
"@jupyterlab/mainmenu": "3"
"@jupyterlab/application": "^3.1.0",
"@jupyterlab/launcher": "^3.1.0",
"@jupyterlab/mainmenu": "^3.1.0"
},
"description": "A JupyterLab extension for embedding interactive drawio / mxgraph diagrams.",
"devDependencies": {
"@jupyterlab/builder": "^3.0.2",
"typescript": "~4.2.4",
"@jupyter-widgets/base": "4",
"@jupyter-widgets/controls": "3",
"@jupyter-widgets/jupyterlab-manager": "3",
"@jupyterlab/builder": "^3.1.0",
"typescript": "~4.2.3",
"@jupyter-widgets/base": "^4.0.0",
"@jupyter-widgets/controls": "^3.0.0",
"@jupyter-widgets/jupyterlab-manager": "^3.0.0",
"json-schema-to-typescript": "^10.1.4"
},
"peerDependencies": {
"@deathbeds/ipydrawio-webpack": "^14.9.200",
"@jupyter-widgets/base": "4",
"@jupyter-widgets/controls": "3",
"@jupyter-widgets/jupyterlab-manager": "3"
"@jupyter-widgets/controls": "^3.0.0",
"@jupyter-widgets/jupyterlab-manager": "^3.0.0"
},
"files": [
"{lib,schema,style,src}/**/*.{ts,tsx,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,css}",
Expand Down
6 changes: 3 additions & 3 deletions packages/ipydrawio/src/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export class DiagramDocument extends DocumentWidget<Diagram> {
this._manager = options.manager;
this.getSettings = options.getSettings;

this._onTitleChanged();
this.context.pathChanged.connect(this._onTitleChanged, this);
this._onDiagramTitleChanged();
this.context.pathChanged.connect(this._onDiagramTitleChanged, this);
this.context.ready
.then(async () => {
DEBUG && console.warn('format', this.format);
Expand All @@ -75,7 +75,7 @@ export class DiagramDocument extends DocumentWidget<Diagram> {
/**
* Handle a change to the title.
*/
private _onTitleChanged(): void {
private _onDiagramTitleChanged(): void {
DEBUG && console.warn('contentsModel', this.context.contentsModel);

this.title.label = PathExt.basename(this.context.localPath);
Expand Down
7 changes: 7 additions & 0 deletions py_packages/ipydrawio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ pip install ipydrawio[all]
- plus some Jupyter ones
- Jupyter [rich display][] output
- Jupyter [Widgets][]
- Basic collaborative editing
- requires the `--collaborative` flag, added in JupyterLab 3.1+
- token sharing, _a la_ [jupyterlab-link-share], or a custom connector (no
known yet)
- no presence indicators for other editors
- `ipydrawio-export`
- Export print-quality PDF from diagrams
- optionally include editable Drawio XML as a PDF attachment
Expand Down Expand Up @@ -227,3 +232,5 @@ limitations under the License.
[launcher]:
https://jupyterlab.readthedocs.io/en/stable/user/files.html?highlight=Launcher#creating-files-and-activities
[file manager]: https://jupyterlab.readthedocs.io/en/stable/user/files.html
[jupyterlab-link-share]:
https://github.com/jupyterlab-contrib/jupyterlab-link-share
Loading

0 comments on commit 4086fc8

Please sign in to comment.