Skip to content

LabKit MATLAB Workbench v2.0

Latest

Choose a tag to compare

@Pluze Pluze released this 14 Jun 16:29

LabKit MATLAB Workbench v2.0

LabKit 2.0 turns the repository into an app-first MATLAB workbench for focused lab GUI workflows. Apps are the primary deliverable, while +labkit remains a smaller reusable foundation for UI, Gamry DTA loading, and biosignal processing.

This v2.0 release has been corrected to include the DIC postprocess bugfixes from the final release commit b419b6b0b93147fc62ca08c7b68e2febd0a88a27.

Highlights

  • App launcher: start from labkit_launcher, discover all apps/**/labkit_*_app.m entry points, launch normal or debug sessions, open Project Governance, and clean generated artifacts from one place.
  • UI 2.0 app framework: apps use declarative labkit.ui.spec.* workbench specs, semantic labkit.ui.view.* updates, reusable interaction tools, and a consistent left-controls/right-workspace layout.
  • Better default layout sizing: text-heavy controls such as status panels, log panels, path panels, and result tables now receive conservative automatic starting heights.
  • DIC postprocess fix: strain overlay rendering can trim unreliable edge pixels, summary statistics now use the MAT-derived strain domain instead of the display mask, and EXX/EYY overlay export writes clean PNGs matching the input reference image pixel size.
  • DIC postprocess export cleanup: removed DPI-based figure overlay export and separate colorbar export from the app workflow.
  • DIC postprocess compatibility: nearest strain extension no longer depends on bwdist, so unit tests pass in CI environments without that toolbox function.
  • Project Governance app: create new LabKit app scaffolds, preview generated file structure, run MATLAB Code Analyzer reports, and create local MATLAB Project files when needed.
  • Debug artifacts: app("debug") writes app debug traces under artifacts/debug/, so launch and GUI interaction failures remain inspectable even if the visible app log is inaccessible.
  • Cleaner test framework: tests are discovery-driven under tests/cases/{unit,contract,gui}, with shared helpers and runner internals separated.
  • Artifact hygiene: MATLAB batch logs, debug traces, test reports, and code analyzer JSON now live under artifacts/ instead of the repository root.

App Coverage In This Release

Electrochemistry:

  • labkit_CIC_app
  • labkit_CSC_app
  • labkit_ChronoOverlay_app
  • labkit_EIS_app
  • labkit_VTResistance_app

DIC:

  • labkit_DICPreprocess_app
  • labkit_DICPostprocess_app

Image measurement:

  • labkit_BatchImageCrop_app
  • labkit_CurvatureMeasurement_app
  • labkit_FocusStack_app
  • labkit_ImageEnhance_app
  • labkit_ImageMatch_app

Wearable biosignal:

  • labkit_ECGPrint_app

Project tools:

  • labkit_ProjectGovernance_app

What Changed Since 1.0

  • Apps were migrated away from large public entry-point files and legacy +ui/runApp.m runner shapes. Current apps use a thin public app function, package-root run.m, and app-local +ui/buildSpec.m.
  • The old flat UI helper surface was removed. New app-facing UI code uses the layered facades under labkit.ui.app, labkit.ui.spec, labkit.ui.view, labkit.ui.tool, and labkit.ui.diag.
  • Root-level MATLAB test wrappers were simplified. Use buildtool tasks directly or route MATLAB discovery through scripts/matlab_batch.sh.
  • MATLAB Project metadata is local IDE state now. The tracked repository does not include LabKit.prj or resources/project/; use Project Governance when a local .prj file is useful.
  • The scaffold template app was replaced by the Project Governance generator. New apps are ordinary MATLAB source after generation; there is no manifest or generated registry to maintain.
  • Test fixtures were reduced to synthetic generated data where possible, including DTA fixtures created during tests instead of checked-in sample files.
  • Human docs and agent-facing rules were separated. User docs describe current behavior and commands; agent docs and skills own workflow rules.

Compatibility And Migration Notes

This is a major release. Existing personal scripts that call old internal helpers may need updates.

  • Use labkit_launcher or direct app commands such as labkit_CIC_app.

  • Use app("debug") for debug launch. Lower-level debug options belong to labkit.ui.diag.createContext, not public app entry points.

  • Replace old UI helper calls such as labkit.ui.view.form, labkit.ui.view.panel, labkit.ui.view.draw, or labkit.ui.app.createShell with UI 2.0 specs plus semantic view helpers.

  • Replace old test wrapper usage with:

    buildtool test
    scripts/matlab_batch.sh "buildtool test"
    scripts/matlab_batch.sh "buildtool testProject"
    scripts/matlab_batch.sh "buildtool testAppsGui"
  • If you depended on checked-in MATLAB Project files, regenerate local project state from labkit_ProjectGovernance_app.

  • If you depended on old test paths, use tests/runLabKitTests.m selectors or the build tasks in docs/testing.md.

Getting Started

From MATLAB at the repository root:

labkit_launcher

To initialize paths without opening the launcher:

startup_labkit

To create a new app:

labkit_ProjectGovernance_app

CLI-style scaffold creation uses the same app-owned operation:

startup_labkit
project_governance.ops.createLabKitApp("Family","image_measurement", ...
    "Slug","surface_roughness", ...
    "Label","Surface Roughness")

Validation

The release commit is b419b6b0b93147fc62ca08c7b68e2febd0a88a27.

Local validation for the DIC bugfix:

  • git diff --check
  • runLabKitTests('Suites','apps/dic','IncludeGui',false)
  • runLabKitTests('Suites','gui/apps/dic/dic_postprocess','IncludeGui',true)
  • buildtool testUnit

GitHub Actions:

Known Limits

  • Automated GUI tests validate launch, layout, callback wiring, debug plumbing, and selected gesture behavior. They do not replace manual review of full lab workflows, file dialogs, or visual judgment inside MATLAB.
  • App-specific scientific assumptions, thresholds, exports, and plot wording remain owned by each app. +labkit intentionally stays small.