kopia lustrzana https://github.com/deathbeds/ipydrawio
Support ipywidgets 8 (#99)
rodzic
90fc15ce92
commit
99c8d628d5
|
@ -51,16 +51,17 @@ dependencies:
|
|||
############################################################################
|
||||
### ipydrawio-docs-deps ###
|
||||
|
||||
- docutils >=0.18.1
|
||||
- jupyter-server-mathjax
|
||||
- myst-nb
|
||||
- pkginfo
|
||||
- pydata-sphinx-theme
|
||||
- pydata-sphinx-theme >=0.10.1,<0.11.0
|
||||
- pytest-check-links
|
||||
- sphinx !=4.4.0=*_0
|
||||
- sphinx >=5,<6
|
||||
- sphinx-jsonschema
|
||||
- sphinxext-rediraffe
|
||||
- pip:
|
||||
- jupyterlite ==0.1.0b11
|
||||
- jupyterlite ==0.1.0b12
|
||||
|
||||
### ipydrawio-docs-deps ###
|
||||
|
||||
|
@ -74,8 +75,8 @@ dependencies:
|
|||
- nodejs >=12,!=13.*,<15
|
||||
- python # this gets patched in ci
|
||||
# run
|
||||
- ipywidgets >=7.6,<8
|
||||
- jupyterlab >=3.4.4,<4.0.0a0
|
||||
- ipywidgets >=7.6,<9
|
||||
- jupyterlab >=3.4.5,<4.0.0a0
|
||||
- jupyterlab_widgets >=1
|
||||
- lxml
|
||||
- pillow
|
||||
|
@ -83,6 +84,7 @@ dependencies:
|
|||
- requests_cache
|
||||
- retrolab
|
||||
# building
|
||||
- flit >=3.7.1
|
||||
- pip
|
||||
- twine >=3.7.1
|
||||
- wheel
|
||||
|
@ -102,7 +104,7 @@ dependencies:
|
|||
- pytest-tornasync
|
||||
- pytest-xdist
|
||||
# acceptance testing
|
||||
- firefox =91
|
||||
- firefox =102
|
||||
- geckodriver >=0.28.0
|
||||
- robotframework >=4
|
||||
- robotframework-pabot
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# extra packages for python 3.7
|
||||
# extra/pinned packages for python 3.7
|
||||
|
||||
# Copyright 2022 ipydrawio contributors
|
||||
#
|
||||
|
@ -23,3 +23,5 @@ channels:
|
|||
dependencies:
|
||||
# for flake8, sigh
|
||||
- importlib-metadata <4.3
|
||||
# for legacy ipywidgets
|
||||
- ipywidgets <8
|
||||
|
|
|
@ -28,8 +28,8 @@ dependencies:
|
|||
- nodejs >=12,!=13.*,<15
|
||||
- python # this gets patched in ci
|
||||
# run
|
||||
- ipywidgets >=7.6,<8
|
||||
- jupyterlab >=3.4.4,<4.0.0a0
|
||||
- ipywidgets >=7.6,<9
|
||||
- jupyterlab >=3.4.5,<4.0.0a0
|
||||
- jupyterlab_widgets >=1
|
||||
- lxml
|
||||
- pillow
|
||||
|
@ -37,6 +37,7 @@ dependencies:
|
|||
- requests_cache
|
||||
- retrolab
|
||||
# building
|
||||
- flit >=3.7.1
|
||||
- pip
|
||||
- twine >=3.7.1
|
||||
- wheel
|
||||
|
@ -56,7 +57,7 @@ dependencies:
|
|||
- pytest-tornasync
|
||||
- pytest-xdist
|
||||
# acceptance testing
|
||||
- firefox =91
|
||||
- firefox =102
|
||||
- geckodriver >=0.28.0
|
||||
- robotframework >=4
|
||||
- robotframework-pabot
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
black
|
||||
doit
|
||||
flake8
|
||||
ipywidgets >=7.6,<8
|
||||
ipywidgets >=7.6,<9
|
||||
isort >=5
|
||||
jsonpointer
|
||||
jupyterlab ==3.*
|
||||
|
|
|
@ -35,7 +35,7 @@ env:
|
|||
|
||||
# our stuff
|
||||
ATEST_RETRIES: '3'
|
||||
CACHE_EPOCH: '1'
|
||||
CACHE_EPOCH: '2'
|
||||
DOIT_N_BUILD: '-n4'
|
||||
DOIT_N_TEST: '-n4'
|
||||
CONDA_BUILDERER: mambabuild
|
||||
|
|
|
@ -4,10 +4,14 @@
|
|||
|
||||
### ipydrawio-widgets 1.2.1
|
||||
|
||||
- add support for `ipywidgets` 8 [#98]
|
||||
|
||||
### ipydrawio 1.2.1
|
||||
|
||||
#### @deathbeds/ipydrawio 1.2.1
|
||||
|
||||
- add support `@jupyter-widgets/jupyterlab-manager` 5 [#98]
|
||||
|
||||
#### @deathbeds/ipydrawio-notebook 1.2.1
|
||||
|
||||
#### @deathbeds/ipydrawio-webpack 20.2.100
|
||||
|
@ -20,6 +24,8 @@
|
|||
|
||||
#### @deathbeds/ipydrawio-pdf 1.2.1
|
||||
|
||||
[#98]: https://github.com/deathbeds/ipydrawio/issues/98
|
||||
|
||||
## Releases
|
||||
|
||||
### ipydrawio-widgets 1.2.0
|
||||
|
|
|
@ -27,34 +27,41 @@ ${CMD PALETTE ITEM ACTIVE} css:#command-palette .lm-CommandPalette-
|
|||
${JLAB XP TOP} //div[@id='jp-top-panel']
|
||||
${JLAB XP MENU ITEM LABEL} //div[contains(@class, 'lm-Menu-itemLabel')]
|
||||
${JLAB XP MENU LABEL} //div[contains(@class, 'lm-MenuBar-itemLabel')]
|
||||
${JLAB XP DOCK TAB} xpath://div[contains(@class, 'lm-DockPanel-tabBar')]//li[contains(@class, 'lm-TabBar-tab')]
|
||||
${JLAB XP DOCK TAB}
|
||||
... xpath://div[contains(@class, 'lm-DockPanel-tabBar')]//li[contains(@class, 'lm-TabBar-tab')]
|
||||
${JLAB CSS VERSION} css:.jp-About-version
|
||||
${CSS DIALOG OK} css:.jp-Dialog .jp-mod-accept
|
||||
${MENU OPEN WITH} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "Open With")]
|
||||
${MENU OPEN WITH}
|
||||
... xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "Open With")]
|
||||
# N is missing on purpose
|
||||
${MENU NOTEBOOK} xpath://li[@data-command="filebrowser:open"]//div[contains(@class, 'lm-Menu-itemLabel')][contains(., "otebook")]
|
||||
${MENU NOTEBOOK}
|
||||
... xpath://li[@data-command="filebrowser:open"]//div[contains(@class, 'lm-Menu-itemLabel')][contains(., "otebook")]
|
||||
${DIALOG WINDOW} css:.jp-Dialog
|
||||
${DIALOG INPUT} css:.jp-Input-Dialog input
|
||||
${DIALOG ACCEPT} css:button.jp-Dialog-button.jp-mod-accept
|
||||
# TODO: get ours
|
||||
# ${STATUSBAR} css:div.lsp-statusbar-item
|
||||
${MENU EDITOR} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(., "Editor")]
|
||||
${MENU SETTINGS} xpath://div[contains(@class, 'lm-MenuBar-itemLabel')][contains(text(), "Settings")]
|
||||
${MENU SETTINGS}
|
||||
... xpath://div[contains(@class, 'lm-MenuBar-itemLabel')][contains(text(), "Settings")]
|
||||
${MENU RENAME} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(., "ename")]
|
||||
# settings
|
||||
${DIO PLUGIN ID} @deathbeds/ipydrawio:plugin
|
||||
${DIO PLUGIN SETTINGS FILE} @deathbeds${/}ipydrawio${/}plugin.jupyterlab-settings
|
||||
${CSS USER SETTINGS} .jp-SettingsRawEditor-user
|
||||
${JLAB XP CLOSE SETTINGS} ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/*[contains(@class, 'm-TabBar-tabCloseIcon')]
|
||||
${JLAB XP CLOSE SETTINGS}
|
||||
... ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/*[contains(@class, 'm-TabBar-tabCloseIcon')]
|
||||
# launcher
|
||||
${XP LAUNCH TAB} ${JLAB XP DOCK TAB}//*[contains(text(), 'Launcher')]
|
||||
${CSS LAUNCHER} css:.jp-Launcher-body
|
||||
${CREATE A BLANK} Create a blank .dio file
|
||||
${CSS LAUNCH DIO} css:.jp-LauncherCard[title='${CREATE A BLANK}'] svg
|
||||
${CSS LAUNCH CUSTOM} css:.jp-LauncherCard[title='Create a diagram with customized formats, templates, and UI'] svg
|
||||
${CSS LAUNCH CUSTOM}
|
||||
... css:.jp-LauncherCard[title='Create a diagram with customized formats, templates, and UI'] svg
|
||||
# ipykernel 5 is "Python 3". ipykernel 6 is "Python 3 (ipykernel)"... but only works on python 3.7+
|
||||
# TODO: consider capturing this information as a tag
|
||||
${CSS LAUNCH IPYNB} css:.jp-LauncherCard[data-category='Notebook'][title^='Python 3'] .jp-LauncherCard-icon
|
||||
${CSS LAUNCH IPYNB}
|
||||
... css:.jp-LauncherCard[data-category='Notebook'][title^='Python 3'] .jp-LauncherCard-icon
|
||||
${CSS DIO READY} css:.jp-Diagram-ready
|
||||
${CSS DIO IFRAME} ${CSS DIO READY} iframe
|
||||
# drawio
|
||||
|
@ -74,7 +81,7 @@ ${JLAB CSS ACTIVE INPUT} ${JLAB CSS ACTIVE CELL} .CodeMirror
|
|||
${JLAB CSS ACTIVE OUTPUT CHILDREN} ${JLAB CSS ACTIVE CELL} .jp-OutputArea-child
|
||||
${JLAB CSS OUTPUT} .jp-OutputArea-output
|
||||
${JLAB CSS ACTIVE CELL MARKDOWN} ${JLAB CSS ACTIVE CELL} .jp-MarkdownOutput:not(.jp-mod-hidden)
|
||||
${JLAB CSS ACTIVE SIDEBAR} .jp-SideBar .p-TabBar-tab.p-mod-current
|
||||
${JLAB CSS ACTIVE SIDEBAR} .jp-SideBar .p-TabBar-tab.lm-mod-current
|
||||
${JLAB CSS BUSY KERNEL} .jp-Toolbar-kernelStatus.jp-FilledCircleIcon
|
||||
${JLAB CSS CMD INPUT} .p-CommandPalette-input
|
||||
${JLAB CSS CMD ITEM} .p-CommandPalette-item
|
||||
|
|
|
@ -79,7 +79,7 @@ Duplicate Shape
|
|||
Click Element At Coordinates ${CSS DIO BG} 100 100
|
||||
FOR ${i} IN RANGE ${duplicates}
|
||||
Sleep 0.1s
|
||||
${els} = Get WebElements css:rect[width\="120"]
|
||||
${els} = Get WebElements css:rect[width\="120"][pointer-events="all"]:not([visibility="hidden"])
|
||||
Click Element ${els[-1]}
|
||||
Press Keys css:body ${ACCEL}+D
|
||||
END
|
||||
|
|
|
@ -39,5 +39,5 @@ Open Retro Path
|
|||
Create a Diagram from Retro Tree
|
||||
Wait Until Page Contains Element ${CSS RETRO TREE DIO BTN}
|
||||
Click Element ${CSS RETRO TREE DIO BTN}
|
||||
Switch Window NEW
|
||||
Wait Until Keyword Succeeds 5x 5s Switch Window NEW
|
||||
Wait Until Keyword Succeeds 5x 5s Wait for a Diagram to be Ready
|
||||
|
|
|
@ -56,7 +56,7 @@ outputs:
|
|||
- pip
|
||||
- python >=3.7
|
||||
run:
|
||||
- ipywidgets >=7.6,<8
|
||||
- ipywidgets >=7.6,<9
|
||||
- python >=3.7
|
||||
test:
|
||||
imports:
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
"LiteBuildConfig": {
|
||||
"federated_extensions": [
|
||||
"../py_packages/ipydrawio/dist/ipydrawio-1.2.1-py3-none-any.whl",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/bqplot-0.12.33-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/bqplot-0.12.34-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/jupyterlab-tour-3.1.4-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/jupyterlab-webrtc-docprovider-0.1.1-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/jupyterlab_widgets-1.1.0-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/jupyterlab_widgets-3.0.2-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/wxyz_datagrid-0.5.1-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/wxyz_json_schema_form-0.5.1-pyhd8ed1ab_0.tar.bz2",
|
||||
"https://conda.anaconda.org/conda-forge/noarch/wxyz_lab-0.5.1-pyhd8ed1ab_0.tar.bz2",
|
||||
|
@ -16,7 +16,8 @@
|
|||
"output_archive": "../build/demo/ipydrawio-lite-1.2.1.tgz",
|
||||
"output_dir": "../build/demo",
|
||||
"piplite_urls": [
|
||||
"../py_packages/ipydrawio-widgets/dist/ipydrawio_widgets-1.2.1-py3-none-any.whl"
|
||||
"../py_packages/ipydrawio-widgets/dist/ipydrawio_widgets-1.2.1-py3-none-any.whl",
|
||||
"../demo/mocks/widgetsnbextension/dist/widgetsnbextension-4.0.2-py3-none-any.whl"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2022, JupyterLite Contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,4 @@
|
|||
# widgetsnbextension mock
|
||||
|
||||
This is an widgetsnbextension mock that provides nothing. It's only there so that
|
||||
`piplite.install('widgetsnbextension')` does not fail (for ipywidgets support)
|
|
@ -0,0 +1,18 @@
|
|||
[build-system]
|
||||
requires = ["flit_core >=3.7.1,<4"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
|
||||
[project]
|
||||
name = "widgetsnbextension"
|
||||
authors = [
|
||||
{name = "JupyterLite Contributors"},
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10,<3.11"
|
||||
dynamic = ["version", "description"]
|
||||
classifiers = [
|
||||
"License :: OSI Approved :: BSD License",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Source = "https://github.com/jupyterlite/jupyterlite"
|
|
@ -0,0 +1,3 @@
|
|||
"""A widgetsnbextension mock"""
|
||||
|
||||
__version__ = "4.0.2"
|
|
@ -1,2 +1,2 @@
|
|||
# a set of packages we capture offline for the demo site
|
||||
ipywidgets >=7.6,<8
|
||||
ipywidgets >=7.6,<9
|
||||
|
|
|
@ -15,20 +15,40 @@
|
|||
**/
|
||||
|
||||
:root {
|
||||
--ipd-card-background: rgb(var(--pst-color-preformatted-background));
|
||||
--ipd-brand-color0: var(--pst-color-active-navigation);
|
||||
--ipd-card-background: var(--pst-color-preformatted-background);
|
||||
--ipd-card-border: solid 1px rgba(0, 0, 0, 0.125);
|
||||
--ipd-card-padding: var(--ipd-card-text-base);
|
||||
--ipd-card-shadow-1: 0.125em 0.125em 0.125em 0.125em rgba(0, 0, 0, 0.05);
|
||||
--ipd-card-shadow-2: 0.25em 0.25em 0.25em 0.125em rgba(0, 0, 0, 0.1);
|
||||
--ipd-card-text-base: 0.8em;
|
||||
--ipd-card-padding: var(--ipd-card-text-base);
|
||||
--ipd-card-text-header: calc(var(--ipd-card-text-base) * 1.25);
|
||||
--pst-color-active-navigation: 123, 138, 255;
|
||||
--pst-color-inline-code: 0, 22, 192;
|
||||
--pst-color-preformatted-background: 240, 248, 255;
|
||||
--pst-color-headerlink: var(--pst-color-active-navigation);
|
||||
--ipd-brand-color0: rgb(var(--pst-color-active-navigation));
|
||||
--pst-color-inline-code: rgb(0, 22, 192);
|
||||
--pst-color-preformatted-background: rgb(240, 248, 255);
|
||||
--pst-color-primary: rgb(123, 138, 255);
|
||||
--pst-sidebar-secondary: 25em;
|
||||
}
|
||||
|
||||
/* dark */
|
||||
html[data-theme='dark'] {
|
||||
--pst-color-preformatted-background: rgb(9, 40, 66);
|
||||
--pst-color-border: rgb(17, 78, 128);
|
||||
}
|
||||
|
||||
html[data-theme='dark'] img {
|
||||
filter: unset;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] .myst.download img {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] .rst-versions .rst-current-version {
|
||||
color: var(--pst-color-primary);
|
||||
}
|
||||
|
||||
/* basics */
|
||||
code {
|
||||
background-color: var(--ipd-card-background);
|
||||
padding: 0.125em 0.5em;
|
||||
|
@ -37,6 +57,7 @@ code {
|
|||
a.headerlink {
|
||||
padding: 0 calc(0.5 * var(--ipd-card-padding));
|
||||
margin-left: calc(0.25 * var(--ipd-card-padding));
|
||||
color: var(--pst-color-inline-code);
|
||||
}
|
||||
a.headerlink:hover {
|
||||
border-radius: calc(0.25 * var(--ipd-card-padding));
|
||||
|
@ -49,20 +70,44 @@ a:active {
|
|||
text-decoration: dashed underline 1px;
|
||||
}
|
||||
|
||||
.navbar-light .navbar-nav .nav-link {
|
||||
/* layout */
|
||||
|
||||
.bd-page-width {
|
||||
max-width: unset !important;
|
||||
}
|
||||
|
||||
.bd-content {
|
||||
flex-grow: 1;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.bd-main .bd-content .bd-article-container {
|
||||
max-width: unset;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.bd-header .navbar-nav .nav-link {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.navbar-light .navbar-nav > .active > .nav-link {
|
||||
font-weight: 600;
|
||||
text-decoration: dashed underline 1px;
|
||||
.bd-header .navbar-nav .nav-item {
|
||||
border-bottom: solid 0.2em transparent;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container,
|
||||
.container-xl {
|
||||
max-width: 100%;
|
||||
}
|
||||
.bd-header .navbar-nav .nav-item.current {
|
||||
border-bottom: solid 0.2em var(--pst-color-primary);
|
||||
}
|
||||
|
||||
.bd-sidebar {
|
||||
max-width: var(--pst-sidebar-secondary);
|
||||
}
|
||||
|
||||
.bd-main .bd-content .bd-article-container section p,
|
||||
.bd-main .bd-content .bd-article-container section .admonition,
|
||||
.bd-main .bd-content .bd-article-container section blockquote {
|
||||
max-width: 60em;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#navbar-start {
|
||||
|
@ -70,13 +115,6 @@ a:active {
|
|||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
#navbar-center {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
}
|
||||
|
||||
footer .container,
|
||||
.toctree-wrapper.compound > ul {
|
||||
display: flex;
|
||||
|
@ -85,6 +123,7 @@ footer .container,
|
|||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
justify-content: space-between;
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
.bd-sidebar {
|
||||
|
@ -134,7 +173,6 @@ footer .container > .footer-item:hover,
|
|||
}
|
||||
|
||||
#bd-toc-nav {
|
||||
padding: var(--ipd-card-padding) 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
@ -145,7 +183,7 @@ footer .container > .footer-item:hover,
|
|||
.toctree-wrapper.compound > ul > .toctree-l1 > a {
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
color: var(--pst-color-primary);
|
||||
font-size: var(--ipd-card-text-header);
|
||||
padding-bottom: var(--ipd-card-padding);
|
||||
}
|
||||
|
@ -159,18 +197,18 @@ footer .container > .footer-item:hover,
|
|||
|
||||
/* cleanup */
|
||||
div.cell div.cell_input {
|
||||
border-left: solid 4px rgb(var(--pst-color-active-navigation));
|
||||
border-left: solid 4px var(--pst-color-active-navigation);
|
||||
max-width: unset;
|
||||
text-align: left;
|
||||
padding: calc(0.25 * var(--ipd-card-padding)) 0;
|
||||
}
|
||||
|
||||
/* demo */
|
||||
.demo-sidebar {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.demo-sidebar .btn-primary {
|
||||
background-color: var(--ipd-brand-color0);
|
||||
font-size: 150%;
|
||||
opacity: 0.5;
|
||||
transition: all 0.2s;
|
||||
|
|
|
@ -34,7 +34,8 @@ APP_DATA = json.loads(APP_PKG.read_text(encoding="utf-8"))
|
|||
RTD = json.loads(os.environ.get("READTHEDOCS", "False").lower())
|
||||
RTD_TASKS = [
|
||||
"build",
|
||||
"setup:pip:check",
|
||||
# TODO: fix once sphinx-rtd-theme supports modern docutils
|
||||
# "setup:pip:check",
|
||||
"docs:typedoc:mystify",
|
||||
"demo:stage*",
|
||||
"demo",
|
||||
|
|
|
@ -23,16 +23,17 @@ channels:
|
|||
dependencies:
|
||||
### ipydrawio-docs-deps ###
|
||||
|
||||
- docutils >=0.18.1
|
||||
- jupyter-server-mathjax
|
||||
- myst-nb
|
||||
- pkginfo
|
||||
- pydata-sphinx-theme
|
||||
- pydata-sphinx-theme >=0.10.1,<0.11.0
|
||||
- pytest-check-links
|
||||
- sphinx !=4.4.0=*_0
|
||||
- sphinx >=5,<6
|
||||
- sphinx-jsonschema
|
||||
- sphinxext-rediraffe
|
||||
- pip:
|
||||
- jupyterlite ==0.1.0b11
|
||||
- jupyterlite ==0.1.0b12
|
||||
|
||||
### ipydrawio-docs-deps ###
|
||||
|
||||
|
@ -45,8 +46,8 @@ dependencies:
|
|||
- nodejs >=12,!=13.*,<15
|
||||
- python # this gets patched in ci
|
||||
# run
|
||||
- ipywidgets >=7.6,<8
|
||||
- jupyterlab >=3.4.4,<4.0.0a0
|
||||
- ipywidgets >=7.6,<9
|
||||
- jupyterlab >=3.4.5,<4.0.0a0
|
||||
- jupyterlab_widgets >=1
|
||||
- lxml
|
||||
- pillow
|
||||
|
@ -54,6 +55,7 @@ dependencies:
|
|||
- requests_cache
|
||||
- retrolab
|
||||
# building
|
||||
- flit >=3.7.1
|
||||
- pip
|
||||
- twine >=3.7.1
|
||||
- wheel
|
||||
|
@ -73,7 +75,7 @@ dependencies:
|
|||
- pytest-tornasync
|
||||
- pytest-xdist
|
||||
# acceptance testing
|
||||
- firefox =91
|
||||
- firefox =102
|
||||
- geckodriver >=0.28.0
|
||||
- robotframework >=4
|
||||
- robotframework-pabot
|
||||
|
|
|
@ -15,9 +15,9 @@ Install `ipydrawio` (and optionally `ipydrawio-export`) with `pip`, `mamba`, or
|
|||
```bash
|
||||
pip install ipydrawio[all]
|
||||
# or
|
||||
mamba install -c conda-forge ipydrawio
|
||||
mamba install -c conda-forge ipydrawio # ipydrawio-export
|
||||
# or
|
||||
conda install -c conda-forge ipydrawio
|
||||
conda install -c conda-forge ipydrawio # ipydrawio-export
|
||||
```
|
||||
|
||||
Start JupyterLab and [start making diagrams](./diagrams/index.md)!
|
||||
|
@ -30,7 +30,7 @@ Start JupyterLab and [start making diagrams](./diagrams/index.md)!
|
|||
The in-browser demo has some <strong>pointy edges</strong>...
|
||||
<ul>
|
||||
<li>
|
||||
<code>jupyterlite</code> is <em>alpha</em> software, and evolving quickly
|
||||
<code>jupyterlite</code> is <em>beta</em> software, and evolving quickly
|
||||
</li>
|
||||
<li>
|
||||
<strong>Don't</strong> use the demo site for important work
|
||||
|
|
20
dodo.py
20
dodo.py
|
@ -439,7 +439,7 @@ def task_build():
|
|||
yield P._ok(
|
||||
dict(
|
||||
name="js",
|
||||
file_dep=[P.YARN_INTEGRITY, P.OK_JS_BUILD_PRE, *P.ALL_TS, *P.ALL_CSS],
|
||||
file_dep=[P.YARN_INTEGRITY, P.OK_JS_BUILD_PRE, *P.ALL_TS, *P.ALL_SRC_CSS],
|
||||
actions=[[*P.LERNA, "run", "build", "--stream"]],
|
||||
targets=sorted(P.JS_TSBUILDINFO.values()),
|
||||
),
|
||||
|
@ -731,6 +731,19 @@ def task_demo():
|
|||
demo_tasks = []
|
||||
final_dest = []
|
||||
|
||||
js_wheels = []
|
||||
|
||||
for py_pkg, wheel in P.PYOLITE_PACKAGES.items():
|
||||
name = py_pkg.name
|
||||
js_wheels += [wheel]
|
||||
yield dict(
|
||||
name=f"js:py:{name}",
|
||||
doc=f"build the {name} python package for the browser with flit",
|
||||
file_dep=[*py_pkg.rglob("*.py"), py_pkg / "pyproject.toml"],
|
||||
actions=[(P.build_one_flit, [py_pkg])],
|
||||
targets=[wheel],
|
||||
)
|
||||
|
||||
yield dict(
|
||||
name="pyodide:packages",
|
||||
doc="fetch the pyodide packages.json",
|
||||
|
@ -751,7 +764,7 @@ def task_demo():
|
|||
yield dict(
|
||||
name="extensions",
|
||||
doc="update jupyter-lite.json from the conda env",
|
||||
file_dep=[P.ENV_BINDER, *P.PY_WHEEL.values()],
|
||||
file_dep=[P.ENV_BINDER, *P.PY_WHEEL.values(), *js_wheels],
|
||||
targets=[P.DEMO_CONFIG],
|
||||
actions=[
|
||||
(
|
||||
|
@ -761,7 +774,7 @@ def task_demo():
|
|||
P.DEMO_CONFIG,
|
||||
P.FED_EXT_MARKER,
|
||||
[P.PY_WHEEL[P.IPD.name]],
|
||||
[P.PY_WHEEL[P.IPDW.name]],
|
||||
[P.PY_WHEEL[P.IPDW.name], *js_wheels],
|
||||
],
|
||||
)
|
||||
],
|
||||
|
@ -857,6 +870,7 @@ def task_docs():
|
|||
P.DOCS_FAVICON_ICO,
|
||||
P.OK_PIP_CHECK,
|
||||
*P.DOCS_SRC,
|
||||
*P.ALL_DOCS_STATIC,
|
||||
]
|
||||
sphinx_task_deps = []
|
||||
|
||||
|
|
|
@ -14,15 +14,15 @@
|
|||
"devDependencies": {
|
||||
"@jupyterlab/builder": "^3.4.0",
|
||||
"typescript": "~4.2.3",
|
||||
"@jupyter-widgets/base": "^4.0.0",
|
||||
"@jupyter-widgets/controls": "^3.0.0",
|
||||
"@jupyter-widgets/jupyterlab-manager": "^3.0.0",
|
||||
"@jupyter-widgets/base": "^4.0.0 || ^6.0.0",
|
||||
"@jupyter-widgets/controls": "^3.0.0 || ^5.0.0",
|
||||
"@jupyter-widgets/jupyterlab-manager": "^3.0.0 || ^5.0.0",
|
||||
"json-schema-to-typescript": "^10.1.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@jupyter-widgets/base": "4",
|
||||
"@jupyter-widgets/controls": "^3.0.0",
|
||||
"@jupyter-widgets/jupyterlab-manager": "^3.0.0"
|
||||
"@jupyter-widgets/base": "^4.0.0 || ^6.0.0",
|
||||
"@jupyter-widgets/controls": "^3.0.0 || ^5.0.0",
|
||||
"@jupyter-widgets/jupyterlab-manager": "^3.0.0 || ^5.0.0"
|
||||
},
|
||||
"files": [
|
||||
"{lib,schema,style,src}/**/*.{ts,tsx,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,css}",
|
||||
|
|
|
@ -186,7 +186,7 @@ export class DiagramView extends BoxView {
|
|||
*/
|
||||
render() {
|
||||
super.render();
|
||||
this.pWidget.addClass('jp-IPyDiagram');
|
||||
(this.luminoWidget || this.pWidget).addClass('jp-IPyDiagram');
|
||||
this._displayInterval = setInterval(this.waitForDisplayed, 50);
|
||||
}
|
||||
|
||||
|
@ -194,12 +194,12 @@ export class DiagramView extends BoxView {
|
|||
* A low-tech way to wait until we are quite sure the diagram is displayed.
|
||||
*/
|
||||
protected waitForDisplayed = () => {
|
||||
if (!this.pWidget.isVisible) {
|
||||
if (!(this.luminoWidget || this.pWidget).isVisible) {
|
||||
return;
|
||||
}
|
||||
clearInterval(this._displayInterval);
|
||||
this.initDiagram();
|
||||
this.pWidget.addWidget(this.diagram);
|
||||
(this.luminoWidget || this.pWidget).addWidget(this.diagram);
|
||||
this.diagram.onContentChanged();
|
||||
this.diagram.onAfterShow();
|
||||
this.model.on('change:source', this.onModelSourceChange, this);
|
||||
|
|
|
@ -52,7 +52,7 @@ include_package_data = True
|
|||
zip_safe = False
|
||||
|
||||
install_requires =
|
||||
ipywidgets >=7.6,<8
|
||||
ipywidgets >=7.6,<9
|
||||
jsonschema
|
||||
|
||||
[options.extras_require]
|
||||
|
|
|
@ -174,7 +174,7 @@ ENV_GH_CB_WIN = GH / "environment-conda-build-win.yml"
|
|||
PY = ["python"]
|
||||
PYM = [*PY, "-m"]
|
||||
PIP = [*PYM, "pip"]
|
||||
PIP_CHECK_IGNORE = "^(No broken|pylint) "
|
||||
PIP_CHECK_IGNORE = "^(No broken|pylint|sphinx-rtd-theme) "
|
||||
|
||||
NPM = (
|
||||
shutil.which("npm")
|
||||
|
@ -395,9 +395,20 @@ DEMO_WHEELS = DEMO / "pypi"
|
|||
NOARCH_WHL = "py3-none-any.whl"
|
||||
IGNORED_WHEELS = ["widgetsnbextension", "nbformat", "ipykernel", "pyolite"]
|
||||
# sync swith jupyterlite
|
||||
PYODIDE_URL = "https://cdn.jsdelivr.net/pyodide/v0.20.0/full"
|
||||
PYODIDE_URL = "https://cdn.jsdelivr.net/pyodide/v0.21.1/full"
|
||||
PYODIDE_PACKAGES = BUILD / "pyodide-packages.json"
|
||||
|
||||
DEMO_PATCHES = DEMO / "mocks"
|
||||
PYOLITE_PACKAGES = {
|
||||
pyproj.parent: pyproj.parent
|
||||
/ "dist/{}-{}-py3-none-any.whl".format(
|
||||
pyproj.parent.name,
|
||||
re.findall(
|
||||
r'''__version__ = "(.*)"''',
|
||||
next((pyproj.parent).glob("*/__init__.py")).read_text(encoding="utf-8"),
|
||||
)[0],
|
||||
)
|
||||
for pyproj in DEMO_PATCHES.glob("*/pyproject.toml")
|
||||
}
|
||||
|
||||
# docs
|
||||
SPHINX_ARGS = json.loads(os.environ.get("SPHINX_ARGS", "[]"))
|
||||
|
@ -417,6 +428,7 @@ DOCS_RST = _clean(DOCS.rglob("*.rst"))
|
|||
DOCS_IPYNB = _clean(DOCS.rglob("*.ipynb"))
|
||||
DOCS_SRC = _clean(DOCS_MD, DOCS_RST, DOCS_IPYNB)
|
||||
DOCS_STATIC = DOCS / "_static"
|
||||
ALL_DOCS_STATIC = [p for p in DOCS_STATIC.rglob("*") if not p.is_dir()]
|
||||
DOCS_FAVICON_SVG = DOCS_STATIC / "icon.svg"
|
||||
DOCS_FAVICON_ICO = DOCS_STATIC / "favicon.ico"
|
||||
DOCS_TS = DOCS / "api/ts"
|
||||
|
@ -485,7 +497,8 @@ ALL_MD = [*ROOT.glob("*.md"), *PACKAGES.glob("*/*.md"), *DOCS_MD]
|
|||
ALL_SETUP_CFG = [SETUP_CFG, *PY_SETUP_CFG.values()]
|
||||
ALL_JS = [PACKAGES / ".eslintrc.js"]
|
||||
ALL_TS = sum(JS_TSSRC.values(), [])
|
||||
ALL_CSS = [*sum(JS_STYLE.values(), []), *DOCS.rglob("*.css")]
|
||||
ALL_SRC_CSS = [*sum(JS_STYLE.values(), [])]
|
||||
ALL_CSS = [*ALL_SRC_CSS, *DOCS.rglob("*.css")]
|
||||
ALL_ROBOT = [*ATEST.rglob("*.robot")]
|
||||
ALL_PRETTIER = [*ALL_YML, *ALL_JSON, *ALL_MD, *ALL_TS, *ALL_CSS, *ALL_JS]
|
||||
ALL_HEADERS = _clean(
|
||||
|
@ -928,7 +941,7 @@ def _sync_lite_config(from_env, to_json, marker, extra_federated, extra_pyolite)
|
|||
def fetch_pyodide_packages():
|
||||
import urllib.request
|
||||
|
||||
url = f"{PYODIDE_URL}/packages.json"
|
||||
url = f"{PYODIDE_URL}/repodata.json"
|
||||
print("fetching pyodide packages from", url)
|
||||
with urllib.request.urlopen(url) as response:
|
||||
packages = json.loads(response.read().decode("utf-8"))
|
||||
|
@ -973,6 +986,35 @@ def template_one(src, dest):
|
|||
dest.write_text(template.render(P=globals()))
|
||||
|
||||
|
||||
def build_one_flit(py_pkg):
|
||||
"""attempt to build one package with flit: on RTD, allow doing a build in /tmp"""
|
||||
import tempfile
|
||||
|
||||
print(f"[{py_pkg.name}] trying in-tree build...", flush=True)
|
||||
args = ["flit", "--debug", "build", "--setup-py"]
|
||||
|
||||
try:
|
||||
subprocess.check_call(args, cwd=str(py_pkg))
|
||||
except subprocess.CalledProcessError:
|
||||
if not RTD:
|
||||
print(f"[{py_pkg.name}] ... in-tree build failed, not on ReadTheDocs")
|
||||
return False
|
||||
print(
|
||||
f"[{py_pkg.name}] ... in-tree build failed, trying build in tempdir...",
|
||||
flush=True,
|
||||
)
|
||||
py_dist = py_pkg / "dist"
|
||||
if py_dist.exists():
|
||||
shutil.rmtree(py_dist)
|
||||
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
tdp = Path(td)
|
||||
py_tmp = tdp / py_pkg.name
|
||||
shutil.copytree(py_pkg, py_tmp)
|
||||
subprocess.call(args, cwd=str(py_tmp))
|
||||
shutil.copytree(py_tmp / "dist", py_dist)
|
||||
|
||||
|
||||
# Late environment hacks
|
||||
os.environ.update(
|
||||
CONDARC=str(CONDARC),
|
||||
|
|
Ładowanie…
Reference in New Issue