ipydrawio/dodo.py

1078 wiersze
29 KiB
Python

2023-04-09 16:46:27 +00:00
"""automation for ipydrawio.
2021-01-26 04:41:26 +00:00
> 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
"""
2023-04-09 16:46:27 +00:00
# Copyright 2023 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.
2022-11-07 17:20:52 +00:00
import os
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
2023-04-09 16:46:27 +00:00
from collections import defaultdict
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
import doit
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
2023-04-09 16:46:27 +00:00
DOIT_CONFIG = {
"backend": "sqlite3",
"verbosity": 2,
"par_type": "thread",
"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():
2023-04-09 16:46:27 +00:00
"""Do _everything_ (except start long-running servers)."""
return {
"uptodate": [lambda: False],
"task_dep": ["check"],
"file_dep": [
*[P.OK_CONDA_TEST / f"{name}.ok" for name in P.CONDA_PKGS],
*P.OK_PYTEST.values(),
P.DOCS_BUILDINFO,
P.OK_ATEST,
P.OK_INTEGRITY,
P.OK_LINK_CHECK,
P.OK_PROVISION,
P.SHA256SUMS,
],
2023-04-09 16:46:27 +00:00
"actions": [
(P._show, ["nothing left to do"], {"shasums": P.SHA256SUMS.read_text}),
2021-07-06 13:40:08 +00:00
],
2023-04-09 16:46:27 +00:00
}
def task_fetch():
2023-04-09 16:46:27 +00:00
"""Fetch local copies of key configuration documentation."""
for path, url in P.DIA_URLS.items():
yield P.fetch_one(url, path)
def task_dist():
2023-04-09 16:46:27 +00:00
"""Create a minimum viable release product."""
file_dep = [P.SHA256SUMS]
if not P.BUILDING_IN_CI:
file_dep += [P.OK_INTEGRITY, P.OK_LINT]
return {
"uptodate": [lambda: False],
"file_dep": file_dep,
"actions": [lambda: print(P.SHA256SUMS.read_text())],
}
def task_env():
2023-04-09 16:46:27 +00:00
"""Sync environments."""
2021-07-30 21:52:47 +00:00
if P.RTD:
return
for env, inherits in P.ENV_INHERITS.items():
2023-04-09 16:46:27 +00:00
yield {
"name": f"""{env.relative_to(P.ROOT)}:{':'.join([str(inh.relative_to(P.ROOT)) for inh in inherits])}""",
"file_dep": [*inherits, P.YARN_INTEGRITY],
"actions": [(P.patch_one_env, [inh, env]) for inh in inherits]
+ [["jlpm", "prettier", "--list-different", "--write", env]],
2023-04-09 16:46:27 +00:00
"targets": [env],
}
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():
2023-04-09 16:46:27 +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():
2023-04-09 16:46:27 +00:00
"""Clean drawio, as it gets patched in-place."""
if any(x.startswith("-") for x in subs) and P.DRAWIO.exists():
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
shutil.rmtree(P.DRAWIO)
2021-07-06 13:40:08 +00:00
return P._ok(
2023-04-09 16:46:27 +00:00
{
"uptodate": [config_changed({"subs": subs})],
"actions": [
_clean,
["git", "submodule", "update", "--init", "--recursive"],
],
},
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
P.OK_SUBMODULES,
)
def task_setup():
2023-04-09 16:46:27 +00:00
"""Perform general steps to get ready for development, testing, or releasing."""
2022-11-07 17:20:52 +00:00
if not (P.CI and P.YARN_INTEGRITY.exists()):
2023-04-09 16:46:27 +00:00
yield {
"name": "js",
"file_dep": [P.PACKAGE, P.OK_SUBMODULES]
2021-11-12 23:30:56 +00:00
+ ([P.YARN_LOCK] if P.YARN_LOCK.exists() else []),
2023-04-09 16:46:27 +00:00
"actions": [
[*P.JLPM, "--prefer-offline", "--ignore-optional"],
],
2023-04-09 16:46:27 +00:00
"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
2022-11-07 17:20:52 +00:00
if not P.TESTING_IN_CI:
2023-04-09 16:46:27 +00:00
yield {
"name": "js:ipde",
"file_dep": [P.IPDE_DIE2_PACKAGE_JSON, P.YARN_INTEGRITY],
"targets": [P.IPDE_DIE2_YARN_LOCK],
"actions": [
2021-11-27 19:55:31 +00:00
CmdAction(
2023-04-09 16:46:27 +00:00
[*P.JLPM, "--prefer-offline", "--ignore-optional"],
2021-11-27 19:55:31 +00:00
shell=False,
cwd=P.IPDE_DIE2,
),
],
2023-04-09 16:46:27 +00:00
}
2021-11-27 19:55:31 +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
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": f"py:{pkg}",
"file_dep": [dist_af],
"actions": [
[
*P.PIP,
"install",
"-vv",
"--ignore-installed",
"--no-deps",
dist_af,
2023-04-09 16:46:27 +00:00
],
],
2023-04-09 16:46:27 +00:00
},
P.OK_PYSETUP[pkg],
)
else:
extra_deps = P.PY_SETUP_DEPS[pkg_setup.parent]()
actions = [
CmdAction(
[
*P.PIP,
"install",
"-e",
".",
"--no-deps",
"-vv",
],
shell=False,
cwd=pkg_setup.parent,
),
]
if P.PY_HAS_EXT.get(pkg_setup.parent):
actions += [
CmdAction(
[
*P.LAB_EXT,
"develop",
"--debug",
"--overwrite",
".",
],
shell=False,
cwd=pkg_setup.parent,
),
]
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": f"py:{pkg}",
"file_dep": [
pkg_setup,
P.PY_SETUP_CFG[pkg],
*ext_deps,
*extra_deps,
],
"actions": actions,
},
P.OK_PYSETUP[pkg],
)
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"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)'"]
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"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"],
],
2023-04-09 16:46:27 +00:00
},
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
def task_lint():
2023-04-09 16:46:27 +00:00
"""Format all source files."""
if P.TESTING_IN_CI or P.BUILDING_IN_CI:
return
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
2022-11-05 20:39:26 +00:00
rel_py = [p.relative_to(P.ROOT) for p in P.ALL_PY]
2023-04-09 16:46:27 +00:00
black_dep = []
2022-11-05 20:39:26 +00:00
if P.HAS_SSORT:
2023-04-09 16:46:27 +00:00
black_dep += [P.OK_SSORT]
2022-11-05 20:39:26 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "ssort",
"file_dep": [
2022-11-05 20:39:26 +00:00
*P.ALL_PY,
],
2023-04-09 16:46:27 +00:00
"actions": [["ssort", *rel_py]],
},
2022-11-05 20:39:26 +00:00
P.OK_SSORT,
)
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "black",
"file_dep": [*P.ALL_PY, *black_dep],
"actions": [["black", "--quiet", *rel_py]],
},
P.OK_BLACK,
)
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "ruff",
"file_dep": [*P.ALL_PY, P.OK_BLACK],
"actions": [["ruff", *rel_py]],
},
P.OK_RUFF,
)
2021-07-06 13:40:08 +00:00
prettier_args = [
"jlpm",
"--silent",
"prettier",
"--list-different",
"--write",
]
if P.CI:
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "prettier",
"file_dep": [
2021-11-15 13:37:44 +00:00
P.YARN_INTEGRITY,
*[p for p in P.ALL_PRETTIER if P != P.DEMO_CONFIG],
],
2023-04-09 16:46:27 +00:00
"actions": [[*prettier_args, *P.ALL_PRETTIER]],
},
2021-07-06 13:40:08 +00:00
P.OK_PRETTIER,
)
else:
2023-04-09 16:46:27 +00:00
pretty_parents = defaultdict(list)
[pretty_parents[p.parent.relative_to(P.ROOT)].append(p) for p in P.ALL_PRETTIER]
2021-07-06 13:40:08 +00:00
pretty_tasks = []
2023-04-09 16:46:27 +00:00
2021-07-06 13:40:08 +00:00
for path in P.ALL_PRETTIER:
2023-04-09 16:46:27 +00:00
if path.name != "package.json":
continue
pretty_name = f"prettier:package.json:{path.parent.relative_to(P.ROOT)}"
pretty_tasks += [f"lint:{pretty_name}"]
yield {
"name": pretty_name,
"file_dep": [path, P.YARN_INTEGRITY],
"actions": [["jlpm", "prettier-package-json", "--write", path]],
}
for parent, paths in pretty_parents.items():
name = f"prettier:{parent}"
2021-07-06 13:40:08 +00:00
pretty_tasks += [f"lint:{name}"]
2022-11-05 20:39:26 +00:00
2023-04-09 16:46:27 +00:00
yield {
"name": name,
"file_dep": [P.YARN_INTEGRITY, *paths],
"actions": [[*prettier_args, *paths]],
}
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "prettier",
"file_dep": [P.YARN_INTEGRITY, *P.ALL_PRETTIER],
"task_dep": pretty_tasks,
"actions": [["echo", "OK"]],
},
2021-07-06 13:40:08 +00:00
P.OK_PRETTIER,
)
2022-07-30 21:27:54 +00:00
# yield P._ok(
# dict(
# P.YARN_INTEGRITY,
# *P.ALL_TS,
# P.OK_PRETTIER,
# P.ESLINTRC,
# P.TSCONFIGBASE,
# ],
# ),
# P.OK_ESLINT,
dio_tasks = []
2023-04-09 16:46:27 +00:00
yield P._ok(
{
"name": "black:jupyter",
"file_dep": P.EXAMPLE_IPYNB + P.DOCS_IPYNB,
"actions": [
["black", *P.EXAMPLE_IPYNB, *P.DOCS_IPYNB],
["nbqa", "ruff", "--fix", *P.EXAMPLE_IPYNB, *P.DOCS_IPYNB],
],
},
P.OK_BLACK_JUPYTER,
)
yield P._ok(
{
"name": "nqqa:ruff",
"file_dep": P.EXAMPLE_IPYNB + P.DOCS_IPYNB,
"actions": [
["black", *P.EXAMPLE_IPYNB, *P.DOCS_IPYNB],
["nbqa", "ruff", "--fix", *P.EXAMPLE_IPYNB, *P.DOCS_IPYNB],
],
},
P.OK_NBQA_RUFF,
)
for dio_file in P.ALL_DIO + P.EXAMPLE_IPYNB + P.DOCS_IPYNB:
name = f"dio:clean:{dio_file.relative_to(P.ROOT)}"
dio_tasks += [f"lint:{name}"]
2023-04-09 16:46:27 +00:00
yield {
"name": name,
"file_dep": [dio_file, *P.OK_PYSETUP.values()],
"actions": [["jupyter", "ipydrawio", "clean", dio_file]],
}
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "dio:clean",
"file_dep": [*P.ALL_DIO],
"task_dep": dio_tasks,
"actions": [["echo", "ok"]],
},
P.OK_DIOLINT,
)
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "all",
"actions": [P._echo_ok("all ok")],
"file_dep": [
P.OK_BLACK,
2022-07-30 21:27:54 +00:00
# P.OK_ESLINT,
2023-04-09 16:46:27 +00:00
P.OK_RUFF,
P.OK_PRETTIER,
2023-04-09 16:46:27 +00:00
P.OK_BLACK_JUPYTER,
P.OK_NBQA_RUFF,
],
2023-04-09 16:46:27 +00:00
},
P.OK_LINT,
)
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "robot:tidy",
"file_dep": P.ALL_ROBOT,
"actions": [["robotidy", *P.ALL_ROBOT]],
},
P.OK_ROBOTIDY,
)
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "robot:cop",
"file_dep": [*P.ALL_ROBOT, P.OK_ROBOTIDY],
"actions": [["robocop", *P.ALL_ROBOT]],
},
P.OK_ROBOCOP,
)
2021-11-15 13:37:44 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "robot:dryrun",
"file_dep": [*P.ALL_ROBOT, P.OK_ROBOCOP],
"actions": [[*P.PYM, "scripts.atest", "--dryrun"]],
},
2021-11-15 13:37:44 +00:00
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
def task_build():
2023-04-09 16:46:27 +00:00
"""Build intermediates and release artifacts."""
if P.TESTING_IN_CI:
return
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
2023-04-09 16:46:27 +00:00
yield from P.package_json_tasks(
"build",
"build:pre",
P.OK_JS_BUILD_PRE,
2023-04-09 16:46:27 +00:00
file_dep=[P.OK_SUBMODULES],
)
2023-04-09 16:46:27 +00:00
yield from P.package_json_tasks(
"build",
"build",
P.OK_JS_BUILD,
2023-04-09 16:46:27 +00:00
file_dep=[P.OK_JS_BUILD_PRE],
)
2023-04-09 16:46:27 +00:00
yield {
"name": "readme:ipydrawio",
"file_dep": [P.README],
"targets": [P.IPD / "README.md"],
"actions": [
lambda: [
(P.IPD / "README.md").write_text(P.README.read_text(), **P.ENC),
None,
2023-04-09 16:46:27 +00:00
][-1],
],
2023-04-09 16:46:27 +00:00
}
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, (file_dep, targets) in P.JS_PKG_PACK.items():
2023-04-09 16:46:27 +00:00
yield {
"name": f"pack:{pkg}",
"file_dep": [*file_dep, *P.JS_TSBUILDINFO.values()],
"actions": [
CmdAction(
[P.NPM, "pack", "."],
cwd=str(targets[0].parent),
shell=False,
),
2021-01-29 22:12:44 +00:00
],
2023-04-09 16:46:27 +00:00
"targets": targets,
}
pkg_data = P.JS_PKG_DATA[pkg]
2021-01-29 22:12:44 +00:00
if "jupyterlab" not in pkg_data:
continue
out_dir = (
P.JS_PKG_JSON[pkg].parent / pkg_data["jupyterlab"]["outputDir"]
).resolve()
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": f"ext:build:{pkg}",
"actions": [
CmdAction(
[*P.LAB_EXT, "build", "."],
shell=False,
cwd=P.JS_PKG_JSON[pkg].parent,
2023-04-09 16:46:27 +00:00
),
],
2023-04-09 16:46:27 +00:00
"file_dep": targets,
"targets": [out_dir / "package.json"],
},
P.OK_EXT_BUILD[pkg],
)
for py_pkg, py_setup in P.PY_SETUP.items():
ext_deps = [
(
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(
2023-04-09 16:46:27 +00:00
{
*ext_deps,
*P.PY_SRC[py_pkg],
P.OK_SUBMODULES,
py_setup,
py_setup.parent / "MANIFEST.in",
py_setup.parent / "README.md",
py_setup.parent / "LICENSE.txt",
},
)
2021-11-27 19:55:31 +00:00
if py_setup.parent == P.IPDE:
file_dep += [P.IPDE_DIE2_YARN_LOCK]
elif py_setup.parent == P.IPDW:
for src, dest in P.IPDW_DEPS.items():
file_dep += [dest]
2023-04-09 16:46:27 +00:00
yield {
"name": f"copy:{py_pkg}:{src.name}",
"file_dep": [src],
"targets": [dest],
"actions": [(P._copy_one, [src, dest])],
}
yield {
"name": f"sdist:{py_pkg}",
"file_dep": file_dep,
"actions": [
CmdAction(
["python", "setup.py", "sdist"],
shell=False,
cwd=str(py_setup.parent),
),
],
2023-04-09 16:46:27 +00:00
"targets": [P.PY_SDIST[py_pkg]],
}
yield {
"name": f"whl:{py_pkg}",
"file_dep": file_dep,
"actions": [
CmdAction(
["python", "setup.py", "bdist_wheel"],
shell=False,
cwd=str(py_setup.parent),
),
],
2023-04-09 16:46:27 +00:00
"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, **P.ENC)
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
2023-04-09 16:46:27 +00:00
yield {
"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
def task_conda_build():
2023-04-09 16:46:27 +00:00
"""Test building with conda-build."""
yield {
"name": "build",
"file_dep": [
2021-04-12 11:55:08 +00:00
P.RECIPE,
P.CONDARC,
2021-04-12 11:55:08 +00:00
*[P.DIST / p.name for p in P.PY_SDIST.values()],
],
2023-04-09 16:46:27 +00:00
"actions": [
2021-04-12 11:55:08 +00:00
[
*P.CONDA_BUILD_ARGS,
2021-04-12 11:55:08 +00:00
"--no-test",
"--output-folder",
P.CONDA_BLD,
P.RECIPE.parent,
2023-04-09 16:46:27 +00:00
],
2021-04-12 11:55:08 +00:00
],
2023-04-09 16:46:27 +00:00
"targets": [*P.CONDA_PKGS.values()],
}
2021-04-12 11:55:08 +00:00
def task_conda_test():
2021-04-12 17:47:32 +00:00
for name, pkg in P.CONDA_PKGS.items():
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": f"test:{name}",
"file_dep": [pkg],
"actions": [[*P.CONDA_BUILD_ARGS, "--test", pkg]],
},
2021-04-12 17:47:32 +00:00
P.OK_CONDA_TEST / f"{name}.ok",
)
2021-04-12 11:55:08 +00:00
def task_serve():
2023-04-09 16:46:27 +00:00
"""Run processes "normally" (not watching sources)."""
if P.TESTING_IN_CI:
return
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:
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()
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()
2023-04-09 16:46:27 +00:00
yield {
"name": "lab",
"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
2023-04-09 16:46:27 +00:00
yield {
"name": "demo",
"uptodate": [lambda: False],
"file_dep": [P.DEMO_ARCHIVE],
"actions": [(P._lite, [["doit"], ["--", "-s", "serve"]])],
}
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)
2023-04-09 16:46:27 +00:00
ts = subprocess.Popen(["jlpm", "run", "watch"], cwd=P.JS_META)
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
def task_watch():
2023-04-09 16:46:27 +00:00
"""Watch things."""
if P.TESTING_IN_CI:
return
2023-04-09 16:46:27 +00:00
yield {
"name": "lab",
"doc": "watch labextensions for changes, rebuilding",
"uptodate": [lambda: False],
"file_dep": [*P.OK_SERVEREXT.values(), P.OK_PIP_CHECK],
"actions": [
P.CMD_LIST_EXTENSIONS,
PythonInteractiveAction(_make_lab(watch=True)),
],
2023-04-09 16:46:27 +00:00
}
2023-04-09 16:46:27 +00:00
yield {
"name": "docs",
"doc": "watch docs for changes, rebuilding",
"uptodate": [lambda: False],
"file_dep": [P.DOCS_BUILDINFO, P.OK_PIP_CHECK],
"actions": [["sphinx-autobuild", *P.SPHINX_ARGS, "-j8", P.DOCS, P.DOCS_BUILD]],
}
2021-07-06 13:40:08 +00:00
def task_demo():
2021-11-27 19:55:31 +00:00
demo_dest = [*P.DEMO.glob("*.json")]
demo_tasks = []
final_dest = []
2023-04-09 16:46:27 +00:00
yield {
"name": "pyodide:packages",
"doc": "fetch the pyodide packages.json",
2023-04-12 15:28:54 +00:00
"uptodate": [config_changed(P.PYODIDE_URL)],
2023-04-09 16:46:27 +00:00
"targets": [P.PYODIDE_PACKAGES],
"actions": [P.fetch_pyodide_packages],
}
2021-11-27 19:55:31 +00:00
demo_tasks += ["demo:wheels"]
2023-04-09 16:46:27 +00:00
yield {
"name": "wheels",
"doc": "fetch wheels",
"file_dep": [P.PYODIDE_PACKAGES, P.DEMO_REQS],
"actions": [P.fetch_wheels],
}
yield {
"name": "extensions",
"doc": "update jupyter_lite_config.json from the conda env",
"file_dep": [P.ENV_BINDER, *P.PY_WHEEL.values()],
"targets": [P.DEMO_CONFIG],
"actions": [
2021-07-30 21:52:47 +00:00
(
P._sync_lite_config,
[
P.ENV_BINDER,
P.DEMO_CONFIG,
P.FED_EXT_MARKER,
[P.PY_WHEEL[P.IPD.name]],
2023-04-09 16:46:27 +00:00
[P.PY_WHEEL[P.IPDW.name]],
2021-07-30 21:52:47 +00:00
],
2023-04-09 16:46:27 +00:00
),
2021-07-30 21:52:47 +00:00
],
2023-04-09 16:46:27 +00:00
}
2021-07-30 21:52:47 +00:00
for src, dest in P.ALL_DEMO_CONTENTS.items():
name = f"stage:{src.name}"
2021-07-06 13:40:08 +00:00
demo_dest += [dest]
demo_tasks += [f"demo:{name}"]
final_dest += [P.DEMO_BUILD / f"files/{src.name}"]
2023-04-09 16:46:27 +00:00
yield {
"name": name,
"file_dep": [src],
"targets": [dest],
"actions": [(P._copy_one, [src, dest])],
}
2021-07-24 16:36:07 +00:00
assert demo_dest
assert final_dest
assert demo_tasks
2021-07-06 13:40:08 +00:00
2023-04-09 16:46:27 +00:00
yield {
"name": "archive",
"task_dep": demo_tasks,
"file_dep": [*demo_dest, *P.DEMO_WHEELS.glob(f"*{P.NOARCH_WHL}")],
"targets": [P.DEMO_ARCHIVE, P.DEMO_HASHES, *final_dest, P.DEMO_CONTENTS_API],
"actions": [(P._lite, [["build", "archive"], []])],
}
2021-07-06 13:40:08 +00:00
def task_docs():
2023-04-09 16:46:27 +00:00
"""Build the docs."""
if P.TESTING_IN_CI:
return
if shutil.which("convert"):
2023-04-09 16:46:27 +00:00
yield {
"name": "favicon",
"doc": "regenerate the favicon",
"file_dep": [P.DOCS_FAVICON_SVG],
"actions": [
[
"convert",
"-density",
"256x256",
"-background",
"transparent",
P.DOCS_FAVICON_SVG,
"-define",
"icon:auto-resize",
"-colors",
"256",
P.DOCS_FAVICON_ICO,
2023-04-09 16:46:27 +00:00
],
],
2023-04-09 16:46:27 +00:00
"targets": [P.DOCS_FAVICON_ICO],
}
yield {
"name": "typedoc:ensure",
"file_dep": [*P.JS_PKG_JSON.values()],
"actions": [P.typedoc_conf],
"targets": [P.TYPEDOC_JSON, P.TSCONFIG_TYPEDOC],
}
yield {
"name": "typedoc:build",
"doc": "build the TS API documentation with typedoc",
"file_dep": [*P.JS_TSBUILDINFO.values(), *P.TYPEDOC_CONF, P.YARN_INTEGRITY],
"actions": [["jlpm", "typedoc", "--options", P.TYPEDOC_JSON]],
"targets": [P.DOCS_RAW_TYPEDOC_README],
}
yield {
"name": "typedoc:mystify",
"doc": "transform raw typedoc into myst markdown",
"file_dep": [P.DOCS_RAW_TYPEDOC_README],
"targets": [P.DOCS_TS_MYST_INDEX, *P.DOCS_TS_MODULES],
"actions": [
P.mystify,
[
"jlpm",
"prettier",
"--list-different",
"--write",
P.DOCS_TS_MYST_INDEX.parent,
],
],
2023-04-09 16:46:27 +00:00
}
2021-07-06 13:40:08 +00:00
sphinx_deps = [
2023-04-09 16:46:27 +00:00
*P.ALL_DOCS_STATIC,
*P.DOCS_SRC,
P.DEMO_ARCHIVE,
P.DEMO_HASHES,
2021-07-06 13:40:08 +00:00
P.DOCS_CONF,
P.DOCS_FAVICON_ICO,
P.OK_PIP_CHECK,
]
sphinx_task_deps = []
2023-04-09 16:46:27 +00:00
yield {
"name": "sphinx",
"doc": "build the documentation site with sphinx",
"file_dep": sphinx_deps,
"task_dep": sphinx_task_deps,
"actions": [
["sphinx-build", *P.SPHINX_ARGS, "-b", "html", P.DOCS, P.DOCS_BUILD],
],
2023-04-09 16:46:27 +00:00
"targets": [P.DOCS_BUILDINFO],
}
@doit.create_after("docs")
def task_check():
2023-04-09 16:46:27 +00:00
"""Check built artifacts."""
file_dep = [*P.DOCS_BUILD.rglob("*.html")]
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "links",
2023-04-12 15:28:54 +00:00
"uptodate": [config_changed({"args": P.PYTEST_CHECK_LINKS_ARGS})],
2023-04-09 16:46:27 +00:00
"file_dep": [*file_dep, P.DOCS_BUILDINFO],
"actions": [
[
"pytest-check-links",
"--check-anchors",
2023-04-12 15:28:54 +00:00
*P.PYTEST_CHECK_LINKS_ARGS,
2021-07-06 13:40:08 +00:00
*[p for p in file_dep if p.name not in ["schema.html"]],
2023-04-09 16:46:27 +00:00
],
],
2023-04-09 16:46:27 +00:00
},
P.OK_LINK_CHECK,
)
def task_provision():
2023-04-09 16:46:27 +00:00
"""Ensure the ipydrawio-export server has been provisioned with npm (ick)."""
2021-07-06 13:40:08 +00:00
return P._ok(
2023-04-09 16:46:27 +00:00
{
"file_dep": [*P.OK_SERVEREXT.values()],
"actions": [
["jupyter", "ipydrawio-export", "--version"],
["jupyter", "ipydrawio-export", "provision"],
],
2023-04-09 16:46:27 +00:00
},
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
)
2023-04-10 14:09:29 +00:00
def _pytest(setup_py, pytest_args):
2022-11-07 17:20:52 +00:00
return CmdAction(
[
*P.PYM,
"pytest",
*P.PYTEST_ARGS,
*pytest_args,
],
shell=False,
cwd=str(setup_py.parent),
env=dict(
COVERAGE_PROCESS_START="1",
**os.environ,
),
)
def task_test():
2023-04-09 16:46:27 +00:00
"""Run tests."""
if not P.TESTING_IN_CI:
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "integrity",
"file_dep": [
*P.OK_SERVEREXT.values(),
*P.PY_SDIST.values(),
*P.PY_WHEEL.values(),
*P.IPDW_DEPS.values(),
2022-01-08 19:09:28 +00:00
*P.ALL_SETUP_CFG,
P.DEMO_CONFIG,
P.ENV_BINDER,
P.OK_LINT,
P.RECIPE,
P.SCRIPTS / "integrity.py",
],
2023-04-09 16:46:27 +00:00
"actions": [
2023-04-10 14:09:29 +00:00
[
*P.PYM,
"pytest",
"--pyargs",
"scripts.integrity",
"-vv",
*("-o", f"""cache_dir={P.CACHE / ".pytest.integrity"}"""),
],
],
2023-04-09 16:46:27 +00:00
},
P.OK_INTEGRITY,
)
for pkg, setup in P.PY_SETUP.items():
2023-04-10 14:09:29 +00:00
report_dir = P.REPORTS / "pytest" / pkg
html = report_dir / "pytest.html"
cov_index = report_dir / "htmlcov" / "index.html"
cache_dir = P.CACHE / f".pytest.{pkg}"
2021-11-27 19:55:31 +00:00
pytest_args = [
2022-11-07 17:20:52 +00:00
"-vv",
"--tb=long",
2023-04-10 14:09:29 +00:00
*("-o", f"cache_dir={cache_dir}"),
# subs
"--script-launch-mode=subprocess",
# report
2021-11-27 19:55:31 +00:00
f"--html={html}",
"--self-contained-html",
2023-04-10 14:09:29 +00:00
# cov
"--cov-context=test",
f"""--cov={pkg.replace("-", "_")}""",
f"--cov-report=html:{cov_index.parent}",
"--cov-branch",
2021-11-27 19:55:31 +00:00
]
if pkg == P.IPD.name:
pytest_args += ["-n", "auto"]
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": f"pytest:{pkg}",
"uptodate": [config_changed({"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,
],
2023-04-09 16:46:27 +00:00
"actions": [
2022-11-07 17:20:52 +00:00
(P.delete_some, [html]),
2023-04-10 14:09:29 +00:00
_pytest(setup, pytest_args),
2021-11-27 19:55:31 +00:00
],
2023-04-10 14:09:29 +00:00
"targets": [html, cov_index],
2023-04-09 16:46:27 +00:00
},
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:
2021-07-24 16:36:07 +00:00
file_dep += [
2021-11-15 13:37:44 +00:00
P.OK_ROBOT_DRYRUN,
2021-07-24 16:36:07 +00:00
P.DEMO_HASHES,
*P.OK_SERVEREXT.values(),
]
demo_files = [P.DEMO_FILES / p.name for p in P.ALL_DEMO_CONTENTS]
for tmpl in P.ATEST_TEMPLATES:
dest = tmpl.parent / tmpl.name.replace(".j2", "")
2023-04-09 16:46:27 +00:00
yield {
"name": f"template:{tmpl.relative_to(P.ATEST)}",
"file_dep": [tmpl, *demo_files],
"targets": [dest],
"actions": [
(P.template_one, [tmpl, dest]),
2022-05-09 13:44:30 +00:00
["robotidy", dest],
],
2023-04-09 16:46:27 +00:00
}
2021-07-06 13:40:08 +00:00
yield P._ok(
2023-04-09 16:46:27 +00:00
{
"name": "robot",
"uptodate": [
2022-11-05 20:39:26 +00:00
config_changed(
2023-04-09 16:46:27 +00:00
{"ATEST_ARGS": P.ATEST_ARGS, "ATEST_ATTEMPT": P.ATEST_ATTEMPT},
),
2022-11-05 20:39:26 +00:00
],
2023-04-09 16:46:27 +00:00
"file_dep": file_dep,
"actions": [["python", "-m", "scripts.atest"]],
},
P.OK_ATEST,
)