Skip to content

Commit

Permalink
[wip] Upgrade to drawio 15.8.6 (QuantStack#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Nov 27, 2021
1 parent 33097b5 commit 1921c34
Show file tree
Hide file tree
Showing 26 changed files with 351 additions and 164 deletions.
7 changes: 5 additions & 2 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ dependencies:
############################################################################
### ipydrawio-docs-deps ###

- jupyter-server-mathjax
- myst-nb
- pkginfo
- pydata-sphinx-theme
- pytest-check-links
- sphinx
- sphinx-jsonschema
- sphinxext-rediraffe
- pip:
- jupyterlite ==0.1.0a16
- jupyterlite ==0.1.0a17

### ipydrawio-docs-deps ###

Expand All @@ -71,7 +73,7 @@ dependencies:
- python # this gets patched in ci
# run
- ipywidgets >=7.6
- jupyterlab >=3.1.9,<4.0.0a0
- jupyterlab >=3.2.4,<4.0.0a0
- jupyterlab_widgets >=1
- lxml
- pillow
Expand All @@ -92,6 +94,7 @@ dependencies:
- pytest
- pytest-console-scripts
- pytest-cov
- pytest-html
- pytest-tornasync
# acceptance testing
- firefox =91
Expand Down
3 changes: 2 additions & 1 deletion .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
- python # this gets patched in ci
# run
- ipywidgets >=7.6
- jupyterlab >=3.1.9,<4.0.0a0
- jupyterlab >=3.2.4,<4.0.0a0
- jupyterlab_widgets >=1
- lxml
- pillow
Expand All @@ -50,6 +50,7 @@ dependencies:
- pytest
- pytest-console-scripts
- pytest-cov
- pytest-html
- pytest-tornasync
# acceptance testing
- firefox =91
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ jobs:
cd ../ipydrawio-export
codecov --root ../..
- name: upload (utest)
if: always()
uses: actions/upload-artifact@v2
with:
name:
ipydrawio ${{ github.run_number }} utest ${{ matrix.os }}${{
matrix.python-version }}
path: ./build/pytest

- name: upload (atest)
if: always()
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -354,10 +363,16 @@ jobs:
use-only-tar-bz2: true
use-mamba: true

- name: download (dist)
uses: actions/download-artifact@v2
with:
name: ipydrawio ${{ github.run_number }} dist
path: ./dist

- name: build docs
shell: bash -l {0}
run: |
doit $DOIT_N_TEST docs || doit docs
doit $DOIT_N_TEST docs || doit docs || doit docs
- name: check docs
shell: bash -l {0}
Expand All @@ -367,7 +382,7 @@ jobs:
- name: lite tests
shell: bash -l {0}
run: |
doit $DOIT_N_TEST test
doit $DOIT_N_TEST test:robot
- name: upload (atest lite)
if: always()
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@

#### @deathbeds/ipydrawio-notebook 1.1.2

#### @deathbeds/ipydrawio-webpack 15.7.300
#### @deathbeds/ipydrawio-webpack 15.8.600

- upgrade to drawio v15.7.3 for enhancements and bug fixes
- upgrade to drawio v15.8.6 for enhancements and bug fixes

#### @deathbeds/ipydrawio-jupyter-templates 1.1.2

### ipydrawio-export 1.1.2

#### @deathbeds/ipydrawio-pdf 1.1.2

- a `yarn.lock` is shipped to reduce provisioning time and increase
reproducibility

[#72]: https://github.com/deathbeds/ipydrawio/issues/72

## Releases
Expand Down
1 change: 1 addition & 0 deletions demo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ _output
*.ipynb
*doit.db
files/
pypi/
4 changes: 0 additions & 4 deletions demo/jupyter_lite_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"LiteBuildConfig": {
"contents": ["."],
"federated_extensions": [
"../py_packages/ipydrawio/dist/ipydrawio-1.1.2-py3-none-any.whl",
"https://github.com/conda-forge/releases/releases/download/noarch/bqplot-0.12.31-pyhd8ed1ab_0.tar.bz2/bqplot-0.12.31-pyhd8ed1ab_0.tar.bz2",
Expand All @@ -11,9 +10,6 @@
"https://github.com/conda-forge/releases/releases/download/noarch/wxyz_lab-0.5.1-pyhd8ed1ab_0.tar.bz2/wxyz_lab-0.5.1-pyhd8ed1ab_0.tar.bz2",
"https://github.com/conda-forge/releases/releases/download/noarch/wxyz_svg-0.5.1-pyhd8ed1ab_0.tar.bz2/wxyz_svg-0.5.1-pyhd8ed1ab_0.tar.bz2"
],
"ignore_contents": [
"(lab/|_output|.gitignore|doit.db|\\.json$|jupyter_config|log$|\\.cache|\\.ipynb_checkpoints)"
],
"ignore_sys_prefix": true,
"lite_dir": ".",
"output_archive": "../build/demo/ipydrawio-lite-1.1.2.tgz",
Expand Down
2 changes: 2 additions & 0 deletions demo/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# a set of packages we capture offline for the demo site
ipywidgets >=7.6,<8
7 changes: 5 additions & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ channels:
dependencies:
### ipydrawio-docs-deps ###

- jupyter-server-mathjax
- myst-nb
- pkginfo
- pydata-sphinx-theme
- pytest-check-links
- sphinx
- sphinx-jsonschema
- sphinxext-rediraffe
- pip:
- jupyterlite ==0.1.0a16
- jupyterlite ==0.1.0a17

### ipydrawio-docs-deps ###

Expand All @@ -44,7 +46,7 @@ dependencies:
- python # this gets patched in ci
# run
- ipywidgets >=7.6
- jupyterlab >=3.1.9,<4.0.0a0
- jupyterlab >=3.2.4,<4.0.0a0
- jupyterlab_widgets >=1
- lxml
- pillow
Expand All @@ -65,6 +67,7 @@ dependencies:
- pytest
- pytest-console-scripts
- pytest-cov
- pytest-html
- pytest-tornasync
# acceptance testing
- firefox =91
Expand Down
80 changes: 58 additions & 22 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ def task_setup():
targets=[P.YARN_INTEGRITY],
)

yield dict(
name="js:ipde",
file_dep=[P.IPDE_DIE2_PACKAGE_JSON],
targets=[P.IPDE_DIE2_YARN_LOCK],
actions=[
CmdAction(
[*P.JLPM, "--ignore-optional", "--prefer-offline"],
shell=False,
cwd=P.IPDE_DIE2,
),
],
)

for pkg, pkg_setup in P.PY_SETUP.items():
# TODO: refactor
ext_deps = [
Expand Down Expand Up @@ -495,6 +508,10 @@ def task_build():
]
)
)

if py_setup.parent == P.IPDE:
file_dep += [P.IPDE_DIE2_YARN_LOCK]

yield dict(
name=f"sdist:{py_pkg}",
file_dep=file_dep,
Expand Down Expand Up @@ -683,6 +700,27 @@ def task_demo():
print("jupyterlite not found, this might be okay", flush=True)
return

demo_dest = [*P.DEMO.glob("*.json")]
demo_tasks = []
final_dest = []

yield dict(
name="pyodide:packages",
doc="fetch the pyodide packages.json",
uptodate=[doit.tools.config_changed(P.PYODIDE_URL)],
targets=[P.PYODIDE_PACKAGES],
actions=[P.fetch_pyodide_packages],
)

demo_tasks += ["demo:wheels"]

yield dict(
name="wheels",
doc="fetch wheels",
file_dep=[P.PYODIDE_PACKAGES, P.DEMO_REQS],
actions=[P.fetch_wheels],
)

yield dict(
name="extensions",
doc="update jupyter-lite.json from the conda env",
Expand All @@ -701,12 +739,9 @@ def task_demo():
],
)

demo_dest = []
demo_tasks = []
final_dest = []
for path in P.ALL_DEMO_CONTENTS:
name = f"stage:{path.name}"
dest = P.DEMO / path.name.replace(" ", "_")
dest = P.DEMO_FILES / path.name.replace(" ", "_")
demo_dest += [dest]
demo_tasks += [f"demo:{name}"]
final_dest += [P.DEMO_BUILD / f"files/{path.name}"]
Expand All @@ -721,19 +756,10 @@ def task_demo():
assert final_dest
assert demo_tasks

lite_src_files = [
p
for p in P.DEMO.rglob("*")
if not p.is_dir()
and "/_output/" not in str(p)
and not p.name.endswith(".tgz")
and ".doit" not in p.name
]

yield dict(
name="archive",
task_dep=demo_tasks,
file_dep=[*demo_dest, *lite_src_files],
file_dep=[*demo_dest, *P.DEMO_WHEELS.glob(f"*{P.NOARCH_WHL}")],
targets=[P.DEMO_ARCHIVE, P.DEMO_HASHES, *final_dest, P.DEMO_CONTENTS_API],
actions=[P._build_lite],
)
Expand Down Expand Up @@ -861,13 +887,12 @@ def task_provision():
)


def _pytest(setup_py):
def _test():
subprocess.check_call(
[*P.PYM, "pytest", *P.PYTEST_ARGS], shell=False, cwd=str(setup_py.parent)
)

return _test
def _pytest(setup_py, *pytest_args):
return CmdAction(
[*P.PYM, "pytest", *P.PYTEST_ARGS, *pytest_args],
shell=False,
cwd=str(setup_py.parent),
)


def task_test():
Expand All @@ -892,6 +917,13 @@ def task_test():
)

for pkg, setup in P.PY_SETUP.items():
html = P.BUILD / f"pytest/{pkg}/test.html"
htmlcov = P.BUILD / f"pytest/{pkg}/htmlcov"
pytest_args = [
f"--cov-report=html:{htmlcov}",
f"--html={html}",
"--self-contained-html",
]
yield P._ok(
dict(
name=f"pytest:{pkg}",
Expand All @@ -903,7 +935,11 @@ def task_test():
P.OK_PROVISION,
P.OK_PIP_CHECK,
],
actions=[PythonInteractiveAction(_pytest(setup))],
actions=[
(P.delete_some, [htmlcov, html]),
_pytest(setup, *pytest_args),
],
targets=[htmlcov / "status.json", html],
),
P.OK_PYTEST[pkg],
)
Expand Down
3 changes: 1 addition & 2 deletions packages/ipydrawio-webpack/.npmignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
*.tgz
**/.ipynb_checkpoints
dio/.git*
dio/*.json
dio/*.md
dio/*/.npmignore
dio/*/*.json
dio/*/*.orig
dio/connect/*
dio/dropbox*
Expand All @@ -17,6 +15,7 @@ dio/math/jax/output/HTML-CSS/*
dio/META-INF/*
dio/onedrive*
dio/onedrive*.html
dio/package.json
dio/WEB-INF/*
dio/yarn.lock
drawio/
Expand Down
2 changes: 1 addition & 1 deletion packages/ipydrawio-webpack/drawio
Submodule drawio updated 115 files
6 changes: 1 addition & 5 deletions packages/ipydrawio-webpack/lib/_static.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/google-dri
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/google-share.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/grid.gif';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/handle-connect.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/handle-fixed.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/handle-main.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/handle-rotate.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/handle-secondary.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/handle-terminal.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/help.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/hs.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/hv.png';
Expand All @@ -112,6 +107,7 @@ import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/logo-quip.
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/logo-small.gif';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/logo-white.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/logo.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/manifest.json';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/move.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/mstile-150x150.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/images/my-diagrams-sel.svg';
Expand Down
2 changes: 1 addition & 1 deletion packages/ipydrawio-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
"build:pre": "python scripts/patch.py && python scripts/static.py"
},
"types": "lib/index.d.ts",
"version": "15.7.300"
"version": "15.8.600"
}
8 changes: 8 additions & 0 deletions packages/ipydrawio-webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ module.exports = {
optimization: {
minimize: false,
},
module: {
rules: [
{
test: /dio\/.*/,
type: 'asset/resource',
},
],
},
};
2 changes: 1 addition & 1 deletion packages/ipydrawio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@jupyterlab/application": "^3.1.0",
"@jupyterlab/launcher": "^3.1.0",
"@jupyterlab/mainmenu": "^3.1.0",
"@deathbeds/ipydrawio-webpack": "^15.7.300"
"@deathbeds/ipydrawio-webpack": "^15.8.600"
},
"description": "A JupyterLab extension for embedding interactive drawio / mxgraph diagrams.",
"devDependencies": {
Expand Down
Loading

0 comments on commit 1921c34

Please sign in to comment.