Skip to content

Commit 0bd8b35

Browse files
authored
Seperate ipydrawio-widgets package for kernel-only installs (QuantStack#89)
1 parent 8b44965 commit 0bd8b35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1629
-1066
lines changed

.binder/environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ name: ipydrawio-demo
1818

1919
channels:
2020
- conda-forge
21+
- nodefaults
2122

2223
dependencies:
2324
- python >=3.7
@@ -58,7 +59,7 @@ dependencies:
5859
- sphinx-jsonschema
5960
- sphinxext-rediraffe
6061
- pip:
61-
- jupyterlite ==0.1.0a19
62+
- jupyterlite ==0.1.0a20
6263

6364
### ipydrawio-docs-deps ###
6465

.github/pip-build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
black
33
doit
44
flake8
5-
ipywidgets >=7.6
5+
ipywidgets >=7.6,<8
66
isort >=5
77
jsonpointer
88
jupyterlab ==3.*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ packages/ipydrawio-webpack/dio/
2727
py_packages/**/src/*/ext/
2828
py_packages/ipydrawio-export/ipydrawio-export-*
2929
py_packages/ipydrawio/ipydrawio-*
30+
py_packages/ipydrawio-widgets/src/ipydrawio_widgets/js/**/*
3031
untitled*
3132
Untitled*

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22

33
## Unreleased
44

5-
### ipydrawio 1.2.0
5+
### ipydrawio-widgets 1.2.0
66

7-
- fixes selection in widget diagrams with more than 10 shapes [#85]
7+
- new kernel-only package for headless kernel installs [#63]
88
- adds `cell_ids` to widget diagrams [#88]
9+
10+
### ipydrawio 1.2.0
11+
912
- `jupyter ipydrawio clean` can now cleans `.ipynb` metadata and outputs [#88]
1013
- minimum supported python is now to 3.7
1114

1215
#### @deathbeds/ipydrawio 1.2.0
1316

17+
- fixes selection in widget diagrams with more than 10 shapes [#85]
18+
1419
#### @deathbeds/ipydrawio-notebook 1.2.0
1520

16-
#### @deathbeds/ipydrawio-webpack 16.2.400
21+
#### @deathbeds/ipydrawio-webpack 16.4.0
1722

18-
- updates to drawio v16.2.400
23+
- updates to drawio v16.4.0
1924

2025
#### @deathbeds/ipydrawio-jupyter-templates 1.2.0
2126

@@ -25,6 +30,7 @@
2530

2631
#### @deathbeds/ipydrawio-pdf 1.2.0
2732

33+
[#63]: https://github.com/deathbeds/ipydrawio/issues/63
2834
[#85]: https://github.com/deathbeds/ipydrawio/issues/85
2935
[#88]: https://github.com/deathbeds/ipydrawio/issues/88
3036

atest/examples/TestFile.dio

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
<mxGraphModel dx="1856" dy="1259" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1"><mxGeometry x="365" y="750" width="120" as="geom8etry"/></mxCell><mxCell id="3" value="u" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" parent="1" vertex="1"><mxGeometry x="310" y="430" width="180" height="190" as="geometry"/></mxCell><mxCell id="4" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1"><mxGeometry x="350" y="130" width="230" height="230" as="geometry"/></mxCell><mxCell id="5" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;size=0.4867722511291504;" vertex="1" parent="1"><mxGeometry x="120" y="230" width="120" height="80" as="geometry"/></mxCell><mxCell id="6" value="" style="shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;" vertex="1" parent="1"><mxGeometry x="190" y="445" width="120" height="80" as="geometry"/></mxCell></root></mxGraphModel>
1+
<mxGraphModel dx="1856" dy="1259" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff">
2+
<root>
3+
<mxCell id="0"/>
4+
<mxCell id="1" parent="0"/>
5+
<mxCell id="2" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
6+
<mxGeometry x="365" y="750" width="120" as="geom8etry"/>
7+
</mxCell>
8+
<mxCell id="3" value="u" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" parent="1" vertex="1">
9+
<mxGeometry x="310" y="430" width="180" height="190" as="geometry"/>
10+
</mxCell>
11+
<mxCell id="4" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
12+
<mxGeometry x="350" y="130" width="230" height="230" as="geometry"/>
13+
</mxCell>
14+
<mxCell id="5" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;size=0.4867722511291504;" vertex="1" parent="1">
15+
<mxGeometry x="120" y="230" width="120" height="80" as="geometry"/>
16+
</mxCell>
17+
<mxCell id="6" value="" style="shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;" vertex="1" parent="1">
18+
<mxGeometry x="190" y="445" width="120" height="80" as="geometry"/>
19+
</mxCell>
20+
</root>
21+
</mxGraphModel>

atest/examples/This Is A Test.dio

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
<mxGraphModel dx="2190" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;" parent="1" vertex="1"><mxGeometry x="305" y="270" width="120" height="80" as="geometry"/></mxCell><mxCell id="5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.25;exitY=0;jettySize=auto;orthogonalLoop=1;" parent="1" source="3" target="2" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="3" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;" parent="1" vertex="1"><mxGeometry x="540" y="340" width="120" height="80" as="geometry"/></mxCell><mxCell id="6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=0;jettySize=auto;orthogonalLoop=1;" parent="1" source="4" target="3" edge="1"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="380" y="430"/><mxPoint x="410" y="430"/></Array></mxGeometry></mxCell><mxCell id="4" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;" parent="1" vertex="1"><mxGeometry x="320" y="460" width="120" height="80" as="geometry"/></mxCell></root></mxGraphModel>
1+
<mxGraphModel dx="2190" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff">
2+
<root>
3+
<mxCell id="0"/>
4+
<mxCell id="1" parent="0"/>
5+
<mxCell id="2" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;" parent="1" vertex="1">
6+
<mxGeometry x="305" y="270" width="120" height="80" as="geometry"/>
7+
</mxCell>
8+
<mxCell id="5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.25;exitY=0;jettySize=auto;orthogonalLoop=1;" parent="1" source="3" target="2" edge="1">
9+
<mxGeometry relative="1" as="geometry"/>
10+
</mxCell>
11+
<mxCell id="3" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;" parent="1" vertex="1">
12+
<mxGeometry x="540" y="340" width="120" height="80" as="geometry"/>
13+
</mxCell>
14+
<mxCell id="6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=0;jettySize=auto;orthogonalLoop=1;" parent="1" source="4" target="3" edge="1">
15+
<mxGeometry relative="1" as="geometry">
16+
<Array as="points">
17+
<mxPoint x="380" y="430"/>
18+
<mxPoint x="410" y="430"/>
19+
</Array>
20+
</mxGeometry>
21+
</mxCell>
22+
<mxCell id="4" value="" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;" parent="1" vertex="1">
23+
<mxGeometry x="320" y="460" width="120" height="80" as="geometry"/>
24+
</mxCell>
25+
</root>
26+
</mxGraphModel>

atest/lab/Widget.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Create Diagram Widget
5050
[Arguments] ${label} ${add multiple}=${FALSE}
5151
Set Screenshot Directory ${OUTPUT DIR}${/}screenshots${/}widget${/}${label}
5252
Launch Untitled Notebook
53-
Add and Run JupyterLab Code Cell import ipywidgets as W, traitlets as T; from ipydrawio import Diagram
53+
Add and Run JupyterLab Code Cell import ipywidgets as W, traitlets as T; from ipydrawio_widgets import Diagram
5454
Add and Run JupyterLab Code Cell diagram = Diagram(layout\=dict(min_height\="60vh"));
5555
IF ${add multiple}
5656
Create Linked SelectMultiple

atest/lite/_Keywords.robot

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Documentation A work-in-progress set of keywords for JupyterLite
1717
Library OperatingSystem
1818
Library Process
1919
Library ../ports.py
20-
Variables ../demo.py
2120

2221
*** Variable ***
2322
${NEXT LITE LOG} ${0}
@@ -74,7 +73,7 @@ Clean Up Lite Test
7473
Start Lite Suite
7574
[Documentation] Ensure lite assets are available
7675
Set Screenshot Directory ${OUTPUT DIR}${/}lite
77-
Start JupyterLite Server ${DEMO}
76+
Start JupyterLite Server ${ROOT}${/}demo
7877

7978
Clean Up Lite Suite
8079
[Documentation] Clean up after lite

conda.recipe/meta.yaml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ package:
1313
version: {{ version }}
1414

1515
source:
16+
- folder: {{ name }}-widgets
17+
url: file://{{ url_base }}/{{ name }}-widgets-{{ version }}.tar.gz
18+
# url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
19+
# sha256:
20+
1621
- folder: {{ name }}
1722
url: file://{{ url_base }}/{{ name }}-{{ version }}.tar.gz
1823
# url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
@@ -39,6 +44,36 @@ test:
3944
- echo "tests in outputs"
4045

4146
outputs:
47+
- name: {{ name }}-widgets
48+
version: {{ version }}
49+
build:
50+
number: {{ build_number }}
51+
noarch: python
52+
script:
53+
- cd ipydrawio-widgets && {{ PYTHON }} -m pip install . -vv --no-deps
54+
requirements:
55+
host:
56+
- pip
57+
- python >=3.7
58+
run:
59+
- ipywidgets >=7.6,<8
60+
- python >=3.7
61+
test:
62+
imports:
63+
- ipydrawio_widgets
64+
requires:
65+
- pip
66+
- pytest-console-scripts
67+
- pytest-cov
68+
commands:
69+
- pip check
70+
- pytest -vv --pyargs ipydrawio_widgets --cov=ipydrawio_widgets --cov-report=term-missing:skip-covered
71+
about:
72+
home: https://github.com/deathbeds/ipydrawio
73+
summary: Draw.io Diagrams as Jupyter Widgets (kernel only)
74+
license: Apache-2.0
75+
license_file: ipydrawio-widgets/LICENSE.txt
76+
4277
- name: ipydrawio
4378
version: {{ version }}
4479
build:
@@ -53,7 +88,7 @@ outputs:
5388
- pip
5489
- python >=3.7
5590
run:
56-
- ipywidgets >=7.6,<8
91+
- ipydrawio-widgets =={{ version }}.*
5792
- jupyterlab ==3.*
5893
- jupyterlab_widgets >=1
5994
- lxml

demo/jupyter_lite_config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"lite_dir": ".",
1515
"output_archive": "../build/demo/ipydrawio-lite-1.2.0.tgz",
1616
"output_dir": "../build/demo",
17-
"piplite_urls": ["../py_packages/ipydrawio/dist/ipydrawio-1.2.0-py3-none-any.whl"]
17+
"piplite_urls": [
18+
"../py_packages/ipydrawio-widgets/dist/ipydrawio_widgets-1.2.0-py3-none-any.whl"
19+
]
1820
}
1921
}

0 commit comments

Comments
 (0)