Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create unit tests #26

Closed
wants to merge 95 commits into from
Closed

Create unit tests #26

wants to merge 95 commits into from

Conversation

sbreitbart-NOAA
Copy link
Collaborator

Unit tests for package's functions

Schiano-NOAA and others added 30 commits November 13, 2024 09:38
Instead of recruitment plot providing a switch to plot, recruitment, SR, and rec devs they are in three separate fxns now:

- plot_recruitment

- plot_spawn_recruitment

- plot_recruitment_deviations
…t and spawning biomass functions

Split recruitment into recruitment time series, spawn-recruitment relationship, and recruitment deviations
…s creating figures or tables, and subbed it with static strings ("figure" or "table")
Add rda into reformatted functions
Reformat fxns and add rda functionality
…r write_captions to rda_dir for all fxns; added back in rda-related arguments
sbreitbart-NOAA and others added 28 commits December 17, 2024 13:45
-replaced placeholder quantities with real values
-updated workflow to improve how quantities are inserted into caps/alt text df
-updated file.path() --> fs:::path()
…d .Rd files

-included replacing export_rda param with make_rda param
-removed Fend and added R0 as vars
-removed old notes/code
…lative biomass & relative spawning biomass caption/alt text to figures
… whole number

-added quantites incl. Btarg, ssbtarg, and relative B, relative SSB, and relative recruitment max and mins
-updated alt text/caps csv with relative quantities
-change rounding to 2 digits
-add comment describing how caps_alttext_subbed is created
… underscores being recognized as special characters in latex script
Extracting numeric (key) quantities
* fix(bcn): reformat from very og version of creating table

* [dev] table_bnd: update fxn and finish initial go through of table and export

* [Initial] table_landings: first commit and basis laid for landing/catch table

* Add documentation to bnc table and redocument other fxns

* update(indices table): add more data manipulation to put in table format

* Update(plot-landings and plot_biomass): reflect changes made during dec 17th meeting

* update(add_theme): expand upon theme for flextables

* Update(table_bnc): checked and reformatted placement of rda - @sbreitbart-NOAA rda needs check

* Update(table_bnc): Updated rda-related code, fixed errors rounding characters (vs. numeric values), linked topic_label to table in caps/alt text template csv, returned table
-fixed bug in utils.R

As per check requested e33b541

* Update(plot sb): documentation - arg def was different than template

* update(table_indices): complete function to form functional table

* Update documentation

* feature(plot_indices): create new plot of indices by fleet - fully functional and tested

Testing not performed on rda

* fix(plot_indices): changed calculation of CIs for models using cv to measure error

* fix(plot_spawning_biomass): comment out old check for year

* fix(caps file arg): add option to change directory to where the caps_alttext csv dir is located

* update(exp_all_figs_tables): change make_rda in code to assignment instead of =

* Reformat fxns edits (#38)

* -Changed final table/figure expectation to always be "final"
-Updated table_indices to allow for rda export

* small fix

* Updated table_bnc so that final table is called "final"

* Updated plot_indices so that final table is called "final" and made fixes to enable rda export

* Updated other plotting fxns so that final figure is called "final"

* Updated labels in multiple plot_x fxns to match template labels with periods instead of underscores

* Fixed plot_spawn_recruitment label to match label in template; also changed bnc label to "bnc" for clarity

* update documentation

---------

Co-authored-by: sbreitbart-NOAA <[email protected]>
…igure/table; add in new fig/table fxns (table_bnc; commented-out plot_spawn_recruitment, table_landings, and plot_indices)
-added messages to signal when exporting is starting and ending
-added specific parameters for sb figure fxn (ref point, ref line)
-added ref point param for B figure fxn
-updated documentation
"expected_indices" will later be removed once time permites - I believe that this is inherited from previous versions of the converter
@sbreitbart-NOAA sbreitbart-NOAA deleted the make-tests branch January 2, 2025 19:56
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.

3 participants