Skip to content

Multi trial allocation tool#6078

Open
chris263 wants to merge 42 commits intomasterfrom
topic/new_trial_design_method
Open

Multi trial allocation tool#6078
chris263 wants to merge 42 commits intomasterfrom
topic/new_trial_design_method

Conversation

@chris263
Copy link
Copy Markdown
Contributor

@chris263 chris263 commented Apr 30, 2026

Description

This PR adds and improves the Trial Allocation tool for multi-trial field layout planning. It supports interactive trial placement on a grid, saving and loading multi-trial layouts, adding new or existing trials to saved layouts, generating planting tools, and improved augmented row-column design generation.

Main Changes

  • Added interactive grid-based trial allocation with trial movement, rotation, directional plotting, borders, unused plots.
  • Added multi-trial layout persistence using nd_geolocationprop.value with the multi_trial_layout_json cvterm.
  • Added layout retrieval by location, year, and optional season to avoid overlapping allocations at the same site.
  • Added saving of new trials into the database from the allocation view, while preserving/fixing already saved trials.
  • Added support for including existing experimental trials for the selected location/year and updating their plot coordinates/layout JSON.
  • Added curator-only delete actions for trials/layouts.
  • Added improved hover information for plots, borders, unused regions, accession names, coordinates, row, and column.
  • Added planting map/tool export as .xlsx.
  • Added trial allocation graphics for trial area and plot-use summaries.
  • Added config-driven season dropdown via available_seasons.
  • Renamed user-facing “Treatments List” wording to “Accessions List”.

Design and Workflow Improvements

  • Reworked the page title and workflow guidance to better match Breedbase UI conventions.
  • Collapsed the Trial Allocation Summary by default.
  • Replaced fixed “Number of Trials” input with an Add Trial button.
  • Moved plot width/length settings into each trial configuration.
  • Added per-trial controls near the grid for direction and rotation.
  • Improved handling of saved layouts so existing trials are frozen while new trials can still be added and saved.

Augmented Row-Column Design

  • Added/updated augmented row-column support in R/augmented_row_column.R.
  • Preserves existing parameter loading and .design output format.
  • Keeps check plot placement constrained so checks do not share rows/columns inside blocks.
  • Prevents the same check accession from repeating in the same field row or column across blocks.
  • Maps temporary treatment placeholders back to original accession names before saving.

closes #4361
closes #4434
closes #4788
closes #4941

Checklist

  • Refactoring only
  • Documentation only
  • Fixture update only
  • Bug fix
    • The relevant issue has been closed.
    • Further work is required.
  • New feature
    • Relevant tests have been created and run.
    • Data was added to the fixture
      • Data was added via a patch in /t/data/fixture/patches/.
    • User-Facing Change
      • The user manual in /docs has been updated.
    • Any new Perl has been documented using perldoc.
    • Any new JavaScript has been documented using JSDoc.
    • Any new legacy JavaScript has been moved from /js to /js/source/legacy.

chris263 added 30 commits April 14, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant