Repository navigation
Call for Feedback on Repository #1
Replies: 9 comments 16 replies
|
Awesome! Standardized assessment folders and reproducible assessments are a dream. Looking at the structure, I think people (and I) will be confused on the difference between the I think it will also be important to have:
|
|
While I appreciate the objective of this type of template I have some misgivings of attempting to prescribe how assessment repos are setup. I've come to this conclusion from reviewing and being involved with a number of assessments. There is such a wide variety of inputs/outputs, necessary components etc. that they effectively, or at least efficiently, cannot be covered. For example, for some years this will be straightforward e.g., update assessment. But for a full assessment, you get into research track, mgmt track, iterative model changes, etc. A current working-ish example is Though this setup won't work for every scenario and probably won't work for some assessment software. How does this template account for years? Having separate I think that within the context of |
|
I think the repository name should start with "stock_assessment" then have the adjectives for the species at hand, e.g., "stock_assessment_lingcod_north", that way all repositories will be listed close together within an organization because each one will start with "stock_assessment_". Second, the "region" qualifier should be last. Because in the future, a population might be split between regions or grouped across regions, e.g., sardine. This way the repositories for a given species will all be similarly named with only the trailing words varying. Another idea but definitely not a have to: We could shorten "stock_assessment_" to be "SA_" so it isn't so long to type. |
|
I've had my own structure for our Caribbean assessments that isn’t all that different, though I’ve been creating entirely new repos for updates because I don't know how to do versioning yet. For example, my recent update repo for PR Caribbean Spiny Lobster (CSL) through 2024 is called SEFSC-SEDAR-Carib-91U-PR-CSL-2024. The name has our Region (SEFSC), notes it is a SEDAR, has our subregion (Carib), notes the SEDAR # and if it is an update (91U)... followed by the Island Platform, species short name and terminal year For context, my region is the Southeast (SEFSC/Caribbean) and my role is a stock assessment analyst. My root directory looks like this:
When I started working with Jason Cope's SAC a bit, I converged on having all my runs in a scenarios folder, with one folder per run. I write run-specific plots and diagnostics within those individual run folders, but save comparison plots across runs to the main figures folder. Most data-limited models in the Caribbean don't end up with just a single run. To keep the repo clean-ish, I have my gitignore set up to only push the four main SS files for each specific run, plus my R code/ and quarto/ files. I keep a script in the code folder that reruns all models, plots, and diagnostics (or just specific runs) using {foreach} to theoretically get back up running from a fresh clone. Note, Caribbean models don't take long to run. One detail to watch out for with the folder structure is that my setup works great for Quarto PDFs, but it breaks for HTML because the figures and tables end up too nested. I'm not sure if that’s been fixed yet, but I just stuck with PDFs because I definitely didn’t want to copy & move files or have append run names to all similarly named figure files into a figures/ folder at the root. If the template is going to eventually also have nice HTML easily posted as GitHub pages, it's worth double-checking how it handles deeply nested relative paths. Thanks for putting this together and reaching out! |
|
I really like the proposed structure. I set up my most recent assessment in a similar fashion and found that it worked really well. I support trying to create more standardization around how we organize our work, at least around the key items. I know there will need to be additional folders for other items associated with an assessment that may not fit the prescribed folder structure, and I think that is fine. Here is how I structured my most recent assessment: ├───data (rda files created by scripts in data-raw)
├───data-raw (R scripts that call functions to create processed data for the assessment)
├───date-exploration (R code used to understand the data)
├───data-tables (processed csv files)
├───R (functions used to process data)
├───man
└───report
│ └───figures
│ └───SAR_USWC_sablefish_skeleton_files (git ignored)
├───quarto_website
├───model (git ignored)
│ └───base_model
│ └─── folder with the current base model
│ └───sensitivities
└───presentations (revealjs files)
|
|
I've been working on updating the workflow for my assessment and have experimented with several options. I tried adopting your setup and came up with: https://github.com/afsc-assessments/EBS_pollock_stock_assessment With obvious "help" I tested the template concept using the 2024 EBS pollock assessment. The basic folder structure is useful. The additions that seemed most important for the generic template were a complete runnable example, clarification of whether this is an R package or project, guidance for organizing multiple assessment years, guidance for external or restricted data, dependency management, and a simple automated workflow test. Alaska assessments require additional conventions for model comparisons, diagnostics, projections, and review stages, but those are probably better demonstrated in regional examples than required by the general template. In summary, the basic R/, data-raw/, data/, scripts/, and report/ structure works well, but the exercise suggested that operational assessments may also benefit from:
Some of these are obvious things that probably don't need to be in a template; the list mixes
The OST template should probably remain lightweight. It does not need prescribed fields for Plan Team and SSC review, every diagnostic type, harvest projections, or milestone tags. Those conventions vary among regions and assessments. Potential gaps that affect whether the template works as advertised might be to:
|
|
I'll be happy to have a standard template and can work with whatever @Schiano-NOAA and the team come up with. Regarding the years issue, here's an option that has worked reasonably well for me: using a model naming convention that includes the year in the folder name so that all model folders can be just nested directly under "models". For example, in this assessment repo for the north and south lingcod assessments https://github.com/pfmc-assessments/lingcod/tree/main/models which @kellijohnson-NOAA and I created in 2021, we pushed
When lingcod is assessed in 2027, it seems like a reasonable approach would be to remove the majority of the 2021 models, leaving only the base model and a few other important alternative models or sensitivities while adding new 2027 models. If the old models are filtered early in the assessment process, it's possible that we would over- or under- filter, but it would be easy to refine that going forward, either adding back models from the tagged 2021 version of the repo or deleting those which aren't valuable any more. Aside from the models, it's hard for me to imagine that it's important to retain R code or document text from a previous assessment year in the active repo as opposed to the git history. I should add the caveat that my perspective comes from west coast groundfish perspective where most stocks are assessed infrequently, so we don't have that much experience updating assessment github repos. And it also seems like a generic OST template could be designed to allow users to use either year-specific folders or include the year in the model name to cover a range of preferences. |
|
How future-proof is the suggested approach of using tags/releases/worktrees within GitHub? Having seen many changes to operating systems, software, stock assessment approaches, etc. over the course of my career, I worry this solution may put everyone in a hard spot if some future owner of GitHub decides to remove (or charge exorbitant prices for) tags/releases/worktrees. |
|
Thank you all for your feedback so far! I have been keeping an eye on it and as it has slowed down, I will take into consideration your suggestions and make edits to this repo. I will also be getting back to you all regarding some of your thoughts. This has been such an an engaging conversation!! |
Uh oh!
There was an error while loading. Please reload this page.
🧾Background
In an effort to increase throughput and streamline stock assessment workflows, a team at NOAA Fisheries has been working on a potential end-to-end stock assessment pipeline that links many new and current efforts together. One piece of this pipeline is a standard repository for a stock assessment that would house all of the necessary files to run a stock assessment from data processing for the input file to building the stock assessment report. The intention of this repository is to be set up one time and maintained over time. This is a template repository meaning that the user copies it from the "Use this template" button in GitHub (similar to forking). The initial creation of the repository should replace the region and species for the stock in the title followed by stock assessment. Year is not an indicator in the repository title/name. This is intentional. Each successive assessment cycle uses the same repo for the region and stock, but uses the tagging function in GitHub to identify what scripts and files were current at the end of the process during that year.
The thoughts behind crafting this repository are:
devtools::load_all()to access their functions in a more efficient manner👍 Gathering Feedback
We are looking to gather feedback on this template repository. We are hoping the stock assessment community and others involved in the process can look over the structure and organization of this repository and provide details on what you like about it and how you would improve it.
Please indicate what region you are from and what your role is. This will help us gain insights into how each region (or person) approaches their organization of files. Feel free to also add in suggestions or mention anything that might be missing from this template.
Thank you for your participation!! 🥳
All reactions