From c893b3e98e5ac96b078358a6db4912b24166ee2e Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 31 Aug 2023 17:01:09 -0500 Subject: [PATCH] binder --- .binder/environment.yml | 41 +++++--------------- .binder/jupyter_config.json | 5 --- .binder/overrides.json | 3 -- .binder/postBuild | 15 ++++++-- dodo.py | 74 ------------------------------------- 5 files changed, 21 insertions(+), 117 deletions(-) delete mode 100644 .binder/jupyter_config.json diff --git a/.binder/environment.yml b/.binder/environment.yml index d1d75e6e..230688e8 100644 --- a/.binder/environment.yml +++ b/.binder/environment.yml @@ -1,36 +1,13 @@ -name: jupyterlab-fonts-dev - channels: - conda-forge - + - nodefaults dependencies: - # run - - jupyterlab >=3.4.8,<4 - - python >=3.7,<3.11 - # build - - brotlipy - - doit-with-toml - - fonttools - - nodejs >=18,<19 - - pip - - twine - - wheel - # qa - - black - - flake8 - - isort - # - ssort # only works on py3.8+ - # utest - - pytest-cov - - pytest-html - # atest - - firefox =102 - - geckodriver - - robotframework >=6 - - robotframework-jupyterlibrary >=0.4.1 - - robotframework-pabot - - robotframework-robocop >=2.6.0 - - robotframework-tidy >=3.3.1 - # demo toys + - conda <22.11.1 + - conda-lock >=2.1.2,<2.2 + - doitoml-with-all + - jupyter-collaboration + - jupyterlab >=4,<5 - jupyterlab-link-share - - ipywidgets + - mamba + - python ==3.11.* + - python-dotenv diff --git a/.binder/jupyter_config.json b/.binder/jupyter_config.json deleted file mode 100644 index 8b40b06f..00000000 --- a/.binder/jupyter_config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "LabApp": { - "collaborative": true - } -} diff --git a/.binder/overrides.json b/.binder/overrides.json index 4593f1b6..e1191042 100644 --- a/.binder/overrides.json +++ b/.binder/overrides.json @@ -1,8 +1,5 @@ { "@jupyterlab/apputils-extension:palette": { "modal": false - }, - "@jupyterlab/extensionmanager-extension:plugin": { - "enabled": false } } diff --git a/.binder/postBuild b/.binder/postBuild index a8e39303..19a6e1c0 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -2,8 +2,17 @@ set -eux source activate $NB_PYTHON_PREFIX -doit binder +doit dt:dist:flit + +python -m pip install \ + -vv \ + --find-links=dist \ + --no-index-url \ + --no-deps \ + jupyterlab-fonts -mkdir -p ~/.jupyter -cp .binder/jupyter_config.json ~/.jupyter/ cp .binder/overrides.json $NB_PYTHON_PREFIX/share/jupyter/lab/settings + +jupyter labextension disable @jupyterlab/extensionmanager-extension:plugin +jupyter labextension disable @jupyterlab/apputils-extension:announcements +jupyter labextension disable offlinenotebook diff --git a/dodo.py b/dodo.py index 646baefb..2a40ea9f 100644 --- a/dodo.py +++ b/dodo.py @@ -377,77 +377,3 @@ class P: # actions=[[*C.JPY, "labextension", "list"]], # ) # yield dict(name="all", task_dep=["binder:labextensions"], actions=[["echo", "ok"]]) - - -# def task_test(): -# file_dep = [*P.ALL_ROBOT] -# task_dep = [] - -# if not C.CI: -# file_dep += [ -# B.LABEXT / pkg_data["name"] / "package.json" -# for pkg_json, pkg_data in D.PKG_JSON_DATA.items() -# if pkg_json != P.META_PKG_JSON -# ] -# task_dep += ["setup"] - -# targets = [B.ATEST_OUT / "log.html"] -# actions = [ -# (doit.tools.create_folder, [B.ATEST_OUT]), -# doit.action.CmdAction( -# [ -# "pabot", -# *C.PABOT_DEFAULTS, -# *(["--name", "🇦"]), -# *(["--variable", f"ATTEMPT:{1}"]), -# *(["--variable", f"OS:{C.PLATFORM}"]), -# *(["--variable", f"PY:{C.PY_VERSION}"]), -# *(["--variable", f"ROBOCOV:{B.ROBOCOV}"]), -# *(["--variable", f"ROOT:{P.ROOT}"]), -# *C.ATEST_ARGS, -# P.ATEST, -# ], -# shell=False, -# cwd=B.ATEST_OUT, -# ), -# ] - -# if C.WITH_JS_COV: -# targets += [B.REPORTS_NYC_LCOV] -# actions = [ -# (U.clean_some, [B.ROBOCOV, B.REPORTS_NYC]), -# (doit.tools.create_folder, [B.ROBOCOV]), -# *actions, -# [*C.NYC, f"--report-dir={B.REPORTS_NYC}", f"--temp-dir={B.ROBOCOV}"], -# ] - -# yield dict( -# name="robot", -# actions=actions, -# targets=targets, -# file_dep=file_dep, -# task_dep=task_dep, -# ) - -# yield dict( -# name="pytest", -# task_dep=[] if C.TESTING_IN_CI else ["setup:ext"], -# file_dep=[*P.ALL_PY_SRC], -# actions=[ -# [ -# "pytest", -# "--pyargs", -# P.PY_SRC.name, -# f"--cov={P.PY_SRC.name}", -# "--cov-branch", -# "--no-cov-on-fail", -# "--cov-fail-under=100", -# "--cov-report=term-missing:skip-covered", -# f"--cov-report=html:{B.HTMLCOV_HTML.parent}", -# f"--html={B.PYTEST_HTML}", -# "--self-contained-html", -# f"--cov-report=xml:{B.PYTEST_COV_XML}", -# ] -# ], -# targets=[B.PYTEST_HTML, B.HTMLCOV_HTML, B.PYTEST_COV_XML], -# )