Depend on the ultra conda package instead of the ultra submodule

ultra >=0.1.19 comes from prefix.dev/nandi-testing; build and serve use its
`ultra` CLI and the test runner imports ultra_tool.make_server. The old
pixi.lock is dropped until one can be generated against that channel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011TQdaz3C1f3xEJM6PFzWE6
This commit is contained in:
Claude committed 2026-10-21 21:20:51 +00:00
1 parent 4665afb4cb
commit 0a9f4f5ec9
7 files changed
+15 -2005

No files matched your search

+4 -2
View File
@@ -18,9 +18,11 @@ jobs:
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: # No pixi.lock is committed yet (the cloud dev sandbox can't reach prefix.dev to make one).
submodules: true
- uses: prefix-dev/setup-pixi@v0.9.3 - uses: prefix-dev/setup-pixi@v0.9.3
with:
cache: false
locked: false
# Playwright's browser download hangs while unpacking under pixi's Node 26, so fetch # Playwright's browser download hangs while unpacking under pixi's Node 26, so fetch
# Chromium with the runner's own Node; the test itself still runs in the pixi env. # Chromium with the runner's own Node; the test itself still runs in the pixi env.
- uses: actions/setup-node@v5 - uses: actions/setup-node@v5
-3
View File
@@ -1,3 +0,0 @@
[submodule "ultra"]
path = ultra
url = https://github.com/nandi-conda/ultra
+2 -3
View File
@@ -12,13 +12,12 @@ The **Windows** button uses an accessibility service (`RecentsService`, which on
- `web/` is the UI: `app.py` is the ultra app and `app.wasm` its committed build, with `index.html`, `style.css` and the `ultra.js` / `ui.css` runtime the build copies in. `apps.json` and `widgets.json` are demo data for desktop browsers. - `web/` is the UI: `app.py` is the ultra app and `app.wasm` its committed build, with `index.html`, `style.css` and the `ultra.js` / `ui.css` runtime the build copies in. `apps.json` and `widgets.json` are demo data for desktop browsers.
- `android/` is a small native shell (Java, no dependencies) that serves `web/` to a transparent WebView over the wallpaper. It answers `apps.json` from `LauncherApps` and `widgets.json` from the installed widget providers, hands icons to the page through the `window.Android` bridge, and draws real `AppWidgetHostView`s over the slots the page reports. - `android/` is a small native shell (Java, no dependencies) that serves `web/` to a transparent WebView over the wallpaper. It answers `apps.json` from `LauncherApps` and `widgets.json` from the installed widget providers, hands icons to the page through the `window.Android` bridge, and draws real `AppWidgetHostView`s over the slots the page reports.
- `ultra/` is the ultra framework, as a git submodule. - The ultra framework comes from the `ultra` conda package on [prefix.dev/nandi-testing](https://prefix.dev/channels/nandi-testing), which pixi installs.
- `tests/e2e.cjs` is a Playwright test of the browser demo. - `tests/e2e.cjs` is a Playwright test of the browser demo.
## Build ## Build
```sh ```sh
git submodule update --init
pixi run build # web/app.py -> web/app.wasm pixi run build # web/app.py -> web/app.wasm
pixi run install-playwright && pixi run test pixi run install-playwright && pixi run test
cd android && ./gradlew assembleDebug # needs JDK 17 and the Android SDK cd android && ./gradlew assembleDebug # needs JDK 17 and the Android SDK
@@ -26,4 +25,4 @@ cd android && ./gradlew assembleDebug # needs JDK 17 and the Android SDK
`pixi run serve` serves `web/` on http://localhost:8000. In a desktop browser the launcher runs against the demo JSON files, shows a toast instead of launching, and draws widgets as labelled placeholders. Click the bar at the top to open the drawer. `pixi run serve` serves `web/` on http://localhost:8000. In a desktop browser the launcher runs against the demo JSON files, shows a toast instead of launching, and draws widgets as labelled placeholders. Click the bar at the top to open the drawer.
To pick up a newer ultra, update the submodule (`cd ultra && git pull origin main`), rebuild, and commit `ultra` together with the rebuilt `web/` files. Every push to ultra's main publishes a new `ultra` package. To pick it up, run `pixi update ultra`, rebuild, and commit the rebuilt `web/` files.
-1985
View File
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -1,17 +1,17 @@
[workspace] [workspace]
name = "launcher" name = "launcher"
description = "Android home-screen launcher written as an ultra app (LPython -> wasm)" description = "Android home-screen launcher written as an ultra app (LPython -> wasm)"
channels = ["https://conda.anaconda.org/conda-forge"] channels = ["https://conda.anaconda.org/conda-forge", "https://prefix.dev/nandi-testing"]
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"] platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
# ultra (the framework and its `ultra` build CLI, with lpython) comes from prefix.dev/nandi-testing.
[dependencies] [dependencies]
python = "3.12.*" python = "3.12.*"
lpython = "0.22.*" ultra = ">=0.1.19"
nodejs = ">=22" nodejs = ">=22"
# The ultra framework is the git submodule in ultra/ (`git submodule update --init`).
[tasks] [tasks]
build = { cmd = "python ultra/tools/ultra.py build web/app.py", description = "Compile web/app.py to web/app.wasm" } build = { cmd = "ultra build web/app.py", description = "Compile web/app.py to web/app.wasm" }
serve = { cmd = "python ultra/tools/ultra.py serve web", description = "Serve the launcher's browser demo on http://localhost:8000" } serve = { cmd = "ultra serve web", description = "Serve the launcher's browser demo on http://localhost:8000" }
install-playwright = { cmd = "npm install --no-save --no-package-lock playwright@1.56.1 && npx playwright install chromium", description = "Fetch Playwright and Chromium for the browser test" } install-playwright = { cmd = "npm install --no-save --no-package-lock playwright@1.56.1 && npx playwright install chromium", description = "Fetch Playwright and Chromium for the browser test" }
test = { cmd = "python tests/run.py", depends-on = ["build"], description = "Build, then run the browser test against a local server" } test = { cmd = "python tests/run.py", depends-on = ["build"], description = "Build, then run the browser test against a local server" }
+4 -6
View File
@@ -1,18 +1,16 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Serve web/ on a free port and run tests/e2e.cjs against it (`pixi run test`).""" """Serve web/ on a free port and run tests/e2e.cjs against it (`pixi run test`)."""
import importlib.util
import os import os
import subprocess import subprocess
import sys import sys
import threading import threading
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) from ultra_tool import make_server
spec = importlib.util.spec_from_file_location("ultra_tool", os.path.join(ROOT, "ultra", "tools", "ultra.py"))
ultra = importlib.util.module_from_spec(spec)
spec.loader.exec_module(ultra)
srv = ultra.make_server(os.path.join(ROOT, "web"), 0, quiet=True) ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
srv = make_server(os.path.join(ROOT, "web"), 0, quiet=True)
threading.Thread(target=srv.serve_forever, daemon=True).start() threading.Thread(target=srv.serve_forever, daemon=True).start()
r = subprocess.run(["node", os.path.join(ROOT, "tests", "e2e.cjs")], cwd=ROOT, r = subprocess.run(["node", os.path.join(ROOT, "tests", "e2e.cjs")], cwd=ROOT,
env={**os.environ, "BASE": f"http://localhost:{srv.server_address[1]}"}) env={**os.environ, "BASE": f"http://localhost:{srv.server_address[1]}"})
Submodule ultra deleted from 771ee03499.