diff --git a/.github/workflows/qupath-gui.yml b/.github/workflows/qupath-gui.yml index 3481ffe..c06fdd0 100644 --- a/.github/workflows/qupath-gui.yml +++ b/.github/workflows/qupath-gui.yml @@ -1,7 +1,7 @@ name: qupath-gui # The GUI tests (tests/gui_test_*body.groovy) in a real QuPath 0.7 on a virtual screen (Xvfb), the same way tests/run_gui_test.sh runs # them locally: the extension jar built from this repo is put on QuPath's class path and each body is run as QuPath's test script. -# tests/run_gui_ci.sh runs every body, keeps a log per body and fails when any body fails. See README, "Build and test". +# tests/run_gui_ci.sh runs every body, keeps a log per body and fails when any body fails. See docs/REFERENCE.md, "GUI tests in CI". on: pull_request: workflow_dispatch: diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..49c844e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,13 @@ +# Notes for agents and contributors + +LabConstrictor-QuPath is the QuPath 0.7 extension that runs the tools of installed LabConstrictor apps. How to build it and run the tests: [technical reference](docs/REFERENCE.md#build-from-source-and-test). + +## Documentation + +Each topic of the LabConstrictor ecosystem has exactly one owner page, and every other page links to it instead of copying it. The table of owners is in "Sources of truth" in [LabConstrictor-Site's AGENTS.md](https://github.com/CellMigrationLab/LabConstrictor-Site/blob/main/AGENTS.md). + +- This repository owns the **QuPath guide**, `docs/user-guide.md`: what you need, the install steps, the menu path, the current version and the common problems. The site publishes it at , so every link and picture in it must be an absolute address. +- `README.md` is a landing page: it gives one install line and links to the guide. It names no version of the extension. +- `docs/REFERENCE.md` holds the technical rules, the build and the tests. It links to the guide for installing and using the extension. +- When a release changes the current version, update it in `docs/user-guide.md` only. +- Write as the site does ([LabConstrictor-Site's DESIGN.md](https://github.com/CellMigrationLab/LabConstrictor-Site/blob/main/DESIGN.md)): sentence case, plain words, and link text that says where it goes. diff --git a/README.md b/README.md index 6403d5d..5b988d8 100644 --- a/README.md +++ b/README.md @@ -1,224 +1,47 @@ -# LabConstrictor-QuPath +# LabConstrictor for QuPath -Runs the tools of every installed LabConstrictor app (apps meant for QuPath: Playground, NucleiSky, Guess the Condition, StarDist2D) from **Extensions > LabConstrictor tools...** in -QuPath 0.7. The form is generated from the tool's declared schema ([LabConstrictor-Tools](https://github.com/CellMigrationLab/LabConstrictor-Tools), -`docs/PROTOCOL.md`); the tool runs in the app's own Python environment through the LabConstrictor worker (JSON lines on stdin/stdout), -so QuPath never imports the app's packages and needs no Python of its own. Same idea as the Napari and Fiji front-ends. +Run the analysis tools of your LabConstrictor apps from inside [QuPath](https://qupath.github.io). One window lists every installed app: pick an app and a tool, and run it on the image that is open. Outlines and points come back as QuPath annotations on your image; tables, values and result images open in a results window. The analysis runs in the app's own Python environment, so QuPath needs no Python setup. -## Install -1. Install a LabConstrictor app (for example Playground, NucleiSky or Guess the Condition): its installer registers the app and its tools (check with `labconstrictor-tools list`). -2. Download `labconstrictor-qupath-.jar` from the [Releases page](https://github.com/CellMigrationLab/LabConstrictor-QuPath/releases), drag it onto the QuPath window (or copy it into the extensions folder shown in QuPath's Preferences) and restart QuPath. -3. Open **Extensions > LabConstrictor tools...** - -For scripters, a second way that needs no jar: download the **single file** `LabConstrictorTools-all.groovy` from the same release (the whole script in one file), open it in QuPath's Script Editor and run it. This all-in-one file is what the Script Editor needs: the script in the repository is split into the part files listed in `parts.txt`, and those do not run on their own in the Script Editor (the jar joins them itself). - -Install page for the apps and all three hosts: [Tools `docs/INSTALL.md`](https://github.com/CellMigrationLab/LabConstrictor-Tools/blob/main/docs/INSTALL.md). Apps declare which hosts list them (`hosts:` in their `labconstrictor-app.yaml`; Tools feature `app_hosts_v1`, PROTOCOL.md section App hosts). Apps without a declaration (installed with an older installer) are listed in every host and the Log says so ("declares no hosts"). Intended for QuPath: Playground, NucleiSky, Guess the Condition and StarDist2D. **VLab4Mic is not listed in QuPath** (it is for Napari and Fiji), and CellTracksColab is notebook-only. Report problems in the [issue tracker](https://github.com/CellMigrationLab/LabConstrictor-QuPath/issues). - -Every release lists the QuPath version it was built against and the minimum Tools version in its notes; `SHA256SUMS` holds the checksums of the files. - -**QuPath versions and systems.** Built against QuPath **0.7.0**; QuPath 0.7 is built with Java 25 and the jar needs it, so older QuPath versions are not supported, and other 0.7.x versions are not tested. -* **Linux**: tested in CI (QuPath 0.7.0 on a virtual screen: the whole GUI test suite on every pull request, and the smoke test of the exact release jar before a release is published; a broken jar is not published). -* **macOS (Apple silicon) and Windows**: tried by the release workflow with the same jar in the QuPath 0.7.0 build of that system (menu entry, dialog, a registered app in the list, quoting, trust checks, results folders, clean-up). These runs inform but never block a release; see the job summary of the "release" workflow for the latest result. Last dry run: macOS all steps passed; Windows: the jar loads, the dialog opens and lists the app, the results-folder test passes; three of the test bodies fail there because they use POSIX tools or POSIX file permissions (the Windows trust note: the owner/mode checks of the registry do not exist on Windows, so a group-writable entry is accepted; the clean-up test needs `chmod`), so the clean-up while a results folder is in use is **not** verified on Windows. Not tested by a person on either system. - -### Troubleshooting -* No entry **Extensions > LabConstrictor tools...**: the jar needs QuPath 0.7 (Help > About shows the version); restart QuPath after adding the jar and check that it is in the extensions folder. -* "No LabConstrictor app is registered on this machine": install a LabConstrictor app first, then press **Rescan apps**. -* An app is listed as skipped, or a run is refused with "... labconstrictor-tools X is older than the 0.3.0a1 this host needs: update it": update the app (its Tools must be 0.3.0a1 or newer). -* The log is `~/.labconstrictor/logs/labconstrictor.log` (or `$LC_HOME/logs/`); the status line and **Details** of the window show what failed. - -Needs **labconstrictor-tools 0.3.0a1 or newer** in the app's environment (the run record and the clean-up use its helpers and its `prune` command). A run of an app with an older one is refused with `this app's labconstrictor-tools 0.2.0rc1 is older than the 0.3.0a1 this host needs: update it`. - -## What it does -* Pick an app and a tool. Numbers (range, unit), choices, checkboxes, text, files and folders become fields; parameters of a group sit under a heading, advanced ones in a collapsed section, optional ones without a default have a "set" box (unticked = the tool gets nothing), and `enabled_when` greys fields out. -* **Input help (ⓘ)**: an input with a description has an ⓘ after its label. Hover over the ⓘ (or the label) to read the description; click the ⓘ to keep it open (it closes at a click elsewhere or Escape). Moving into the input with Tab shows it under the input. An input without a description has no ⓘ (Tools #147). -* **Image inputs**: the image open in QuPath, any image of the open project, or a file. QuPath's image is exported losslessly as TIFF (the whole image, or the part chosen under **Image area**, see below). The pixel size of the chosen image or typed file fills the tool's pixel-size field (see **Pixel size** below). -* Results open in a window: values, tables (as a table: the first 100 000 rows, then "table 'name' (N rows, first M shown; the full table is in P)", the Napari wording; cells with commas, quotes and line breaks are read as CSV says, by one reader (`LcCsv`) for tables and points: a record is one row or one point however many lines it spans, and a malformed file, a points file without `y` and `x` columns or with a coordinate that is not a finite number is said in one sentence naming the record, never shown or placed partly), images (a preview, the path and an "Open in QuPath" button), alignment matrices, files, messages (also shown under the status line) and points. -* **Interaction hints** of the manifest: a `choices_from` parameter is a dropdown filled by another tool of the app (a text field when that tool cannot answer), `clear_after_run` parameters are reset after a successful run, a `Collapsed` group is a folded section, and an output with `Replace()` reuses the results window of the tool instead of opening a new one. -* **Channel selector**: an image input declared with `PickChannel()` gets a Channel chooser (the channel names of the chosen image, or of a file); the tool receives only that channel. -* **Points** found in the image that is open in QuPath become a point annotation named `:` (replaced by the next run when the output declares `Replace()`); points of any other image are shown as a table. -* **Outlines** found in the image that is open in QuPath become annotations of classification `:` with their numeric properties as measurements, named `: