From 859876376197a69f401898ee136e561f478554f4 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 20:05:30 +0100 Subject: [PATCH 01/12] add trial --- Trial.ipynb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Trial.ipynb diff --git a/Trial.ipynb b/Trial.ipynb new file mode 100644 index 0000000..0a70078 --- /dev/null +++ b/Trial.ipynb @@ -0,0 +1,19 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "488b0a0f", + "metadata": {}, + "source": [ + "This is an experiment that maybe needed" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 3094d3de9c5ec162114e5b453987ec04ffc3ca29 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 20:18:57 +0100 Subject: [PATCH 02/12] prune postbuild --- .binder/postBuild | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.binder/postBuild b/.binder/postBuild index acd468f..79ba364 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -1,15 +1,10 @@ #!/bin/bash set -euo pipefail - -echo "[postBuild] Editable install of local package" +echo "[postBuild] Editable install" pip install -e . - -echo "[postBuild] Warm up matplotlib font cache" +echo "[postBuild] Warm up matplotlib" python - <<'PY' -import matplotlib.pyplot as plt # triggers font cache build -print("Matplotlib imported; font cache built.") +import matplotlib.pyplot as plt +print("Matplotlib ready") PY - -echo "[postBuild] Warm up JupyterLab (pre-build static if needed)" -jupyter lab build --minimize=False >/dev/null 2>&1 || true echo "[postBuild] Done" \ No newline at end of file From 92ef3df2016900c0b6d57f74ade5ef57eb75e445 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 20:30:20 +0100 Subject: [PATCH 03/12] compress --- .binder/postBuild | 26 ++++++++++++++++++++++---- .binder/start | 13 +++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100755 .binder/start diff --git a/.binder/postBuild b/.binder/postBuild index 79ba364..819114c 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -1,10 +1,28 @@ #!/bin/bash set -euo pipefail -echo "[postBuild] Editable install" -pip install -e . -echo "[postBuild] Warm up matplotlib" + +echo "[postBuild] Python: $(python -V)" + +# Speed up pip (wheel cache already persisted layer-wise) +export PIP_DISABLE_PIP_VERSION_CHECK=1 + +echo "[postBuild] Editable install (no build isolation)" +pip install --no-build-isolation -e . + +echo "[postBuild] Warm matplotlib font cache" python - <<'PY' +import matplotlib import matplotlib.pyplot as plt -print("Matplotlib ready") +print("Matplotlib backend:", matplotlib.get_backend()) PY + +echo "[postBuild] Pre-import light rcpchgrowth symbols (avoid loading test data)" +python - <<'PY' +import rcpchgrowth +print("rcpchgrowth version:", rcpchgrowth.__version__) +PY + +echo "[postBuild] (Optional) JupyterLab asset build skip if already present" +jupyter lab build --dev-build=False --minimize=False >/dev/null 2>&1 || true + echo "[postBuild] Done" \ No newline at end of file diff --git a/.binder/start b/.binder/start new file mode 100755 index 0000000..111a9ce --- /dev/null +++ b/.binder/start @@ -0,0 +1,13 @@ +#!/bin/bash +set -euo pipefail +ts() { date +%H:%M:%S; } +echo "[start $(ts)] Kernel launch diagnostics" +python - <<'PY' +import time, importlib, sys +t0=time.time() +import rcpchgrowth +print("Imported rcpchgrowth in %.2fs" % (time.time()-t0)) +print("Version:", getattr(rcpchgrowth,'__version__','?')) +PY +echo "[start $(ts)] Exec JupyterLab" +exec jupyter lab --ServerApp.root_dir=/home/jovyan --ServerApp.default_url=/lab \ No newline at end of file From 8183a5fa03c640862ab3e10a6bbb2cbf362e2c87 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 20:33:05 +0100 Subject: [PATCH 04/12] postBuild fix --- .binder/postBuild | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.binder/postBuild b/.binder/postBuild index 819114c..ecd5838 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -1,28 +1,20 @@ #!/bin/bash set -euo pipefail - echo "[postBuild] Python: $(python -V)" - -# Speed up pip (wheel cache already persisted layer-wise) export PIP_DISABLE_PIP_VERSION_CHECK=1 - -echo "[postBuild] Editable install (no build isolation)" -pip install --no-build-isolation -e . - +echo "[postBuild] Upgrade build tools" +pip install --upgrade pip setuptools wheel +echo "[postBuild] Editable install" +pip install -e . echo "[postBuild] Warm matplotlib font cache" python - <<'PY' import matplotlib import matplotlib.pyplot as plt print("Matplotlib backend:", matplotlib.get_backend()) PY - -echo "[postBuild] Pre-import light rcpchgrowth symbols (avoid loading test data)" +echo "[postBuild] Pre-import rcpchgrowth (light)" python - <<'PY' -import rcpchgrowth -print("rcpchgrowth version:", rcpchgrowth.__version__) +import rcpchgrowth, time +print("rcpchgrowth version:", getattr(rcpchgrowth,'__version__','?')) PY - -echo "[postBuild] (Optional) JupyterLab asset build skip if already present" -jupyter lab build --dev-build=False --minimize=False >/dev/null 2>&1 || true - echo "[postBuild] Done" \ No newline at end of file From 3635dd4c958b0b4fe85d0cbb7fd2eddea816937b Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 20:45:23 +0100 Subject: [PATCH 05/12] drop some big files --- .binder/postBuild | 20 ++++++++------------ .binder/start | 13 ------------- 2 files changed, 8 insertions(+), 25 deletions(-) delete mode 100755 .binder/start diff --git a/.binder/postBuild b/.binder/postBuild index ecd5838..ac71698 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -1,20 +1,16 @@ #!/bin/bash set -euo pipefail -echo "[postBuild] Python: $(python -V)" -export PIP_DISABLE_PIP_VERSION_CHECK=1 -echo "[postBuild] Upgrade build tools" -pip install --upgrade pip setuptools wheel echo "[postBuild] Editable install" pip install -e . -echo "[postBuild] Warm matplotlib font cache" +echo "[postBuild] Prune heavy, non-notebook files" +rm -rf rcpchgrowth/tests || true +rm -f rcpchgrowth/data_tables/bayley-pineau.pdf || true +rm -f rcpchgrowth/data_tables/uk-who_resources/GrowthCharts.xls || true +rm -f rcpchgrowth/data_tables/uk-who_resources/*.bas || true +rm -f rcpchgrowth/data_tables/fenton/*.* || true python - <<'PY' -import matplotlib -import matplotlib.pyplot as plt -print("Matplotlib backend:", matplotlib.get_backend()) -PY -echo "[postBuild] Pre-import rcpchgrowth (light)" -python - <<'PY' -import rcpchgrowth, time +import rcpchgrowth, os print("rcpchgrowth version:", getattr(rcpchgrowth,'__version__','?')) +print("Remaining data_tables entries:", os.listdir('rcpchgrowth/data_tables')) PY echo "[postBuild] Done" \ No newline at end of file diff --git a/.binder/start b/.binder/start deleted file mode 100755 index 111a9ce..0000000 --- a/.binder/start +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -euo pipefail -ts() { date +%H:%M:%S; } -echo "[start $(ts)] Kernel launch diagnostics" -python - <<'PY' -import time, importlib, sys -t0=time.time() -import rcpchgrowth -print("Imported rcpchgrowth in %.2fs" % (time.time()-t0)) -print("Version:", getattr(rcpchgrowth,'__version__','?')) -PY -echo "[start $(ts)] Exec JupyterLab" -exec jupyter lab --ServerApp.root_dir=/home/jovyan --ServerApp.default_url=/lab \ No newline at end of file From b09c4dd088a166ec2bf02698dfe726e9b44c5857 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 21:05:59 +0100 Subject: [PATCH 06/12] put back old postbuild --- .binder/postBuild | 13 ++++++++++++- Trial.ipynb | 19 ------------------- 2 files changed, 12 insertions(+), 20 deletions(-) delete mode 100644 Trial.ipynb diff --git a/.binder/postBuild b/.binder/postBuild index ac71698..9b8389b 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -1,7 +1,9 @@ #!/bin/bash set -euo pipefail -echo "[postBuild] Editable install" + +echo "[postBuild] Editable install of local package" pip install -e . + echo "[postBuild] Prune heavy, non-notebook files" rm -rf rcpchgrowth/tests || true rm -f rcpchgrowth/data_tables/bayley-pineau.pdf || true @@ -9,8 +11,17 @@ rm -f rcpchgrowth/data_tables/uk-who_resources/GrowthCharts.xls || true rm -f rcpchgrowth/data_tables/uk-who_resources/*.bas || true rm -f rcpchgrowth/data_tables/fenton/*.* || true python - <<'PY' + +echo "[postBuild] Warm up matplotlib font cache" +python - <<'PY' +import matplotlib.pyplot as plt # triggers font cache build +print("Matplotlib imported; font cache built.") + import rcpchgrowth, os print("rcpchgrowth version:", getattr(rcpchgrowth,'__version__','?')) print("Remaining data_tables entries:", os.listdir('rcpchgrowth/data_tables')) PY + +echo "[postBuild] Warm up JupyterLab (pre-build static if needed)" +jupyter lab build --minimize=False >/dev/null 2>&1 || true echo "[postBuild] Done" \ No newline at end of file diff --git a/Trial.ipynb b/Trial.ipynb deleted file mode 100644 index 0a70078..0000000 --- a/Trial.ipynb +++ /dev/null @@ -1,19 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "488b0a0f", - "metadata": {}, - "source": [ - "This is an experiment that maybe needed" - ] - } - ], - "metadata": { - "language_info": { - "name": "python" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From 4d5ccb514a68290b0816ddbaee3123005876735a Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Tue, 19 Aug 2025 21:10:45 +0100 Subject: [PATCH 07/12] oops --- .binder/postBuild | 1 - 1 file changed, 1 deletion(-) diff --git a/.binder/postBuild b/.binder/postBuild index 9b8389b..5bacba5 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -10,7 +10,6 @@ rm -f rcpchgrowth/data_tables/bayley-pineau.pdf || true rm -f rcpchgrowth/data_tables/uk-who_resources/GrowthCharts.xls || true rm -f rcpchgrowth/data_tables/uk-who_resources/*.bas || true rm -f rcpchgrowth/data_tables/fenton/*.* || true -python - <<'PY' echo "[postBuild] Warm up matplotlib font cache" python - <<'PY' From d54d711eb52126a6eb9cae2517a661c9c5d6fc52 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Thu, 21 Aug 2025 19:16:36 +0100 Subject: [PATCH 08/12] add back start --- .binder/start | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 .binder/start diff --git a/.binder/start b/.binder/start new file mode 100755 index 0000000..6188765 --- /dev/null +++ b/.binder/start @@ -0,0 +1,2 @@ +#!/bin/bash +jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root \ No newline at end of file From b907e7d6f236afcdee019ae9a119593c280e29d6 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Thu, 21 Aug 2025 19:16:58 +0100 Subject: [PATCH 09/12] remove jupyter launch from postbuild --- .binder/postBuild | 1 - 1 file changed, 1 deletion(-) diff --git a/.binder/postBuild b/.binder/postBuild index 5bacba5..75d6e9a 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -22,5 +22,4 @@ print("Remaining data_tables entries:", os.listdir('rcpchgrowth/data_tables')) PY echo "[postBuild] Warm up JupyterLab (pre-build static if needed)" -jupyter lab build --minimize=False >/dev/null 2>&1 || true echo "[postBuild] Done" \ No newline at end of file From a8e483b7968fb44ea4a9cdb25a9698fa8b50063b Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Thu, 21 Aug 2025 19:29:12 +0100 Subject: [PATCH 10/12] minimal postBuild --- .binder/postBuild | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.binder/postBuild b/.binder/postBuild index 75d6e9a..2d5b161 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -13,13 +13,8 @@ rm -f rcpchgrowth/data_tables/fenton/*.* || true echo "[postBuild] Warm up matplotlib font cache" python - <<'PY' -import matplotlib.pyplot as plt # triggers font cache build +import matplotlib.pyplot as plt print("Matplotlib imported; font cache built.") - -import rcpchgrowth, os -print("rcpchgrowth version:", getattr(rcpchgrowth,'__version__','?')) -print("Remaining data_tables entries:", os.listdir('rcpchgrowth/data_tables')) PY -echo "[postBuild] Warm up JupyterLab (pre-build static if needed)" echo "[postBuild] Done" \ No newline at end of file From 8ebb741a368a31cccc3b475613b1148bdc5fd304 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Thu, 21 Aug 2025 19:40:04 +0100 Subject: [PATCH 11/12] add runtime script --- .binder/runtime.txt | 1 + .binder/start | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100755 .binder/runtime.txt diff --git a/.binder/runtime.txt b/.binder/runtime.txt new file mode 100755 index 0000000..f31904f --- /dev/null +++ b/.binder/runtime.txt @@ -0,0 +1 @@ +python-3.10 \ No newline at end of file diff --git a/.binder/start b/.binder/start index 6188765..ab98d4d 100755 --- a/.binder/start +++ b/.binder/start @@ -1,2 +1,2 @@ #!/bin/bash -jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root \ No newline at end of file +exec jupyter lab --ServerApp.default_url=/lab/tree/notebooks \ No newline at end of file From e24bcafe777996d4ffec95702ca11a621cc63e2d Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Thu, 21 Aug 2025 19:53:36 +0100 Subject: [PATCH 12/12] remove start --- .binder/start | 2 -- 1 file changed, 2 deletions(-) delete mode 100755 .binder/start diff --git a/.binder/start b/.binder/start deleted file mode 100755 index ab98d4d..0000000 --- a/.binder/start +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -exec jupyter lab --ServerApp.default_url=/lab/tree/notebooks \ No newline at end of file