ipydrawio/dodo.py

699 wiersze
19 KiB
Python
Czysty Zwykły widok Historia

2021-01-26 04:41:26 +00:00
"""automation for ipydrawio
> see https://pydoit.org/tutorial_1.html#incremental-computation
see what you can do
doit list --status --all | sort
do basically everything to get ready for a release
doit all
maybe before you push
doit -n8 lint
"""
# Copyright 2021 ipydrawio contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
import shutil
import subprocess
import time
2021-01-26 04:41:26 +00:00
from hashlib import sha256
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
from doit.action import CmdAction
from doit.tools import PythonInteractiveAction, config_changed
import scripts.project as P
DOIT_CONFIG = dict(
backend="sqlite3",
verbosity=2,
par_type="thread",
2021-01-29 22:12:44 +00:00
default_tasks=["setup"],
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
)
def task_all():
"""do _everything_ (except start long-running servers)"""
return dict(
uptodate=[lambda: False],
file_dep=[
*P.OK_PYTEST.values(),
P.OK_ATEST,
P.OK_INTEGRITY,
P.OK_PROVISION,
P.SHA256SUMS,
],
actions=[lambda: [print("nothing left to do"), True][1]],
)
def task_dist():
"""create a minimum viable release product"""
return dict(
uptodate=[lambda: False],
file_dep=[P.OK_INTEGRITY, P.SHA256SUMS, P.OK_LINT],
actions=[lambda: print(P.SHA256SUMS.read_text())],
)
def task_env():
def _update_binder():
comment = " ### ipydrawio-dev-deps ###"
old_binder = P.ENV_BINDER.read_text(encoding="utf-8").split(comment)
ci = P.ENV_CI.read_text(encoding="utf-8").split(comment)
P.ENV_BINDER.write_text(
"\n".join([old_binder[0], comment, ci[1], comment, old_binder[2]])
)
yield dict(
name="binder",
file_dep=[P.ENV_CI],
actions=[_update_binder],
targets=[P.ENV_BINDER],
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
def task_submodules():
2021-01-26 04:41:26 +00:00
"""ensure submodules are available"""
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
subs = subprocess.check_output(["git", "submodule"]).decode("utf-8").splitlines()
def _clean():
2021-01-26 04:41:26 +00:00
"""clean drawio, as it gets patched in-place"""
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
if any([x.startswith("-") for x in subs]) and P.DRAWIO.exists():
shutil.rmtree(P.DRAWIO)
return _ok(
dict(
uptodate=[config_changed({"subs": subs})],
actions=[_clean, ["git", "submodule", "update", "--init", "--recursive"]],
),
P.OK_SUBMODULES,
)
def task_setup():
""" perform general steps to get ready for development, testing, or releasing"""
if not P.TESTING_IN_CI:
yield dict(
name="js",
file_dep=[P.YARN_LOCK, P.PACKAGE, P.OK_SUBMODULES],
actions=[
[*P.JLPM, "--ignore-optional", "--prefer-offline"],
[*P.LERNA, "bootstrap"],
],
targets=[P.YARN_INTEGRITY],
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
for pkg, pkg_setup in P.PY_SETUP.items():
# TODO: refactor
ext_deps = [
2021-04-12 11:55:08 +00:00
(
P.JS_PKG_JSON[ext].parent
/ P.JS_PKG_DATA[ext]["jupyterlab"]["outputDir"]
).resolve()
/ "package.json"
for ext, mod in P.JS_LABEXT_PY_HOST.items()
if mod == pkg_setup.parent.name
]
if P.TESTING_IN_CI:
ci_af = {"wheel": P.PY_WHEEL[pkg], "sdist": P.PY_SDIST[pkg]}[P.CI_ARTIFACT]
dist_af = P.DIST / ci_af.name
yield _ok(
dict(
name=f"py:{pkg}",
file_dep=[dist_af],
actions=[
[
*P.PIP,
"install",
"-vv",
"--ignore-installed",
"--no-deps",
dist_af,
]
],
),
P.OK_PYSETUP[pkg],
)
else:
yield _ok(
dict(
name=f"py:{pkg}",
file_dep=[pkg_setup, P.PY_SETUP_CFG[pkg], *ext_deps],
actions=[
CmdAction(
[
*P.PIP,
"install",
"-e",
".",
"--no-deps",
"-vv",
],
shell=False,
cwd=pkg_setup.parent,
),
CmdAction(
[
*P.LAB_EXT,
"develop",
"--debug",
"--overwrite",
".",
],
shell=False,
cwd=pkg_setup.parent,
),
],
),
P.OK_PYSETUP[pkg],
)
yield _ok(
dict(
name="pip:check",
file_dep=[*P.OK_PYSETUP.values()],
actions=[[*P.PIP, "check"]],
),
P.OK_PIP_CHECK,
)
base_ext_args = [
"jupyter",
"serverextension",
"enable",
"--sys-prefix",
"--py",
]
for ext, ext_py in P.SERVER_EXT.items():
enable_args = [*base_ext_args, ext_py.parent.name]
if P.TESTING_IN_CI:
enable_args = ["echo", "'(installed by pip)'"]
yield _ok(
dict(
name=f"ext:{ext}",
doc=f"ensure {ext} is a serverextension",
file_dep=[ext_py, P.OK_PIP_CHECK],
actions=[
enable_args,
["jupyter", "serverextension", "list"],
],
),
P.OK_SERVEREXT[ext],
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
if not P.TESTING_IN_CI:
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
def task_lint():
"""format all source files"""
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
yield _ok(
dict(
name="isort",
2021-04-11 14:35:35 +00:00
file_dep=[*P.ALL_PY, P.SETUP_CFG],
actions=[["isort", *P.ALL_PY]],
),
P.OK_ISORT,
)
yield _ok(
dict(
name="black",
file_dep=[*P.ALL_PY, P.OK_ISORT],
actions=[["black", "--quiet", *P.ALL_PY]],
),
P.OK_BLACK,
)
yield _ok(
dict(
name="flake8",
2021-04-11 14:35:35 +00:00
file_dep=[*P.ALL_PY, P.OK_BLACK, P.SETUP_CFG],
actions=[["flake8", *P.ALL_PY]],
),
P.OK_FLAKE8,
)
yield _ok(
dict(
name="pyflakes",
file_dep=[*P.ALL_PY, P.OK_BLACK],
actions=[["pyflakes", *P.ALL_PY]],
),
P.OK_PYFLAKES,
)
yield _ok(
dict(
name="prettier",
file_dep=[P.YARN_INTEGRITY, *P.ALL_PRETTIER],
actions=[
["jlpm", "prettier", "--list-different", "--write", *P.ALL_PRETTIER]
],
),
P.OK_PRETTIER,
)
yield _ok(
dict(
name="eslint",
2021-04-11 14:35:35 +00:00
file_dep=[
P.YARN_INTEGRITY,
*P.ALL_TS,
P.OK_PRETTIER,
P.ESLINTRC,
P.TSCONFIGBASE,
],
actions=[["jlpm", "eslint"]],
),
P.OK_ESLINT,
)
yield _ok(
dict(
name="all",
actions=[_echo_ok("all ok")],
file_dep=[
P.OK_BLACK,
P.OK_FLAKE8,
P.OK_ISORT,
P.OK_PRETTIER,
P.OK_PYFLAKES,
],
),
P.OK_LINT,
)
yield _ok(
dict(
name="robot:tidy",
file_dep=P.ALL_ROBOT,
actions=[[*P.PYM, "robot.tidy", "--inplace", *P.ALL_ROBOT]],
),
P.OK_ROBOTIDY,
)
yield _ok(
dict(
name="robot:lint",
file_dep=[*P.ALL_ROBOT, P.OK_ROBOTIDY],
actions=[["rflint", *P.RFLINT_OPTS, *P.ALL_ROBOT]],
),
P.OK_RFLINT,
)
yield _ok(
dict(
name="robot:dryrun",
file_dep=[*P.ALL_ROBOT, P.OK_RFLINT],
actions=[[*P.PYM, "scripts.atest", "--dryrun"]],
),
P.OK_ROBOT_DRYRUN,
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
if not P.TESTING_IN_CI:
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
def task_build():
yield _ok(
dict(
name="js:pre",
file_dep=[P.YARN_INTEGRITY, P.IPDW_IGNORE, P.OK_SUBMODULES, *P.IPDW_PY],
actions=[[*P.LERNA, "run", "build:pre", "--stream"]],
targets=[P.IPDW_APP],
),
P.OK_JS_BUILD_PRE,
)
yield _ok(
dict(
name="js",
file_dep=[P.YARN_INTEGRITY, P.OK_JS_BUILD_PRE, *P.ALL_TS, *P.ALL_CSS],
actions=[[*P.LERNA, "run", "build", "--stream"]],
targets=sorted(P.JS_TSBUILDINFO.values()),
),
P.OK_JS_BUILD,
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
)
2021-01-29 22:12:44 +00:00
yield dict(
name="readme:ipydrawio",
file_dep=[P.README],
targets=[P.IPD / "README.md"],
actions=[
lambda: [(P.IPD / "README.md").write_text(P.README.read_text()), None][
-1
]
],
)
for pkg, (file_dep, targets) in P.JS_PKG_PACK.items():
yield dict(
name=f"pack:{pkg}",
file_dep=file_dep,
actions=[
CmdAction(
[P.NPM, "pack", "."], cwd=str(targets[0].parent), shell=False
)
],
targets=targets,
)
pkg_data = P.JS_PKG_DATA[pkg]
if "jupyterlab" not in pkg_data:
continue
2021-04-12 11:55:08 +00:00
out_dir = (
P.JS_PKG_JSON[pkg].parent / pkg_data["jupyterlab"]["outputDir"]
).resolve()
yield _ok(
dict(
name=f"ext:build:{pkg}",
actions=[
CmdAction(
[*P.LAB_EXT, "build", "."],
shell=False,
cwd=P.JS_PKG_JSON[pkg].parent,
)
],
file_dep=targets,
2021-04-12 11:55:08 +00:00
targets=[out_dir / "package.json"],
),
P.OK_EXT_BUILD[pkg],
)
for py_pkg, py_setup in P.PY_SETUP.items():
ext_deps = [
2021-04-12 11:55:08 +00:00
(
P.JS_PKG_JSON[ext].parent
/ P.JS_PKG_DATA[ext]["jupyterlab"]["outputDir"]
).resolve()
/ "package.json"
for ext, mod in P.JS_LABEXT_PY_HOST.items()
if mod == py_setup.parent.name
]
file_dep = sorted(
set(
[
*ext_deps,
*P.PY_SRC[py_pkg],
P.OK_SUBMODULES,
py_setup,
py_setup.parent / "setup.cfg",
py_setup.parent / "MANIFEST.in",
2021-01-29 22:12:44 +00:00
py_setup.parent / "README.md",
py_setup.parent / "LICENSE.txt",
]
)
)
yield dict(
name=f"sdist:{py_pkg}",
file_dep=file_dep,
actions=[
CmdAction(
["python", "setup.py", "sdist"],
shell=False,
cwd=str(py_setup.parent),
),
],
targets=[P.PY_SDIST[py_pkg]],
)
yield dict(
name=f"whl:{py_pkg}",
file_dep=file_dep,
actions=[
CmdAction(
["python", "setup.py", "bdist_wheel"],
shell=False,
cwd=str(py_setup.parent),
),
],
targets=[P.PY_WHEEL[py_pkg]],
)
2021-01-26 04:41:26 +00:00
def _make_hashfile():
# mimic sha256sum CLI
if P.SHA256SUMS.exists():
P.SHA256SUMS.unlink()
2021-01-26 04:41:26 +00:00
if not P.DIST.exists():
P.DIST.mkdir(parents=True)
2021-01-26 04:41:26 +00:00
[shutil.copy2(p, P.DIST / p.name) for p in P.HASH_DEPS]
2021-01-26 04:41:26 +00:00
lines = []
2021-01-26 04:41:26 +00:00
for p in P.HASH_DEPS:
lines += [" ".join([sha256(p.read_bytes()).hexdigest(), p.name])]
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
output = "\n".join(lines)
print(output)
P.SHA256SUMS.write_text(output)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
yield dict(
name="hash",
file_dep=[*P.HASH_DEPS],
targets=[P.SHA256SUMS, *[P.DIST / d.name for d in P.HASH_DEPS]],
actions=[_make_hashfile],
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
2021-04-12 11:55:08 +00:00
def task_conda():
args = [
"conda",
P.CONDA_BUILDERER,
"-c",
"conda-forge",
]
yield dict(
name="build",
file_dep=[
P.RECIPE,
*[P.DIST / p.name for p in P.PY_SDIST.values()],
],
actions=[
[
*args,
"--no-test",
"--output-folder",
P.CONDA_BLD,
P.RECIPE.parent,
]
],
targets=[*P.CONDA_PKGS.values()],
)
2021-04-12 17:47:32 +00:00
for name, pkg in P.CONDA_PKGS.items():
yield _ok(
dict(
name=f"test:{name}",
file_dep=[pkg],
actions=[[*args, "--test", pkg]],
),
P.OK_CONDA_TEST / f"{name}.ok",
)
2021-04-12 11:55:08 +00:00
if not P.TESTING_IN_CI:
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
def task_lab():
"""run JupyterLab "normally" (not watching sources)"""
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
def lab():
proc = subprocess.Popen(P.CMD_LAB, stdin=subprocess.PIPE)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
try:
proc.wait()
except KeyboardInterrupt:
print(
"attempting to stop lab, you may want to check your process monitor"
)
proc.terminate()
proc.communicate(b"y\n")
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
proc.wait()
return dict(
uptodate=[lambda: False],
file_dep=[*P.OK_SERVEREXT.values()],
actions=[PythonInteractiveAction(lab)],
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
def _make_lab(watch=False):
def _lab():
if watch:
print(">>> Starting typescript watcher...", flush=True)
ts = subprocess.Popen([*P.LERNA, "run", "watch"])
ext_watchers = [
subprocess.Popen([*P.LAB_EXT, "watch", "."], cwd=str(p.parent))
for p in P.JS_PKG_JSON_LABEXT.values()
]
print(">>> Waiting a bit to JupyterLab...", flush=True)
time.sleep(3)
print(">>> Starting JupyterLab...", flush=True)
lab = subprocess.Popen(
P.CMD_LAB,
stdin=subprocess.PIPE,
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
)
try:
print(">>> Waiting for JupyterLab to exit (Ctrl+C)...", flush=True)
lab.wait()
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
except KeyboardInterrupt:
print(
f""">>> {"Watch" if watch else "Run"} canceled by user!""",
flush=True,
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
finally:
print(">>> Stopping watchers...", flush=True)
if watch:
[x.terminate() for x in ext_watchers]
ts.terminate()
lab.terminate()
lab.communicate(b"y\n")
if watch:
ts.wait()
lab.wait()
[x.wait() for x in ext_watchers]
print(
">>> Stopped watchers! maybe check process monitor...",
flush=True,
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
return True
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
return _lab
if not P.TESTING_IN_CI:
def task_watch():
"""watch labextensions for changes, rebuilding"""
return dict(
uptodate=[lambda: False],
file_dep=[*P.OK_SERVEREXT.values(), P.OK_PIP_CHECK],
actions=[
P.CMD_LIST_EXTENSIONS,
PythonInteractiveAction(_make_lab(watch=True)),
],
)
def task_provision():
"""ensure the ipydrawio-export server has been provisioned with npm (ick)"""
return _ok(
dict(
file_dep=[*P.OK_SERVEREXT.values()],
actions=[
["jupyter", "ipydrawio-export", "--version"],
["jupyter", "ipydrawio-export", "provision"],
],
),
P.OK_PROVISION,
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
)
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 task_test():
if not P.TESTING_IN_CI:
yield _ok(
dict(
name="integrity",
file_dep=[
P.SCRIPTS / "integrity.py",
P.OK_LINT,
*[*P.OK_SERVEREXT.values()],
*[*P.PY_WHEEL.values()],
*[*P.PY_SDIST.values()],
],
actions=[
["python", "-m", "pytest", "--pyargs", "scripts.integrity", "-vv"]
],
),
P.OK_INTEGRITY,
)
for pkg, setup in P.PY_SETUP.items():
yield _ok(
dict(
name=f"pytest:{pkg}",
uptodate=[config_changed(dict(PYTEST_ARGS=P.PYTEST_ARGS))],
file_dep=[
*P.PY_SRC[pkg],
P.PY_SETUP_CFG[pkg],
*P.PY_TEST_DEP.get(pkg, []),
P.OK_PROVISION,
P.OK_PIP_CHECK,
],
actions=[PythonInteractiveAction(_pytest(setup))],
),
P.OK_PYTEST[pkg],
)
file_dep = [
*P.ALL_ROBOT,
P.OK_PROVISION,
*sum(P.PY_SRC.values(), []),
2021-01-29 22:12:44 +00:00
*sum(P.JS_TSSRC.values(), []),
P.SCRIPTS / "atest.py",
]
if not P.TESTING_IN_CI:
file_dep += [P.OK_ROBOT_DRYRUN]
yield _ok(
dict(
name="robot",
uptodate=[config_changed(dict(ATEST_ARGS=P.ATEST_ARGS))],
file_dep=file_dep,
actions=[["python", "-m", "scripts.atest"]],
),
P.OK_ATEST,
)
Split up packages (#1) * add drawio * more tweaking of editor load * more work on packaging * linting, remove trace of mxgraph submodule * clean up empty file rendering * add some missing images * don't reinitialize url after every show * some css sugar * belt and suspenders ui theme * some more params * add export * working on logo * more logo work * full in-place round-tripping of svg, png, html * use icons on documents * clean up some untitled files * first pass at schema * start settings integration * more work on settings * fix ref * work on url params * some more tweaks to load behavior * move submodule * clean up some packaging stuff * jlpm * resolve yarn * fix iframe url * bump to newest drawio release * brinf back the stencils * html doesn't really work * add more images * move more things from code into config defaults * rework settings some more * fix new view, still working on click-to-activate * fix capitalization on compressXml * give up on formatting xml * more work on round-trip, styling * linting * more missing images * more config reloading * drawio v13.1.8 * bump drawio files * update notebook * upgrade typescript * more submodule shenanigans, binder env * regenerate again, was missing stencils * try adding server proxy * update path * fix schema * pin node * hoist jupyter_notebook_config.json * some more work on export * more x * add some more demo tools * use apt, some status * apt deps, get back icons * some more apt work * more apt work * better programmatic example * more status work * more docs * add some more text * some more notes * some more status work, notes * add jinja example * more work on notebook * move notebook * add some deps * more deps for pandas, pdf * use local drawio assets * stop servers harder * Create Data-Driven Decks.ipynb * Update drawio_export_demo.py * Create template deck.dio * fix up some chores * some notebook tweaks * more work on demo * try another labextension spot * notebooks * store composite drawio in pdf * use file:// for drawio static * drawio v13.3.5 * remove even more unused code * bump drawio, remove more tornado junk * clean up xml pattern * add notebook, because why not * add ipynb example to decks * add png, svg to composite * add video chat for giggles * drawio v13.3.8 * add plugins * more work on plugin stuff * drawio v13.3.9 * drawio v13.4.7 * resolve yarn.lock * add sourcemaps * drawio v13.4.9 * start patching towards rtc * add plugin path to patches * add a mess of plugins * turn down the plugins * drawio v13.5.3 * re-solve static * get rid of all the high unicode in schema * use utf-8 encoding explicitly * Update package.json * Update _static.ts * drawio v13.5.4 * resolve static * drawio v13.5.8 * move notebooks * start moving things around * add dodo.py * more moving * more moving * more moving and naming * moving * move static * fix up static path * update more ids, locations * skeleton docs * start doing it * start linting in anger * passing eslint * add prebuild * yet more linting * back to ts building * packing * hoist tarball * clean up static generation * apply lint in anger * more work on static * remove videochat for now, more ignoring * tune up ci, binder * use smaller env for now * underspecify python in ci, don't url-encode [p]lugins * gah windows * some win debugging * do some roadmap work * work on roadmap while debugging * do per-platform shell commands * linting, url param * look harder for npm * start thinking about versions * version bumping, more windows work * remove patterns from schema * add all task * more encoding, linting * rebuild static with iife * try another import template * versions in changelog * more work on alernate asset loading * revert menu investigations * paths for windows
2020-08-08 13:45:27 +00:00
# utilities
def _echo_ok(msg):
def _echo():
print(msg, flush=True)
return True
return _echo
def _ok(task, ok):
task.setdefault("targets", []).append(ok)
task["actions"] = [
lambda: [ok.exists() and ok.unlink(), True][-1],
*task["actions"],
lambda: [ok.parent.mkdir(exist_ok=True), ok.write_text("ok"), True][-1],
]
return task