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

The examples in the document are inconsistent with the API interface #410

Open
nighthink opened this issue Apr 9, 2024 · 1 comment
Open
Labels
documentation Explaining how things work! good first issue Easy issue good for newcomers

Comments

@nighthink
Copy link

I'm so grateful to the authors for this great package, it helped me tremendously! But when I was reading the documentation recently, I found that the calling order of parameters in the sample code of produce_or_load was inconsistent with the API description. Documentation at https://juliadynamics.github.io/DrWatson.jl/stable/real_world/#Stopping-%22Did-I-run-this?%22. The example is given by

N = 2000; T = 2000.0
data, file = produce_or_load(
    datadir("mushrooms", "toy"), # path
    @dict(N, T), # container
    simulation; # function
    prefix = "fig5_toyparams" # prefix for savename
)
@unpack toypar_h = data

However, the definition of produce_or_load is given by

produce_or_load(f::Function, config, path = ""; kwargs...) -> data, file

Their parameter order is reversed, will this work fine either way?

@Datseris Datseris added good first issue Easy issue good for newcomers documentation Explaining how things work! labels Apr 9, 2024
@Datseris
Copy link
Member

Datseris commented Apr 9, 2024

happy to see a PR that corrects the outdated example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Explaining how things work! good first issue Easy issue good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants