Skip to content

[refactor]: separate out convert output processes by model into own files - #429

Open
Schiano-NOAA wants to merge 8 commits into
docs-pkg-ex-datafrom
docs-gha-update-data-mod
Open

Schiano-NOAA wants to merge 8 commits into
docs-pkg-ex-datafrom
docs-gha-update-data-mod

Conversation

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator

place model approaches into own R files to setup improvement for testing and example datasets

@Schiano-NOAA
Schiano-NOAA added this pull request to stack #430 October 19, 2026 20:32

@sbreitbart-NOAA sbreitbart-NOAA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that, if I want to convert BAM output, I'll use conout_bam()? I recommend continuing to use convert_output() for all models, but putting conout_ss3(), conout_rceattle() and conout_bam() into that function. It'll keep users' workflows the same while continuing to modularize the conversion steps to individual functions (which I agree with!) Ex:

convert_output() <- function(
if BAM conout_bam(...)
if SS3 conout_ss3(...)
)

etc.

@Schiano-NOAA

Schiano-NOAA commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA no nothing changes for the user. It is just for maintenance and easier testing/updating example data. That's why they aren't exported. There should be an ifelse statement checking for the model then calling each of the sub fuctions.

@sbreitbart-NOAA

Copy link
Copy Markdown
Collaborator

Oh! I see now (there was so much deleted code I didn't see the new additions). You're doing what I was hoping for!

  • Could you please add documentation for these new fxns?
  • Also, this didn't work for BAM for me:
test <- convert_output(here::here("inst", "extdata", "VermilionSnapper.rdat"))

Error in conout_bam(file = file, out_new = out_new, fleet_names = fleet_names) : 
  object 'model' not found
  • Does this work for r4ss-converted ss3 data? I didn't see an option for that filetype.
  • Lastly, I see the fxn differentiates between two types based on ".RDS" vs ".rds" extension (wham/fims). Would it be possible for the authors to have data that's not expected by the fxn simply because it was changed to be all upper or lowercase? Wondering if testing by file extension is sufficient for wham vs fims.

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

Oh! I see now (there was so much deleted code I didn't see the new additions). You're doing what I was hoping for!

  • Could you please add documentation for these new fxns?
  • Also, this didn't work for BAM for me:
test <- convert_output(here::here("inst", "extdata", "VermilionSnapper.rdat"))

Error in conout_bam(file = file, out_new = out_new, fleet_names = fleet_names) : 
  object 'model' not found
  • Does this work for r4ss-converted ss3 data? I didn't see an option for that filetype.
  • Lastly, I see the fxn differentiates between two types based on ".RDS" vs ".rds" extension (wham/fims). Would it be possible for the authors to have data that's not expected by the fxn simply because it was changed to be all upper or lowercase? Wondering if testing by file extension is sufficient for wham vs fims.

Yeah I can add some documentation, but will not be exporting it. I will test these all again. I ran the scripts based on the changes so idk how it's not working.

There should be an action for r4ss example data. It's within the conout_ss3 because they are sort of intertwined with the approach in the beginning.

Could you highlight the line for FIMS that looks at an rda? I don't anticipate people loading in data that way because it's an object in their environment like Rceattle, but they could still differentiate it by stating model = "FIMS" or "WHAM" in the arguments.

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

Nvm on the FIMS highlight. I found it and made an adjustment

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.

2 participants