From 92915c976a41f291926fd9042b543c38362e4ea7 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 22 May 2026 14:26:17 +0100 Subject: [PATCH 1/3] Fix docs log --- uv.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/uv.lock b/uv.lock index 02607ef0..078d3acb 100644 --- a/uv.lock +++ b/uv.lock @@ -760,7 +760,7 @@ name = "cuda-bindings" version = "12.9.6" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "cuda-pathfinder" }, + { name = "cuda-pathfinder", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/1f/a5/e9d37c10f6c27c9c65d53c6cd6d9763e1df99c004780585fc2ad9041fbe3/cuda_bindings-12.9.6-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2662f59db67d9aeaf8959c593c91f600792c2970cf02cae2814387fc687b115a", size = 7090971, upload-time = "2026-03-11T14:47:29.526Z" }, @@ -795,37 +795,37 @@ wheels = [ [package.optional-dependencies] cublas = [ - { name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux'" }, ] cudart = [ - { name = "nvidia-cuda-runtime-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cuda-runtime-cu12", marker = "sys_platform == 'linux'" }, ] cufft = [ - { name = "nvidia-cufft-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cufft-cu12", marker = "sys_platform == 'linux'" }, ] cufile = [ { name = "nvidia-cufile-cu12", marker = "sys_platform == 'linux'" }, ] cupti = [ - { name = "nvidia-cuda-cupti-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cuda-cupti-cu12", marker = "sys_platform == 'linux'" }, ] curand = [ - { name = "nvidia-curand-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-curand-cu12", marker = "sys_platform == 'linux'" }, ] cusolver = [ - { name = "nvidia-cusolver-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cusolver-cu12", marker = "sys_platform == 'linux'" }, ] cusparse = [ - { name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux'" }, ] nvjitlink = [ - { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux'" }, ] nvrtc = [ - { name = "nvidia-cuda-nvrtc-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-cuda-nvrtc-cu12", marker = "sys_platform == 'linux'" }, ] nvtx = [ - { name = "nvidia-nvtx-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "nvidia-nvtx-cu12", marker = "sys_platform == 'linux'" }, ] [[package]] @@ -2406,7 +2406,7 @@ name = "nvidia-cudnn-cu12" version = "9.10.2.21" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12" }, + { name = "nvidia-cublas-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/fa/41/e79269ce215c857c935fd86bcfe91a451a584dfc27f1e068f568b9ad1ab7/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:c9132cc3f8958447b4910a1720036d9eff5928cc3179b0a51fb6d167c6cc87d8", size = 705026878, upload-time = "2025-06-06T21:52:51.348Z" }, @@ -2418,7 +2418,7 @@ name = "nvidia-cufft-cu12" version = "11.3.0.4" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/1f/37/c50d2b2f2c07e146776389e3080f4faf70bcc4fa6e19d65bb54ca174ebc3/nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d16079550df460376455cba121db6564089176d9bac9e4f360493ca4741b22a6", size = 200164144, upload-time = "2024-11-20T17:40:58.288Z" }, @@ -2452,9 +2452,9 @@ name = "nvidia-cusolver-cu12" version = "11.7.1.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12" }, - { name = "nvidia-cusparse-cu12" }, - { name = "nvidia-nvjitlink-cu12" }, + { name = "nvidia-cublas-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "nvidia-cusparse-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/93/17/dbe1aa865e4fdc7b6d4d0dd308fdd5aaab60f939abfc0ea1954eac4fb113/nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0ce237ef60acde1efc457335a2ddadfd7610b892d94efee7b776c64bb1cac9e0", size = 157833628, upload-time = "2024-10-01T17:05:05.591Z" }, @@ -2468,7 +2468,7 @@ name = "nvidia-cusparse-cu12" version = "12.5.4.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/eb/eb/6681efd0aa7df96b4f8067b3ce7246833dd36830bb4cec8896182773db7d/nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d25b62fb18751758fe3c93a4a08eff08effedfe4edf1c6bb5afd0890fe88f887", size = 216451147, upload-time = "2024-11-20T17:44:18.055Z" }, From 12c650bd912e041d1ab9d05468f51dbed310b51c Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 22 May 2026 14:27:17 +0100 Subject: [PATCH 2/3] Fix log --- uv.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/uv.lock b/uv.lock index 078d3acb..02607ef0 100644 --- a/uv.lock +++ b/uv.lock @@ -760,7 +760,7 @@ name = "cuda-bindings" version = "12.9.6" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "cuda-pathfinder", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "cuda-pathfinder" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/1f/a5/e9d37c10f6c27c9c65d53c6cd6d9763e1df99c004780585fc2ad9041fbe3/cuda_bindings-12.9.6-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2662f59db67d9aeaf8959c593c91f600792c2970cf02cae2814387fc687b115a", size = 7090971, upload-time = "2026-03-11T14:47:29.526Z" }, @@ -795,37 +795,37 @@ wheels = [ [package.optional-dependencies] cublas = [ - { name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cublas-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] cudart = [ - { name = "nvidia-cuda-runtime-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cuda-runtime-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] cufft = [ - { name = "nvidia-cufft-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cufft-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] cufile = [ { name = "nvidia-cufile-cu12", marker = "sys_platform == 'linux'" }, ] cupti = [ - { name = "nvidia-cuda-cupti-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cuda-cupti-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] curand = [ - { name = "nvidia-curand-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-curand-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] cusolver = [ - { name = "nvidia-cusolver-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cusolver-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] cusparse = [ - { name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cusparse-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] nvjitlink = [ - { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] nvrtc = [ - { name = "nvidia-cuda-nvrtc-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-cuda-nvrtc-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] nvtx = [ - { name = "nvidia-nvtx-cu12", marker = "sys_platform == 'linux'" }, + { name = "nvidia-nvtx-cu12", marker = "sys_platform == 'linux' or sys_platform == 'win32'" }, ] [[package]] @@ -2406,7 +2406,7 @@ name = "nvidia-cudnn-cu12" version = "9.10.2.21" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "nvidia-cublas-cu12" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/fa/41/e79269ce215c857c935fd86bcfe91a451a584dfc27f1e068f568b9ad1ab7/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:c9132cc3f8958447b4910a1720036d9eff5928cc3179b0a51fb6d167c6cc87d8", size = 705026878, upload-time = "2025-06-06T21:52:51.348Z" }, @@ -2418,7 +2418,7 @@ name = "nvidia-cufft-cu12" version = "11.3.0.4" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "nvidia-nvjitlink-cu12" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/1f/37/c50d2b2f2c07e146776389e3080f4faf70bcc4fa6e19d65bb54ca174ebc3/nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d16079550df460376455cba121db6564089176d9bac9e4f360493ca4741b22a6", size = 200164144, upload-time = "2024-11-20T17:40:58.288Z" }, @@ -2452,9 +2452,9 @@ name = "nvidia-cusolver-cu12" version = "11.7.1.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, - { name = "nvidia-cusparse-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, - { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "nvidia-cublas-cu12" }, + { name = "nvidia-cusparse-cu12" }, + { name = "nvidia-nvjitlink-cu12" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/93/17/dbe1aa865e4fdc7b6d4d0dd308fdd5aaab60f939abfc0ea1954eac4fb113/nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0ce237ef60acde1efc457335a2ddadfd7610b892d94efee7b776c64bb1cac9e0", size = 157833628, upload-time = "2024-10-01T17:05:05.591Z" }, @@ -2468,7 +2468,7 @@ name = "nvidia-cusparse-cu12" version = "12.5.4.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "nvidia-nvjitlink-cu12" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/eb/eb/6681efd0aa7df96b4f8067b3ce7246833dd36830bb4cec8896182773db7d/nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d25b62fb18751758fe3c93a4a08eff08effedfe4edf1c6bb5afd0890fe88f887", size = 216451147, upload-time = "2024-11-20T17:44:18.055Z" }, From 933883b4e1de763afbafbf9b4671e8c56a0f22fb Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 22 May 2026 15:31:50 +0100 Subject: [PATCH 3/3] Move frontend to top level --- .dockerignore | 2 ++ .gitignore | 4 ++-- Makefile | 2 +- dev/docs-serve | 2 +- dev/frontend-serve | 2 +- dev/quantflow.dockerfile | 6 ++++++ {app/frontend => frontend}/observablehq.config.js | 2 +- {app/frontend => frontend}/package-lock.json | 0 {app/frontend => frontend}/package.json | 0 {app/frontend => frontend}/src/cointegration.md | 0 {app/frontend => frontend}/src/heston-vol-surface.md | 0 {app/frontend => frontend}/src/hurst.md | 0 {app/frontend => frontend}/src/index.md | 0 {app/frontend => frontend}/src/lib/api.ts | 0 {app/frontend => frontend}/src/lib/palette.ts | 0 {app/frontend => frontend}/src/sampling.md | 0 {app/frontend => frontend}/src/style.css | 0 {app/frontend => frontend}/src/supersmoother.md | 0 {app/frontend => frontend}/src/volatility-surface.md | 0 {app/frontend => frontend}/src/yield-curve.md | 0 pyproject.toml | 10 ---------- 21 files changed, 14 insertions(+), 16 deletions(-) rename {app/frontend => frontend}/observablehq.config.js (99%) rename {app/frontend => frontend}/package-lock.json (100%) rename {app/frontend => frontend}/package.json (100%) rename {app/frontend => frontend}/src/cointegration.md (100%) rename {app/frontend => frontend}/src/heston-vol-surface.md (100%) rename {app/frontend => frontend}/src/hurst.md (100%) rename {app/frontend => frontend}/src/index.md (100%) rename {app/frontend => frontend}/src/lib/api.ts (100%) rename {app/frontend => frontend}/src/lib/palette.ts (100%) rename {app/frontend => frontend}/src/sampling.md (100%) rename {app/frontend => frontend}/src/style.css (100%) rename {app/frontend => frontend}/src/supersmoother.md (100%) rename {app/frontend => frontend}/src/volatility-surface.md (100%) rename {app/frontend => frontend}/src/yield-curve.md (100%) diff --git a/.dockerignore b/.dockerignore index 8dfe3fdd..7eee8664 100644 --- a/.dockerignore +++ b/.dockerignore @@ -14,3 +14,5 @@ __pycache__ .pytest_cache .codebuild .gihub +frontend/node_modules +frontend/src/.observablehq diff --git a/.gitignore b/.gitignore index 5021e6a4..5cf1ecb9 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ _build docs/design app/docs app/examples -app/frontend/node_modules -app/frontend/src/.observablehq +frontend/node_modules +frontend/src/.observablehq docs/assets/examples docs/examples/output diff --git a/Makefile b/Makefile index 8f2b1f12..8ee4fe6e 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ docs-serve: ## serve docs, examples, and API with auto-reload .PHONY: frontend-build frontend-build: ## build Observable frontend examples @rm -rf app/examples - @npm --prefix app/frontend run build + @npm --prefix frontend run build .PHONY: frontend-serve frontend-serve: ## serve Observable frontend with auto-reload diff --git a/dev/docs-serve b/dev/docs-serve index 4e44b39b..e3fd7572 100755 --- a/dev/docs-serve +++ b/dev/docs-serve @@ -7,7 +7,7 @@ API_PORT=${API_PORT:-8001} FRONTEND_ORIGIN=${FRONTEND_ORIGIN:-http://127.0.0.1:${OBSERVABLE_PORT}} QUANTFLOW_API_ORIGIN=${QUANTFLOW_API_ORIGIN:-http://127.0.0.1:${API_PORT}} -npm --prefix app/frontend exec concurrently -- \ +npm --prefix frontend exec concurrently -- \ --kill-others \ --names docs,examples,api \ --prefix "[{name}]" \ diff --git a/dev/frontend-serve b/dev/frontend-serve index a18a3676..fb70afad 100755 --- a/dev/frontend-serve +++ b/dev/frontend-serve @@ -5,4 +5,4 @@ OBSERVABLE_PORT=${OBSERVABLE_PORT:-3001} echo "Examples: http://127.0.0.1:${OBSERVABLE_PORT}" -npm --prefix app/frontend run dev -- --host 127.0.0.1 --port ${OBSERVABLE_PORT} +npm --prefix frontend run dev -- --host 127.0.0.1 --port ${OBSERVABLE_PORT} diff --git a/dev/quantflow.dockerfile b/dev/quantflow.dockerfile index 7c52811e..fbc3d49b 100644 --- a/dev/quantflow.dockerfile +++ b/dev/quantflow.dockerfile @@ -5,8 +5,11 @@ FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim AS builder WORKDIR /build # Install Chromium for kaleido (Plotly static image export used by docs examples) +# Install Node.js for Observable Framework frontend build RUN apt-get update && apt-get install -y --no-install-recommends \ chromium \ + nodejs \ + npm \ && rm -rf /var/lib/apt/lists/* # Copy dependency files @@ -20,7 +23,10 @@ COPY mkdocs.yml ./ COPY dev/ ./dev/ COPY docs/ ./docs/ COPY quantflow/ ./quantflow/ +COPY frontend/ ./frontend/ COPY app/ ./app/ +RUN npm --prefix frontend install +RUN npm --prefix frontend run build RUN uv run ./dev/build-examples RUN uv run mkdocs build diff --git a/app/frontend/observablehq.config.js b/frontend/observablehq.config.js similarity index 99% rename from app/frontend/observablehq.config.js rename to frontend/observablehq.config.js index d7e7f162..70f294a6 100644 --- a/app/frontend/observablehq.config.js +++ b/frontend/observablehq.config.js @@ -11,7 +11,7 @@ const headSnippet = readFileSync(resolve(__dirname, "../../docs/assets/logos/hea export default { title: "Quantflow Examples", root: "src", - output: "../examples", + output: "../app/examples", base: "/examples", head: `\n${headSnippet}`, style: "style.css", diff --git a/app/frontend/package-lock.json b/frontend/package-lock.json similarity index 100% rename from app/frontend/package-lock.json rename to frontend/package-lock.json diff --git a/app/frontend/package.json b/frontend/package.json similarity index 100% rename from app/frontend/package.json rename to frontend/package.json diff --git a/app/frontend/src/cointegration.md b/frontend/src/cointegration.md similarity index 100% rename from app/frontend/src/cointegration.md rename to frontend/src/cointegration.md diff --git a/app/frontend/src/heston-vol-surface.md b/frontend/src/heston-vol-surface.md similarity index 100% rename from app/frontend/src/heston-vol-surface.md rename to frontend/src/heston-vol-surface.md diff --git a/app/frontend/src/hurst.md b/frontend/src/hurst.md similarity index 100% rename from app/frontend/src/hurst.md rename to frontend/src/hurst.md diff --git a/app/frontend/src/index.md b/frontend/src/index.md similarity index 100% rename from app/frontend/src/index.md rename to frontend/src/index.md diff --git a/app/frontend/src/lib/api.ts b/frontend/src/lib/api.ts similarity index 100% rename from app/frontend/src/lib/api.ts rename to frontend/src/lib/api.ts diff --git a/app/frontend/src/lib/palette.ts b/frontend/src/lib/palette.ts similarity index 100% rename from app/frontend/src/lib/palette.ts rename to frontend/src/lib/palette.ts diff --git a/app/frontend/src/sampling.md b/frontend/src/sampling.md similarity index 100% rename from app/frontend/src/sampling.md rename to frontend/src/sampling.md diff --git a/app/frontend/src/style.css b/frontend/src/style.css similarity index 100% rename from app/frontend/src/style.css rename to frontend/src/style.css diff --git a/app/frontend/src/supersmoother.md b/frontend/src/supersmoother.md similarity index 100% rename from app/frontend/src/supersmoother.md rename to frontend/src/supersmoother.md diff --git a/app/frontend/src/volatility-surface.md b/frontend/src/volatility-surface.md similarity index 100% rename from app/frontend/src/volatility-surface.md rename to frontend/src/volatility-surface.md diff --git a/app/frontend/src/yield-curve.md b/frontend/src/yield-curve.md similarity index 100% rename from app/frontend/src/yield-curve.md rename to frontend/src/yield-curve.md diff --git a/pyproject.toml b/pyproject.toml index 2d822a0b..048d7b3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,17 +134,10 @@ exclude_also = [ [tool.isort] profile = "black" -skip_glob = [ - "app/frontend/*", -] [tool.black] -extend-exclude = "/app/frontend/" [tool.ruff] -exclude = [ - "app/frontend", -] lint.select = [ "E", "F", @@ -158,9 +151,6 @@ path = "quantflow/__init__.py" # strict = true disallow_untyped_calls = true disallow_untyped_defs = true -exclude = [ - "^app/frontend/", -] warn_no_return = true disable_error_code = [ "prop-decorator",