PIFSCstockassessments / ss3diags

R package with advanced diagnostics to evaluate a Stock Synthesis model. Diagnostics include residual analyses, hindcasting and cross-validation techniques, and retrospective analyses.
http://pifscstockassessments.github.io/ss3diags/
2 stars 4 forks source link

Smaller Example Data filesize #68

Closed efletcherPIFSC closed 9 months ago

efletcherPIFSC commented 1 year ago
❯ checking installed package size ... NOTE
    installed size is 12.4Mb
    sub-directories of 1Mb or more:
      data  11.9Mb

CRAN maximum (installed) package file size limit is 5MB

*.rda Datafile fileslzes

mcmcsimple.rda 152.8 KB
simple.rda 1.1 MB
retroSimple.rda 5.7 MB
MOshima-PIFSC commented 1 year ago

I don't think we will be able to reduce the data down to a size small enough for CRAN, even if we just submit it separately as a data package. I found this option that allows you to create a GitHub repo for a data package and allows users to install that package regularly using install.packages("datapackage") and then load the data via data("dataset", package="datapackage"). @efletcherPIFSC I'm wondering if it would be helpful to collaborate with the SS/r4ss team on developing this package, that way these example SS runs could be used by their package too? And it could be hosted by either the nmfs-stock-synthesis or r4ss organizations.

MOshima-PIFSC commented 1 year ago

We have decided to separate the data from the ss3diags package to keep functionality and allow us to publish on CRAN. Next steps:

MOshima-PIFSC commented 1 year ago

I created the FEAT-update-testing-fixture branch to work on this. Based on communication with the r4ss team, we are going to remove the simple SS model in our data folder and use the simple_small SS model. Since r4ss is a dependency of ss3diags we can call the simple_small Report.sso using system.file("extdata", "simple_small", package= "r4ss"). To run the retrospective and hindcast tests (SSmase_test.R, test-HCxval.R, and test-retro.R), we can add something like this to the test fixtures to run the retrospectives. The SS executable can be retrieved via a github action.

MOshima-PIFSC commented 1 year ago

Currently tests are running and passing on unbuntu set up. Next step is to add in windows and mac OS to config matrix. @efletcherPIFSC I created an inst/extdata directory and put the input files in there and am copying the ss exe to there. Then in the tests I am copying all those files to a temp dir and running retrospectives there. If we do this, we should be able to delete the simple.rda, retroSimple.rda, and mcmcSimple.rda objects later on. Before we remove them from the package we will need to update the documentation so that these objects are created at time of knitting the docs. What do you think about this?

MOshima-PIFSC commented 1 year ago

Tests are running and passing on all OS configurations now (ubuntu, windows, and macOS). The next step would be to update the documentation and vignettes to use these model structures. Adding this issue to milestone "Documentation".