Skip to content

Move closure scenarios from YAML to SQLite - #432

Draft
anna-abelman with Copilot wants to merge 10 commits into
masterfrom
copilot/update-closure-functionality
Draft

anna-abelman with Copilot wants to merge 10 commits into
masterfrom
copilot/update-closure-functionality

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Closure scenarios are now database-backed, and the policy UI supports selecting closures from existing spatial or grid variables. This removes runtime YAML dependencies from closure creation, simulation, polling, and table discovery.

  • Closure selection UI

    • Adds Select Existing Variable mode.
    • Populates selectable columns from spatial and grid data.
    • Selects matching second_location_id values and updates the map/TAC table.
  • SQLite-backed scenarios

    • Replaces YAML reads in simulations with get_closure_scenario(project).
    • Polls locdatabase(project) modification time for closure changes.
    • Registers <project>ClosureScenarios as a serializable, discoverable table type.
  • YAML cleanup

    • Removes yaml from package imports and namespace.
    • Removes closure YAML output mappings.
    • Updates closure simulation tests and generated documentation.
all_closures <- get_closure_scenario(project)

if (is.null(all_closures) || length(all_closures) == 0) {
  stop("No saved closure scenarios found. Run zone_closure() first.")
}

Copilot AI and others added 3 commits August 19, 2026 22:28
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Co-authored-by: anna-abelman <165065127+anna-abelman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants