Skip to content

Commit ed063c7

Browse files
committed
feat: add single app deployment packaging
1 parent a8c9036 commit ed063c7

9 files changed

Lines changed: 1079 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,35 @@ maintainer intent and user impact that are easy to lose in commit subjects.
1919

2020
## Unreleased
2121

22+
### Pending - Single app deployment packages
23+
24+
Affected versions:
25+
- `labkit_launcher` `1.2.5 -> 1.2.6`
26+
27+
What changed:
28+
- Added launcher actions and a deployment tool that package one selected LabKit
29+
app into a standalone zip, either as source `.m` files or encoded `.p` files.
30+
- The generated package includes the selected app and its assets, `+labkit/`,
31+
`labkit_launcher.m`, the launcher-needed deployment/profiling tool folders,
32+
a manifest, and a direct `run_<app_command>.m` entry file.
33+
- Private apps can be packaged from `private_apps/apps/` or
34+
`LABKIT_PRIVATE_APP_ROOTS`; inside the zip they remain under
35+
`private_apps/apps/...`.
36+
37+
Why it matters:
38+
- A single lab workflow can be distributed into a fixed production or offline
39+
deployment step without shipping unrelated apps, tests, docs, or repository
40+
metadata.
41+
42+
Compatibility:
43+
- Full LabKit checkout installs are unchanged.
44+
- Single-app packages can start through either the packaged launcher or the
45+
direct run file; P-code packages require MATLAB to run the generated `.p`
46+
files.
47+
48+
Evidence:
49+
- Pending commit.
50+
2251
### Pending - Private app workspace discovery
2352

2453
Affected versions:
@@ -72,7 +101,7 @@ Audited against `main` UI 5 squash commit on 2026-07-06.
72101

73102
| Component | Current version | Family | Metadata location |
74103
|---|---:|---|---|
75-
| `labkit_launcher` | `1.2.5` | Launcher | `labkit_launcher.m` |
104+
| `labkit_launcher` | `1.2.6` | Launcher | `labkit_launcher.m` |
76105
| `labkit.ui` | `5.0.0` | Facade | `+labkit/+ui/version.m` |
77106
| `labkit.dta` | `2.0.0` | Facade | `+labkit/+dta/version.m` |
78107
| `labkit.image` | `1.1.0` | Facade | `+labkit/+image/version.m` |

docs/apps.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ artifacts under `artifacts/`.
4545
The Code Analyzer action writes a native `codeIssues` JSON export to
4646
`artifacts/code-check/matlab_code_issues.json` for manual maintenance review.
4747

48+
The `Package App` launcher action creates a single-app source zip under
49+
`artifacts/deployment/`. `Package P-code` creates the same standalone package
50+
shape with MATLAB code encoded as `.p` files instead of source `.m` files. The
51+
zip expands to a standalone directory containing the selected app folder and
52+
its assets, `+labkit/`, the launcher, the launcher-needed deployment/profiling
53+
tool folders, a `packaged_app_manifest.json`, and a direct
54+
`run_<app_command>` entry file. Users can run either the direct entry file or
55+
`labkit_launcher` from the unzipped folder. The package intentionally omits
56+
unrelated public apps, tests, docs, CI files, and source-checkout metadata.
57+
4858
The launcher sets up the app path before opening an app. App-owned packages are
4959
reached through their owning app entrypoint and package namespace.
5060

docs/architecture.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ apps/ workflow-specific GUI apps and app-owned helpers
1111
tests/ behavior tests, project contracts, GUI checks, shared helpers, and runner code
1212
docs/ human-facing usage, API, architecture, and validation docs
1313
scripts/ CI helper scripts
14-
tools/ maintainer-only MATLAB diagnostics and report generators
14+
tools/ maintainer diagnostics, deployment packagers, and report generators
1515
```
1616

1717
Apps should remain independently launchable. The reusable library should grow
@@ -41,15 +41,17 @@ rather than mixing private app files into the public repo history. The public
4141
structure guide is [private-apps.md](private-apps.md); private app
4242
documentation belongs in the private workspace.
4343

44-
The launcher is intentionally self-contained: it uses native MATLAB UI and
45-
local helper functions so users can repair a damaged zip install even if
46-
packages, apps, docs, or scripts have been deleted. It configures the MATLAB
47-
path for app entry points. MATLAB desktop project metadata belongs to each
48-
developer's local workspace.
49-
50-
Tools under `tools/` are source-checkout maintainer diagnostics. They are not
51-
runtime entry points for launcher users and are not dependencies of
52-
`labkit_launcher.m`.
44+
The launcher keeps update, discovery, and repair logic self-contained: it uses
45+
native MATLAB UI and local helper functions so users can repair a damaged zip
46+
install even if packages, apps, docs, or scripts have been deleted. It
47+
configures the MATLAB path for app entry points. MATLAB desktop project
48+
metadata belongs to each developer's local workspace.
49+
50+
Tools under `tools/` are source-checkout support utilities rather than app
51+
runtime APIs. The launcher may call a small, explicit subset for maintenance
52+
and deployment actions, such as profiling a selected app or packaging a single
53+
app for offline deployment. Single-app deployment packages include the launcher
54+
and only those launcher-needed tool folders, not the whole source checkout.
5355

5456
## Ownership Boundaries
5557

docs/private-apps.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ Private entries appear in the app catalog with `Visibility` set to `private`.
4949
They launch like ordinary LabKit apps after the launcher adds the app folder to
5050
the MATLAB path.
5151

52+
The launcher can also package a selected private app for offline deployment as
53+
either source `.m` files or encoded `.p` files. The generated zip preserves the
54+
private app under `private_apps/apps/...` and includes the packaged launcher
55+
plus the deployment/profiling tool folders it uses. Private apps discovered
56+
through `LABKIT_PRIVATE_APP_ROOTS` are copied into that same
57+
`private_apps/apps/...` package shape so the zip does not depend on the source
58+
machine's environment variable or private workspace path.
59+
5260
## Git Ownership
5361

5462
Keep `private_apps/` as a separate private Git repository:
@@ -90,3 +98,12 @@ assumptions into `+labkit`.
9098
The public repository should contain only this generic private-app structure
9199
guide. Put private app catalogs, SOPs, validation commands, sample notes,
92100
deployment notes, and release history in the private app repository.
101+
102+
Private app repositories own their own tests and validation runners. They do
103+
not need to add app-specific suites, fixtures, build tasks, or sample assets to
104+
the public LabKit repository. Private app internals may be looser than public
105+
apps when a local workflow needs it, but the launcher-facing surface should
106+
remain compatible with LabKit discovery and guardrails: keep launch commands,
107+
`requirements` and `version` lightweight requests, path setup, and private
108+
sample hygiene valid when the private workspace is present next to a public
109+
checkout.

0 commit comments

Comments
 (0)