Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
451fe67
Extract result formatters into new module
NCCU-Schultz-Lab May 2, 2026
7c3b7ef
Update .pre-commit-config.yaml
NCCU-Schultz-Lab May 2, 2026
de4e870
Move export helpers to app_exports module
NCCU-Schultz-Lab May 2, 2026
5fced0b
Extract history helpers to app_history.py
NCCU-Schultz-Lab May 2, 2026
fc69df3
Extract analysis panel logic to module
NCCU-Schultz-Lab May 2, 2026
4171fe0
Extract visualization helpers to module
NCCU-Schultz-Lab May 2, 2026
96d0d21
Extract UI builders into app_builders.py
NCCU-Schultz-Lab May 2, 2026
f0541e7
Refactor status/history panels into builders
NCCU-Schultz-Lab May 2, 2026
8a4e4de
Extract UI builders and runflow logic
NCCU-Schultz-Lab May 2, 2026
fe713f6
Extract calc/scan/freq UI handlers to runflow
NCCU-Schultz-Lab May 2, 2026
b370950
Extract runflow UI handlers to app_runflow
NCCU-Schultz-Lab May 2, 2026
b02cd20
Move UI event handlers to app_runflow
NCCU-Schultz-Lab May 2, 2026
3273e35
Add calc_type scoping, status markers & tail timing
NCCU-Schultz-Lab May 3, 2026
e30b25e
Add native Jupyter launcher and async viz fixes
NCCU-Schultz-Lab May 13, 2026
0b821dd
Add UV-Vis spectrum UI and plotting
NCCU-Schultz-Lab May 14, 2026
6a994b3
Add scroll guard for run output
NCCU-Schultz-Lab May 14, 2026
6aebc99
Add plot export UI and saving support
NCCU-Schultz-Lab May 14, 2026
5946470
Add Files tab and activity indicator
NCCU-Schultz-Lab May 14, 2026
23e02cb
Adjust isosurface plot styling and defaults
NCCU-Schultz-Lab May 14, 2026
c948d44
Cache kernel io_loop and queue main-thread callbacks
NCCU-Schultz-Lab May 20, 2026
8ef4487
Create wsl_pyc_audit.sh
NCCU-Schultz-Lab May 21, 2026
4d5646c
Update app_visualization.py
NCCU-Schultz-Lab May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ planning/
nul
/.claude/
/temp - untracked/
/logs
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fail_fast: true

repos:
# ── Standard file hygiene ─────────────────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -42,6 +44,7 @@ repos:
rev: v1.10.0
hooks:
- id: mypy
stages: [pre-push]
files: ^quantui/ # type-check the package only, not tests
args: ["--ignore-missing-imports", "--no-error-summary"]
additional_dependencies:
Expand Down
72 changes: 72 additions & 0 deletions launch-native-jupyter.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@echo off
echo QuantUI NATIVE JUPYTER MODE -- Local conda env in WSL, no container
echo Use this when you have edited quantui/*.py and want JupyterLab.
echo.

REM Convert the Windows repo path to a WSL path for portability
set "WIN_REPO=%~dp0."
for /f "delims=" %%i in ('wsl wslpath -a "%WIN_REPO%"') do set WSLPATH=%%i
if not defined WSLPATH (
echo ERROR: Could not resolve a WSL path for %WIN_REPO%
echo Try this command manually:
echo wsl wslpath -a "%WIN_REPO%"
echo.
pause
exit /b 1
)
set LOGFILE=%~dp0logs\native-jupyter.log

echo Startup log: %LOGFILE%
echo.

REM Runs JupyterLab directly from the quantui conda env inside WSL.
REM pip install -e . is skipped when pyproject.toml has not changed since the
REM last install (.dev_install_stamp). quantui/*.py changes are always live in
REM editable mode -- reinstall is only needed after pyproject.toml changes or on
REM first use.
REM Uses port 8868 to avoid conflict with container-based launchers on 8866 and
REM native Voila launcher on 8867.
REM Clears quantui/__pycache__ on every launch to prevent stale .pyc bytecode
REM (WSL2 DrvFs does not reliably propagate Windows-side mtime changes, so Python
REM may load pre-edit bytecode even after source changes -- see GOTCHAS.md).
REM PYTHONDONTWRITEBYTECODE=1 prevents a new stale cache from accumulating.
start "QuantUI [native-jupyter]" wsl -d Ubuntu --cd "%WSLPATH%" -- bash ./launch-native-jupyter.sh

echo Waiting for JupyterLab to start on localhost:8868...
set MAX_WAIT=45
set waited=0
set OPENED=0

:wait_for_jupyter
powershell -NoProfile -Command "$client = New-Object Net.Sockets.TcpClient; try { $client.Connect('127.0.0.1', 8868); $client.Close(); exit 0 } catch { exit 1 }" > nul 2>&1
if %errorlevel%==0 goto open_browser
if %waited% GEQ %MAX_WAIT% goto startup_timeout
timeout /t 1 /nobreak > nul
set /a waited=%waited%+1
goto wait_for_jupyter

:startup_timeout
echo.
echo JupyterLab did not open localhost:8868 within %MAX_WAIT% seconds.
echo Check the QuantUI [native-jupyter] WSL window for startup errors.
echo Review startup log: %LOGFILE%
if exist "%LOGFILE%" start "" "%LOGFILE%"
echo.
goto done

:open_browser
set OPENED=1
start http://127.0.0.1:8868/lab/tree/notebooks/molecule_computations.ipynb

:done

echo.
if "%OPENED%"=="1" (
echo Native JupyterLab server running at http://127.0.0.1:8868/lab
echo All local quantui/*.py changes are live -- no rebuild needed.
echo Close the WSL window to stop.
) else (
echo JupyterLab startup not confirmed yet.
echo Review the QuantUI [native-jupyter] WSL window for details.
echo Startup log: %LOGFILE%
)
37 changes: 37 additions & 0 deletions launch-native-jupyter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euo pipefail

LOG_FILE="logs/native-jupyter.log"
mkdir -p "$(dirname "$LOG_FILE")"

{
echo
echo "=== QuantUI native Jupyter launch: $(date -Iseconds) ==="
echo "PWD: $(pwd)"
} >> "$LOG_FILE"

exec > >(tee -a "$LOG_FILE") 2>&1

source ~/miniconda3/etc/profile.d/conda.sh
conda activate quantui

echo "Using Python: $(command -v python)"
echo "Using Jupyter: $(command -v jupyter)"

# Reinstall editable package only when pyproject metadata changed, or on first run.
if [ ! -f .dev_install_stamp ] || [ pyproject.toml -nt .dev_install_stamp ]; then
pip install -e . -q
touch .dev_install_stamp
fi

# Prevent stale bytecode from WSL2 DrvFs mtime quirks.
rm -rf quantui/__pycache__
export PYTHONDONTWRITEBYTECODE=1

exec jupyter lab notebooks/molecule_computations.ipynb \
--no-browser \
--port=8868 \
--ServerApp.port_retries=0 \
--ServerApp.root_dir="$(pwd)" \
--IdentityProvider.token='' \
--ServerApp.password=''
2 changes: 1 addition & 1 deletion notebooks/molecule_computations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.15"
"version": "3.11.14"
}
},
"nbformat": 4,
Expand Down
Loading
Loading