kopia lustrzana https://github.com/deathbeds/ipydrawio
rodzic
0a80d241cb
commit
a23e305860
|
@ -22,7 +22,6 @@ channels:
|
||||||
dependencies:
|
dependencies:
|
||||||
- python >=3.9
|
- python >=3.9
|
||||||
# demo toys
|
# demo toys
|
||||||
- bqplot
|
|
||||||
- graphviz2drawio
|
- graphviz2drawio
|
||||||
- jupyter-lsp-python-lsp-server
|
- jupyter-lsp-python-lsp-server
|
||||||
- jupyterlab-link-share
|
- jupyterlab-link-share
|
||||||
|
@ -37,11 +36,16 @@ dependencies:
|
||||||
- segno
|
- segno
|
||||||
- shapely
|
- shapely
|
||||||
- tabulate
|
- tabulate
|
||||||
|
- sphinx-autobuild
|
||||||
|
### FEDERATED EXTENSIONS ###
|
||||||
|
- bqplot
|
||||||
|
- jupyterlab_widgets
|
||||||
|
- jupyterlab-tour
|
||||||
- wxyz_datagrid
|
- wxyz_datagrid
|
||||||
- wxyz_json_schema_form
|
- wxyz_json_schema_form
|
||||||
- wxyz_lab
|
- wxyz_lab
|
||||||
- wxyz_svg
|
- wxyz_svg
|
||||||
- sphinx-autobuild
|
### FEDERATED EXTENSIONS ###
|
||||||
############################################################################
|
############################################################################
|
||||||
### ipydrawio-docs-deps ###
|
### ipydrawio-docs-deps ###
|
||||||
|
|
||||||
|
@ -51,8 +55,6 @@ dependencies:
|
||||||
- sphinx
|
- sphinx
|
||||||
- sphinx-jsonschema
|
- sphinx-jsonschema
|
||||||
- sphinxext-rediraffe
|
- sphinxext-rediraffe
|
||||||
# for lite
|
|
||||||
- jupyterlab-tour
|
|
||||||
# TODO: resolve upstream
|
# TODO: resolve upstream
|
||||||
- sqlalchemy <1.4
|
- sqlalchemy <1.4
|
||||||
- pip:
|
- pip:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
_output
|
_output
|
||||||
|
.cache/
|
||||||
.coverage*
|
.coverage*
|
||||||
.eslintcache
|
.eslintcache
|
||||||
.ipynb_checkpoints
|
.ipynb_checkpoints
|
||||||
|
|
|
@ -1,14 +1,7 @@
|
||||||
{
|
{
|
||||||
"jupyter-config-data": {
|
"jupyter-config-data": {
|
||||||
"appName": "IPyDrawioLite",
|
"appName": "IPyDrawioLite",
|
||||||
"disabledExtensions": [
|
"collaborative": true,
|
||||||
"@deathbeds/ipydrawio-pdf",
|
|
||||||
"@jupyterlab-classic/lab-extension",
|
|
||||||
"@jupyterlab/server-proxy",
|
|
||||||
"@krassowski/jupyterlab-lsp",
|
|
||||||
"jupyterlab-server-proxy",
|
|
||||||
"nbdime-jupyterlab"
|
|
||||||
],
|
|
||||||
"faviconUrl": "./favicon.ico"
|
"faviconUrl": "./favicon.ico"
|
||||||
},
|
},
|
||||||
"jupyter-lite-schema-version": 0
|
"jupyter-lite-schema-version": 0
|
||||||
|
|
|
@ -2,9 +2,20 @@
|
||||||
"LiteBuildConfig": {
|
"LiteBuildConfig": {
|
||||||
"apps": ["lab"],
|
"apps": ["lab"],
|
||||||
"contents": ["."],
|
"contents": ["."],
|
||||||
|
"federated_extensions": [
|
||||||
|
"../py_packages/ipydrawio/dist/ipydrawio-1.1.1-py3-none-any.whl",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/bqplot-0.12.30-pyhd8ed1ab_0.tar.bz2/bqplot-0.12.30-pyhd8ed1ab_0.tar.bz2",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/jupyterlab-tour-3.1.2-pyhd8ed1ab_0.tar.bz2/jupyterlab-tour-3.1.2-pyhd8ed1ab_0.tar.bz2",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/jupyterlab_widgets-1.0.0-pyhd8ed1ab_1.tar.bz2/jupyterlab_widgets-1.0.0-pyhd8ed1ab_1.tar.bz2",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/wxyz_datagrid-0.5.1-pyhd8ed1ab_0.tar.bz2/wxyz_datagrid-0.5.1-pyhd8ed1ab_0.tar.bz2",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/wxyz_json_schema_form-0.5.1-pyhd8ed1ab_0.tar.bz2/wxyz_json_schema_form-0.5.1-pyhd8ed1ab_0.tar.bz2",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/wxyz_lab-0.5.1-pyhd8ed1ab_0.tar.bz2/wxyz_lab-0.5.1-pyhd8ed1ab_0.tar.bz2",
|
||||||
|
"https://github.com/conda-forge/releases/releases/download/noarch/wxyz_svg-0.5.1-pyhd8ed1ab_0.tar.bz2/wxyz_svg-0.5.1-pyhd8ed1ab_0.tar.bz2"
|
||||||
|
],
|
||||||
"ignore_contents": [
|
"ignore_contents": [
|
||||||
"(lab/|_output|.gitignore|doit.db|\\.json$|jupyter_config|log$|\\.cache)"
|
"(lab/|_output|.gitignore|doit.db|\\.json$|jupyter_config|log$|\\.cache)"
|
||||||
],
|
],
|
||||||
|
"ignore_sys_prefix": true,
|
||||||
"lite_dir": ".",
|
"lite_dir": ".",
|
||||||
"output_archive": "../build/demo/ipydrawio-lite-1.1.1.tgz",
|
"output_archive": "../build/demo/ipydrawio-lite-1.1.1.tgz",
|
||||||
"output_dir": "../build/demo"
|
"output_dir": "../build/demo"
|
||||||
|
|
|
@ -6,10 +6,16 @@
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
data-placement="right"
|
data-placement="right"
|
||||||
title="Try IPyDrawio in your browser. Right now."
|
title="Try IPyDrawio in your browser. Right now."
|
||||||
|
id="demo-room-button"
|
||||||
>
|
>
|
||||||
<i class="fas fa-lightbulb"></i>
|
<i class="fas fa-lightbulb"></i>
|
||||||
Try <strong>IPyDrawio</strong> Now
|
Try <strong>IPyDrawio</strong> Now <span id="demo-room-label"></span>
|
||||||
</a>
|
</a>
|
||||||
|
<details>
|
||||||
|
<summary><i class="fas fa-users"></i>Collaboration...</summary>
|
||||||
|
<input type="text" placeholder="room name" id="demo-room-name"></input><br/>
|
||||||
|
<em>everyone who uses this room name will be able to edit all files</em>
|
||||||
|
</details>
|
||||||
<br/>
|
<br/>
|
||||||
or <a
|
or <a
|
||||||
href="{{ pathto(demo_tarball, True) }}"
|
href="{{ pathto(demo_tarball, True) }}"
|
||||||
|
@ -22,5 +28,15 @@
|
||||||
</a>
|
</a>
|
||||||
<hr/>
|
<hr/>
|
||||||
<em>Powered by <a href="https://jupyterlite.rtfd.io" target="_blank">JupyterLite</a></em>
|
<em>Powered by <a href="https://jupyterlite.rtfd.io" target="_blank">JupyterLite</a></em>
|
||||||
<script>$(function() {$('[data-toggle="tooltip"]').tooltip();});</script>
|
<script>$(function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
$("#demo-room-name").on('input', () => {
|
||||||
|
const room = $("#demo-room-name").val().trim();
|
||||||
|
$("#demo-room-button").attr(
|
||||||
|
"href",
|
||||||
|
`{{ pathto('demo/index') }}` + (room ? `?room=${room}` : '')
|
||||||
|
);
|
||||||
|
$("#demo-room-label").text(room ? ` with ${room}` : '');
|
||||||
|
});
|
||||||
|
});</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,8 +29,6 @@ dependencies:
|
||||||
- sphinx
|
- sphinx
|
||||||
- sphinx-jsonschema
|
- sphinx-jsonschema
|
||||||
- sphinxext-rediraffe
|
- sphinxext-rediraffe
|
||||||
# for lite
|
|
||||||
- jupyterlab-tour
|
|
||||||
# TODO: resolve upstream
|
# TODO: resolve upstream
|
||||||
- sqlalchemy <1.4
|
- sqlalchemy <1.4
|
||||||
- pip:
|
- pip:
|
||||||
|
|
21
dodo.py
21
dodo.py
|
@ -86,6 +86,9 @@ def task_dist():
|
||||||
|
|
||||||
def task_env():
|
def task_env():
|
||||||
"""sync environments"""
|
"""sync environments"""
|
||||||
|
if P.RTD:
|
||||||
|
return
|
||||||
|
|
||||||
for env, inherits in P.ENV_INHERITS.items():
|
for env, inherits in P.ENV_INHERITS.items():
|
||||||
yield dict(
|
yield dict(
|
||||||
name=f"""{env.parent.name}:{':'.join([inh.parent.name for inh in inherits])}""",
|
name=f"""{env.parent.name}:{':'.join([inh.parent.name for inh in inherits])}""",
|
||||||
|
@ -677,6 +680,24 @@ def task_demo():
|
||||||
print("jupyterlite not found, this might be okay", flush=True)
|
print("jupyterlite not found, this might be okay", flush=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
yield dict(
|
||||||
|
name="extensions",
|
||||||
|
doc="update jupyter-lite.json from the conda env",
|
||||||
|
file_dep=[P.ENV_BINDER, P.PY_WHEEL[P.IPD.name]],
|
||||||
|
targets=[P.DEMO_CONFIG],
|
||||||
|
actions=[
|
||||||
|
(
|
||||||
|
P._sync_lite_config,
|
||||||
|
[
|
||||||
|
P.ENV_BINDER,
|
||||||
|
P.DEMO_CONFIG,
|
||||||
|
P.FED_EXT_MARKER,
|
||||||
|
[P.PY_WHEEL[P.IPD.name]],
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
demo_dest = []
|
demo_dest = []
|
||||||
demo_tasks = []
|
demo_tasks = []
|
||||||
final_dest = []
|
final_dest = []
|
||||||
|
|
|
@ -91,6 +91,8 @@ BUILDING_IN_CI = bool(json.loads(os.environ.get("BUILDING_IN_CI", "0")))
|
||||||
TESTING_IN_CI = bool(json.loads(os.environ.get("TESTING_IN_CI", "0")))
|
TESTING_IN_CI = bool(json.loads(os.environ.get("TESTING_IN_CI", "0")))
|
||||||
CI_ARTIFACT = os.environ.get("CI_ARTIFACT", "wheel")
|
CI_ARTIFACT = os.environ.get("CI_ARTIFACT", "wheel")
|
||||||
CI = bool(json.loads(os.environ.get("CI", "0")))
|
CI = bool(json.loads(os.environ.get("CI", "0")))
|
||||||
|
RTD = os.environ.get("READTHEDOCS", "build")
|
||||||
|
|
||||||
|
|
||||||
# test arg pass-throughs
|
# test arg pass-throughs
|
||||||
ATEST_ARGS = json.loads(os.environ.get("ATEST_ARGS", "[]"))
|
ATEST_ARGS = json.loads(os.environ.get("ATEST_ARGS", "[]"))
|
||||||
|
@ -331,6 +333,9 @@ SERVER_EXT = {
|
||||||
}
|
}
|
||||||
|
|
||||||
# demo
|
# demo
|
||||||
|
RE_CONDA_FORGE_URL = r"/conda-forge/(.*/)?(noarch|linux-64|win-64|osx-64)/([^/]+)$"
|
||||||
|
CONDA_FORGE_RELEASE = "https://github.com/conda-forge/releases/releases/download"
|
||||||
|
FED_EXT_MARKER = "### FEDERATED EXTENSIONS ###"
|
||||||
DEMO = ROOT / "demo"
|
DEMO = ROOT / "demo"
|
||||||
DEMO_CONFIG = DEMO / "jupyter_lite_config.json"
|
DEMO_CONFIG = DEMO / "jupyter_lite_config.json"
|
||||||
DEMO_APPS = ["lab"]
|
DEMO_APPS = ["lab"]
|
||||||
|
@ -806,6 +811,35 @@ def _build_lite():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def _sync_lite_config(from_env, to_json, marker, extras):
|
||||||
|
"""use conda list to derive tarball names"""
|
||||||
|
raw_lock = subprocess.check_output(["conda", "list", "--explicit"])
|
||||||
|
ext_packages = [
|
||||||
|
p.strip().split(" ")[0]
|
||||||
|
for p in from_env.read_text(encoding="utf-8").split(marker)[1].split(" - ")
|
||||||
|
if p.strip()
|
||||||
|
]
|
||||||
|
|
||||||
|
tarball_urls = ["../" + str(extra.relative_to(ROOT).as_posix()) for extra in extras]
|
||||||
|
for raw_url in sorted(raw_lock.decode("utf-8").splitlines()):
|
||||||
|
try:
|
||||||
|
label, subdir, pkg = re.findall(RE_CONDA_FORGE_URL, raw_url)[0]
|
||||||
|
except IndexError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if label:
|
||||||
|
# TODO: haven't looked into this
|
||||||
|
continue
|
||||||
|
|
||||||
|
for ext in ext_packages:
|
||||||
|
if pkg.startswith(ext):
|
||||||
|
tarball_urls += ["/".join([CONDA_FORGE_RELEASE, subdir, pkg, pkg])]
|
||||||
|
|
||||||
|
config = json.loads(to_json.read_text(encoding="utf-8"))
|
||||||
|
config["LiteBuildConfig"]["federated_extensions"] = sorted(tarball_urls)
|
||||||
|
to_json.write_text(json.dumps(config, indent=2, sort_keys=True))
|
||||||
|
|
||||||
|
|
||||||
# Late environment hacks
|
# Late environment hacks
|
||||||
os.environ.update(
|
os.environ.update(
|
||||||
CONDARC=str(CONDARC),
|
CONDARC=str(CONDARC),
|
||||||
|
|
Ładowanie…
Reference in New Issue