Skip to content

Config Builder

brookie edited this page Nov 18, 2026 · 7 revisions

Config Builder

The Config Builder is a graphical, no-code editor for the YAML files that drive the annotator. It writes the same project / config / form files documented in Configuration, Configurable Forms, and Projects and Launcher — so anything you build here can also be hand-written, and vice-versa.


Opening the Config Builder

Three ways in, all no-code:

  • Launcher tile — click the Bioacoustic Annotator tile in the JupyterLab launcher (under "Other"), then pick Config Builder in the chooser dialog (the chooser also offers Notebook and Annotator).

  • Command palette — run "Bioacoustic Config Builder" (bioacoustic:open-config-builder).

  • From Python — embed it in a notebook output cell:

    from jupyter_bioacoustic import ConfigBuilder
    ConfigBuilder().open()

The builder opens with a working-directory label in its header — all file paths you enter are resolved relative to it. Use the folder button next to the label to change it.


Layout

Area What it does
Left pane The editing sections (Setup, Configuration Files, Data, Audio, Output, App, Form, Description) as collapsible cards.
Right pane Live preview — toggles between Docs (field help) and YAML (the three generated files in tabs). The YAML is editable: edit + Apply writes your changes back into the builder.
Bottom bar Validate, Save Configuration Files, Open Annotator (or Save & Open Annotator when there are unsaved changes), Dismiss.

Editing any field updates the YAML preview and the config summary immediately.


Setup

The Setup section is how you start. It has three tabs:

  • Create New — name your project; the builder fills in default file paths (annotator_config/projects/<slug>.yaml, …/config/<slug>.yaml, …/forms/<slug>.yaml).
  • Create from Template — start from a curated, partially-filled config (see below).
  • Load Existing — open an existing project / config / form file; the builder auto-detects the file type, follows any config: / form_config: references, and populates every section.

Configuration Files

The Configuration Files section manages the three files a project is built from:

File Holds
Project The complete, self-contained spec (the file the launcher opens).
Config Reusable base settings that multiple projects can share.
Form The annotation form definition.

For each file you can:

  • Enable / disable it with the checkbox (a disabled file isn't written).
  • Linked — keep the three filenames in sync with the project name.
  • Duplicate / Rename — unlock the paths to save under new filenames. Saving then creates copies of the existing files, leaving the originals untouched — your chance to start a new config from an existing one.
  • Lock 🔒 — see File locking.

File locking

Each file has a lock button (left of its checkbox). When a file is locked:

  1. It is skipped when you save — its on-disk contents are left untouched.
  2. Every field that would write to that file is disabled, with a small padlock marking why.

This lets you edit one file while guaranteeing another is left exactly as it is — useful when several projects share a locked base config or form file. While any file is locked, the per-section target dropdowns are frozen (changing a target could move fields into or out of a locked file).


The config sections

Each section edits one slice of the configuration:

Section Edits
Data The clip source — source_type + value, index column, start/end-time columns, duration, secrets.
Audio Per-clip audio — source_type + value, prefix/suffix/fallback, secrets.
Output Where annotations are written — path, index column, sync uri + button, recursive, secrets.
App Widget/layout — display columns, info card (and hide_info_card), collapse toggles (playlist / spectrogram titles, which sections start open), buffer, frequency range (freq_min / freq_max, kHz), capture, panel heights. See Layout and Collapsible Sections.
Form The annotation form (elements, tools, select items, multiselects, buttons, row / column / grid layouts, hot keys, dynamic forms). See Configurable Forms.
Description An optional markdown description panel.

Target routing

Each section header has a target dropdown that decides which file its settings land in:

  • Project — write everything to the project file.
  • Config — write everything to the config file.
  • Split — distribute keys across both: the source keys (value/source_type/paths/secrets, and output path/sync) go to the project file, while the interpretation keys (index column, time columns, prefix/suffix, etc.) go to the config file.
  • Form — (Form/Description) write to the form file.

Defaults: Data / Audio / Output → Split, App → Config, Form → Form. This is what lets the same UI emit one combined project file or up to three reusable files.


Multiselect

+ multiselect in the Form section adds a multiselect card. Below the label, Output sets how the tags are saved, and only that format's fields are shown:

  • list: the output column (required; it follows the label until you edit it) and an optional delimiter. Blank saves a list ["a", "b"]; a delimiter such as ; saves the text "a;b".

    Multiselect card, list format
  • vector: the same, plus true_value / false_value (default 1 / 0): a one-hot list such as [1, 0, 1].

    Multiselect card, vector format
  • columns: no output column (there is one column per item), an optional column_prefix (default none) and true_value / false_value.

    Multiselect card, columns format

Then come required, min tags / max tags, and the same items source as a select. Items read from file also offer an id column: save that column (e.g. a class index) while the tags show the names. An item added with a form shows that dynamic form while it is tagged.

Side form

At the top of the Form section, side form → beside the spectrogram writes side_form: true, and split writes side_form_split (the spectrogram's share of the width, e.g. 0.66; blank = the default 2/3). See Side Form.

Below it, no submission buttons writes submission_buttons: false (no Prev / Skip / Submit row; it overrides a submission_buttons card) — for forms that submit with a button's submit.

Buttons

+ button (User Input) adds a button card:

  • icon (text, a symbol, or a built-in like jba:check) or image (Browse for a file), label (tooltip)
  • column + value, submit, required, initial_value (the column's value while nothing is pressed). Numbers typed into value fields are saved as numbers.
  • color / background, and pressed_icon / pressed_image / pressed_color / pressed_background for the pressed look
  • size (px, default 30), hot_key, show hot key badge (off by default; writes show_hot_key: true), and pressed ring / fade group (on by default; unchecking writes highlight: false)
  • toggle states: + state adds a row (value, icon, image, ×). With states the button is a toggle.

Layout: row, column, grid

The Layout group of the add bar adds + row, + column and + grid cards. A layout card has its options and, below them, its own add bar and card list: elements added there go inside the container. Containers can hold containers (e.g. a column of rows), and their cards can be reordered with ▲ / ▼ or dragged within the same list.

Field Saved as
columns (grid only) columns
gap (px) gap
align align (start is the default and isn't written)
button column column — the output column for the buttons inside without their own
unique unique: (per column) (default, not written), true or false
delimiter delimiter (for a non-unique shared column; default ,)

A container without options is saved as a plain list (row: [...]); with options as {options..., items: [...]}. Loading a form with nested containers rebuilds the same cards, and saving it again writes the same YAML. Submission buttons can't go inside a container.

Hot keys

Select and multiselect cards have a hot keys list: + hot key adds a row with the key (one character) and the item value it picks; rows with a blank key or value aren't saved. pin hot-keyed items first writes pin_hot_keys: true. Button hot keys are the button card's hot_key field. See Hot Keys.

Data & Audio sources

Both Data and Audio use the source_type + value model (see Configuration › Data Sources).

Auto-detected source type

Type or paste into the value field and the source type follows automatically: a value with a remote scheme (https://, s3://, gs://, …) selects url (or url/uri for audio); anything else selects path. A deliberate sql / api (data) or column (audio) choice is left untouched.

Remote Load (Data)

When the data source is a URL/URI (including s3:// / gs://), the builder auto-loads the file's columns so the index/time-column dropdowns populate — no Browse needed. A green ✓ / red ✗ next to the value shows whether the load succeeded; it retries automatically when you add secrets. sql / api sources use an explicit Load button (so a query isn't run on every keystroke).

Validate (Audio)

For a URL/URI audio source, a Validate button confirms the remote file is reachable and reports its sample rate (and, for FLAC, duration — read from the file header without needing ffmpeg). A ✓ / ✗ shows the result.


Create from Template

The Create from Template tab starts you from a curated config and asks only for the deployment-specific bits (file paths and the column names that depend on them).

Shipped templates: annotate, review_detections, quick_validate (derived from the demo projects).

  1. Pick a template — its description renders, along with a scope selector, a name box, and an input form.
  2. The scope (project / config / form) chooses which files the template fills and saves.
  3. Fill the inputs. Required fields are marked in the builder's teal/green; widgets are inferred from each field's role — a file path gets a Browse button, a column name gets a dropdown populated from the file you chose.
  4. Save — the builder validates, prompts on overwrite, writes the files, and collapses Setup. Reopen Setup to see the saved (greyed-out) form with an Edit button.

Validate, Save, Open

  • Validate — runs the same checks as ba.validate() and jba validate, so all three report identical errors and warnings.
  • Save Configuration Files — validates, prompts before overwriting, and writes every enabled (and unlocked) file.
  • Open Annotator — launches the annotator on the saved project in the same kernel. When there are unsaved changes the button reads Save & Open Annotator and saves first.

See also

  • Configuration — the full config-file schema the builder writes.
  • Configurable Forms — the form definition the Form section builds.
  • Projects and Launcher — opening saved projects with no code.
  • CLI — jba validate / jba list / jba describe for the same files from the terminal.

Clone this wiki locally