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

Should create_*_parameters simply be constructors? #140

Open
glwagner opened this issue Dec 22, 2023 · 2 comments
Open

Should create_*_parameters simply be constructors? #140

glwagner opened this issue Dec 22, 2023 · 2 comments
Labels
question Further information is requested

Comments

@glwagner
Copy link
Member

There are many functions that take forms like

function create_uf_parameters(toml_dict, ::UF.ChengType)

It seems these are more straightforwardly defined as constructors, eg:

function ChengParams(toml_dict::Dict)

(If there is a better way to identify toml_dict than just ::Dict, even better.)

A second slightly related question is: why are these not in the source code? This leads to anti-patterns like

include(joinpath(pkgdir(SurfaceFluxes), "parameters", "create_parameters.jl"))

which I think should be discouraged?

@glwagner glwagner added the question Further information is requested label Dec 22, 2023
@glwagner
Copy link
Member Author

cc @kmdeck

@glwagner
Copy link
Member Author

Note this would presumably obviate the need for the extraneous UF.ChengType, for example, unless I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant