kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Migrate kolibri-app into the Python monorepo

Open rtibbles opened this issue 5 months ago • 1 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Migrate kolibri-app from its standalone repo into platforms/ as a uv workspace member. It's a wxPython desktop app, PyInstaller-built into a macOS .dmg and a Windows .exe — not a wheel.

Complexity: High (code-signing) · Target branch: develop

Context

kolibri-app is a wxPython app that bundles Kolibri. Standalone repo:

  • pyproject.toml + uv.lock, with a dynamic setuptools-scm version;
  • runtime deps wxPython, cryptography, pywin32;
  • build-group deps pyinstaller, dmgbuild;
  • kolibri.spec (PyInstaller), src/, installer/, build_config/, hooks/, notarize-dmg.sh, scripts/, tests/.

CI (both take a Kolibri whl as input):

  • build_mac.yml: build with PyInstaller → codesign (KOLIBRI_MAC_APP_IDENTITY) → notarize (notarize-dmg.sh) → .dmg.
  • build_windows.yml: build with PyInstaller + Inno Setup → .exe.
  • pr_build.yml (standalone, on: pull_request) — builds against the latest Kolibri release. Exists only because the repo is standalone.
  • pre-commit.

The Change

  • Move the repo into platforms/desktop-app/.
  • Register it as a uv workspace member (already a uv project, uv.lock).
  • Preserve git history via git filter-repo --to-subdirectory-filter + merge --allow-unrelated-histories.
  • Migrate the reusable build_mac.yml and build_windows.yml, keeping the PyInstaller/dmgbuild/Inno-Setup toolchain.
  • Rewire pr_build_kolibri.yml's dmg job to call build_mac locally (uses: ./…), dropping the @v0.5.1 pin.
  • Repoint pr_build_kolibri.yml's exe job from kolibri-installer-windows/…@v1.6.9 to the migrated ./.github/workflows/build_windows.yml.
  • Do not migrate pr_build.yml — pr_build_kolibri.yml already builds the .dmg/.exe per PR against that PR's own Kolibri.
  • Fold the smoke/validation steps the wrapper runs for Windows and MacOS into the pr_build_kolibri.yml's smoke tests, non blocking.
  • Set the app version to the Kolibri version directly, dropping the app's own setuptools-scm scheme.
  • Collapse duplicated PR scaffolding into the monorepo's copies.
  • Prefix-name migrated workflow files by OS: platform-macos-app-*.yml and platform-windows-app-*.yml.
  • Add the app's tests/ as a row in the Stage-2 platform Python tests matrix job.

Out of Scope

  • Migrating other installers — separate per-repo tasks under #13720.
  • Archiving the source repo.
  • Auto-wiring the app build to the monorepo's own Kolibri whl.
  • Migrating app's i18n workflows — handled separately by Kolibri's i18n workflows (platforms/ + plugin strings).
  • Reconciling the app's heavy platform-specific deps (wxPython, pywin32) with the shared lockfile beyond what migration requires. Flag if it constrains workspace resolution.
  • Admin/infra setup (mac signing cert + identity, notarization credentials, any Windows signing) — tracked as admin tasks on #13720.
  • Making the build/validation CI blocking — the WHL smoke-test fan-in remains the sole blocking gate.

Acceptance Criteria

Code migration

  • [ ] Content at platforms/desktop-app/.
  • [ ] kolibri.spec, src/, installer/, hooks/, notarize-dmg.sh kept.
  • [ ] pyproject.toml linked to the workspace.
  • [ ] App version = the Kolibri version.
  • [ ] History + git blame preserved via git filter-repo.
  • [ ] Passes monorepo pre-commit.

Workspace integration

  • [ ] uv workspace member under uv sync --all-packages.
  • [ ] Import name in known-first-party.

CI

  • [ ] build_mac.yml migrated and prefix-named.
  • [ ] build_windows.yml migrated and prefix-named.
  • [ ] pr_build_kolibri.yml's dmg job calls build_mac locally; the @v0.5.1 pin is gone.
  • [ ] pr_build_kolibri.yml's exe job calls the migrated build_windows.yml locally; the kolibri-installer-windows/…@v1.6.9 pin is gone.
  • [ ] pr_build.yml is not migrated.
  • [ ] The app's tests/ run as a row in the Stage-2 platform Python tests matrix job.
  • [ ] Duplicated PR scaffolding collapsed.

Runtime

  • [ ] The built .dmg and .exe install and launch Kolibri as before.

References

  • Source repository: https://github.com/learningequality/kolibri-app
  • uv workspaces: https://docs.astral.sh/uv/concepts/projects/workspaces/

AI usage

Used Claude Code to draft this issue from the migration-framework design. I drove scope and decisions. Claude read the source repo's build_mac.yml, build_windows.yml, and pyproject.toml to ground the PyInstaller/code-signing details and the dependency set.

rtibbles avatar Jul 05 '26 01:07 rtibbles

The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.

rtibblesbot avatar Jul 18 '26 00:07 rtibblesbot