Skip to content

Organizing Functions and Major Changes #112

@Schiano-NOAA

Description

@Schiano-NOAA

*Preliminary list for review

General

  • @Schiano-NOAA Review unnecessary arguments @ end
  • @sbreitbart-NOAA Organize arguments in function based on priority Restructure argument order for all functions #81
  • Set defaults or required in place of NULL where applicable
  • @sbreitbart-NOAA Substitute cli in interface for messages and such throughout package (Check)
  • @Schiano-NOAA Update README
  • @sbreitbart-NOAA Add examples to README -- Sam did this when updating the README
  • @sbreitbart-NOAA Add more helpful error messages to assist users in debugging/understanding what's going on
  • @Schiano-NOAA Look at Ben’s code -- follow up in coworking
  • Change end_year default to current year Change end_year default #122
  • Choose a plot and a table that will contain all of the documentation that every other plot will inherit. For example, all tables inherit args from table_landings and all figures inherit args from plot_recruitment (for end)
    • Plot: @sbreitbart-NOAA suggests plot_biomass or plot_spawning_biomass because they have the most arguments (notably, ref_line and ref_point, which aren't covered in plot_recruitment, which is the plot from which the rest inherit their args)
    • Table: @sbreitbart-NOAA isn't sure, but is leaning towards table_bnc. Rationale: There are only 3 tables, all with the same args except for those associated with units. Indices has no units args; landings has one general arg (unit_label); bnc has three specific args (biomass_unit_label, catch_unit_label, sb_unit_label). It's probably easier for the user to see a simple unit_label when they're making one plot at a time, but if they're using save_all_plots() (which I'm guessing will be used frequently compared to the individual plots), then they'll need arguments with names that differentiate the unit types. In that case, I think we should consider giving each plot's unit-related argument a name that reflects the specific plot so that it can be easily inherited or copied into save_all_plots(). That would mean table_bnc would be the optimal plot here.

exp_all_figs_tables

@sbreitbart-NOAA #118

  • consider changing function name
  • prioritize arguments
  • remove any lists and set a default in argument
  • set defaults for ALL arguments

export_rda

@sbreitbart-NOAA #119

  • rename final argument to x or object
  • adjust so table or figure goes to respective table or figure folder (according to new formatting)
  • Set defaults/required

write_captions

@Schiano-NOAA

  • set defaults/required

For now, let's leave be all of the plotting and table functions. Since we might completely change their structure, I don't want to end up doing duplicate work. I think as we make adjustments to the functions after we agree upon the one, then we just keep in mind these concepts as we modify the code.

all figures/tables

  • Add more info to summarize and join fxns to reduce unnecessary messages/warnings in console
  • Think about making separate functions to calculate ref_line, ref_pt, etc.

key quantities

quantities are calc'd in write_captions*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions