nmfs-fish-tools / SSMSE

Management Strategy Evaluation (MSE) using Stock Synthesis (SS3)
https://nmfs-fish-tools.github.io/SSMSE
MIT License
18 stars 11 forks source link

Change column names per r4ss updates #216

Open e-perl-NOAA opened 1 month ago

e-perl-NOAA commented 1 month ago

Column header updates in r4ss in PR #945 will require updates in SSMSE functions such as those with FltSvy.

Additional changes in r4ss headers can be found in the PR files changed. Other ss3 names have changed - see r4ss commit for changes from F_report_basis to F_std_basis, F_report_units to F_std_units, SPR_report_basis to SPR_std_basis, and SPR_report to SPR_std.

k-doering-NOAA commented 1 month ago

I'm currently trying to fix this.

I think there are 3 approaches possible 1) SSMSE only works with r4ss < 1.50.0 (before the breaking changes) 2) SSMSE only works with r4ss >= 1.50.0 (after the breaking changes) 3) SSMSE works with either version of r4ss, taking into account the different names.

I'm currently thinking 2) may be the best option moving forward, as maintaining both sets of column names will be cumbersome. It is fairly straightforward for users to update to a newer version of r4ss (a little more difficult to roll back to an older version), and the newer names in r4ss are more consistent and clear.

If anyone disagrees, please feel free to chime in!

nathanvaughan-NOAA commented 1 month ago

@k-doering-NOAA I agree that option 2 is probably the best solution. We should also add a requirement in SSMSE for r4ss>=1.50.0 so that users get an alert if they have an incompatible r4ss version.

k-doering-NOAA commented 1 month ago

@nathanvaughan-NOAA thanks, I'm glad you agree!

I realized this is straightforward, but a little tricky because the SSMSE sample_struct object does not match with the r4ss names always, only sometimes, and I don't think we want to change the sample_struct names. Therefore, we'll need to find and replace ONLY the r4ss column names and not the original column names in sample_struct.

Alternatively, we could make the sample_struct names also match with the new r4ss names, which are more consistent and clear. This would be a breaking change in SSMSE, though.

nathanvaughan-NOAA commented 1 month ago

@k-doering-NOAA I'm busy at the Gulf SSC meeting for the next few days but I was thinking the same thing about the sample_struct naming issue. We have added a bunch of options to that for discards and custom MS inputs. Let me check in with @skylersagarese-NOAA, @CassidyPeterson-NOAA, @latreesedenson-NOAA, and @matthewsmith-NOAA when I get back for their thoughts. This could be a good opportunity to clean up name matches.