DeepLeaf Yield DeepLeaf Yield

Farms, greenhouses, rows, cycles

The registry keeps your places in a fixed hierarchy. Every record hangs off one crop cycle, and every level belongs to one organization.

Hierarchy diagram: organization, which holds API keys, then farm, greenhouse with type, place and time zone, row with area, and crop cycle with cultivar and planting date. Under the crop cycle: walks, harvests, irrigation, readings, weather, fruit weights, and stored forecasts.Hierarchy diagram: organization, which holds API keys, then farm, greenhouse with type, place and time zone, row with area, and crop cycle with cultivar and planting date. Under the crop cycle: walks, harvests, irrigation, readings, weather, fruit weights, and stored forecasts.
Organization → farm → greenhouse → row → crop cycle.

The levels

Farm
A name. It groups greenhouses.
Greenhouse
A name, a house type (plastic, shade, cooled, or closed HVAC), an optional latitude and longitude for weather, and an optional IANA time zone. The time zone is how times without an offset are read from climate files. With no zone, they are read as UTC. Daylight-saving and other clock shifts come from the system's IANA time zone data.
Row
An optional name and area in m².
Crop cycle
Optional cultivar, planting date, plants per m², and area. Walks, harvests, irrigation, readings, weather, fruit weights, weekly summaries, and stored forecasts all belong to a cycle.

Edit names and details

The Setup page with the Edit greenhouse sheet open on the right. The sheet keeps the id demo-house and has fields for name, house type, time zone, latitude, and longitude, with Save changes and Cancel buttons.
Editing a greenhouse on the Setup page. The edit opens in a sheet; the id stays as it is.

On the Setup page (/app/setup), the organization tree lists every farm, greenhouse, row, and crop cycle. Edit on a level opens a sheet with its details; over the API, send a PATCH to the level's path. Fields you leave out keep their value. A cycle field sent as null is cleared.

  • You can change names and details: house type, location, time zone, area, cultivar, planting date, and density.
  • Ids can't be changed. To rename an id, create the new level and move data by re-logging it.
  • Changing a greenhouse's time zone doesn't move stored readings. They keep their UTC times.
  • Latitude and longitude are set together, or cleared together.

Import a greenhouse list

To set up many greenhouses at once, open Setup → Import greenhouses (/app/setup/import) and upload one CSV with one line per greenhouse. Download the template from the page; its columns are farm, greenhouse, house_type, area_m2, rows, row_length_m, fruit_type, planting_date, cycle_name.

  • Save it as UTF-8, with ; or , between columns. A file holds at most 500 greenhouses and 1 MB.
  • Preview lists what would be created and every line to fix. Nothing is saved until you press Apply.
  • Each greenhouse gets its rows and one crop cycle per row. A farm, greenhouse, row, or cycle that already exists by name is skipped, so importing the same file again creates nothing new.

Delete a level

A delete is refused while the level holds anything. The response is 409 and lists what is inside. To see the same counts first, read GET …/contents, which returns greenhouses, rows, cycles, walks, readings, harvests, irrigation entries, stored forecasts, weekly summaries, and fruit weight settings under that level.

Send ?cascade=true to delete the level with everything under it. In the app, Delete opens a confirmation that lists what goes with the level, and nothing is removed until you choose Delete everything.

The Setup page with a delete confirmation open for the row demo-row. It lists the counts of what would go with it, with Cancel and Delete everything buttons.
A delete on the Setup page lists what goes with the level first.
  • Saved walks are unlinked, not erased. The scored walk can still be opened by its id for a while, but it no longer counts toward any forecast.
  • Stored forecasts under the level are removed with it.
  • A delete can't be undone. Export the cycle to CSV first if you might need the numbers.