Skip to content

Validate converted data before generating plots and tables - #448

Draft
Schiano-NOAA with Copilot wants to merge 2 commits into
mainfrom
copilot/nmfs-ost-445-check-data-function
Draft

Schiano-NOAA with Copilot wants to merge 2 commits into
mainfrom
copilot/nmfs-ost-445-check-data-function

Conversation

Copilot AI commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Passing unconverted model output to save_all_plots() produces repeated downstream failures. Add shared validation to reject malformed input immediately with guidance to run convert_output().

  • Validation: Internal check_data() requires a data frame containing label and estimate columns; accepts tibbles.
  • Coverage: Call validation first in save_all_plots() and all standalone plot/table functions accepting dat. Leave utility files unchanged.
save_all_plots(list(label = "biomass", estimate = 1))
# Error: dat is not the appropriate format. Have you run `convert_output()`?

Co-authored-by: Schiano-NOAA <125507018+Schiano-NOAA@users.noreply.github.com>
Copilot AI changed the title [WIP] Add check_data function to validate dat input structure Validate converted data before generating plots and tables Oct 30, 2026
Copilot AI requested a review from Schiano-NOAA October 30, 2026 15:03

This branch has not been deployed

No deployments
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.

check dat argument (and others) at the start of save_all_plots()

2 participants