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

g3_parameterized: Add help option #116

Open
lentinj opened this issue Jul 27, 2023 · 3 comments
Open

g3_parameterized: Add help option #116

lentinj opened this issue Jul 27, 2023 · 3 comments

Comments

@lentinj
Copy link
Collaborator

lentinj commented Jul 27, 2023

A help parameter that results in a "help" column in the parameter template, e.g:

g3_parameterized('rec.sd', by_stock = TRUE, by_step = TRUE, help="Recruitment std. deviation")

... which gets translated into ...

g3_param("rec_sd.ling.1", help="Recruitment std. deviation for Ling, step 1")

... which populates the help column.

Worth pursuing?

@willbutler42
Copy link
Collaborator

Having the option could be useful. For instance, when sharing models, or working with complex models with multiple stocks/substocks. If the by_stock parameter was a name_part, would the idea be to collapse the stock names? For example, if you had two stocks:

smat <- g3_stock(c(species = "ling", "mat"), c(2,3,4))
simm <- g3_stock(c(species = "ling", "imm"), c(1,2,3))

Using g3_parameterized("k", by_stock = "species", help ="Growth parameter K")

would translate to:

g3_param('ling.k', help = "Growth parameter K for ling_mat, ling_imm") or something similar?

@lentinj
Copy link
Collaborator Author

lentinj commented Aug 4, 2023

I was thinking Growth parameter K for for ling_*, but yeah. Basically the same mangling we do for the parameter name, but to something more user-understandable.

@lentinj
Copy link
Collaborator Author

lentinj commented Nov 30, 2023

As opposed to hard-coding the help, another approach might be a g3_to_help() function, that tells you which action(s) want this parameter. You can then read the relevant documentation to find out what it means. This might be a better approach than shovelling long strings about with the parameters.

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

No branches or pull requests

2 participants