Skip to content

example for seaduck #123

@gaelforget

Description

@gaelforget

Hi @MaceKuailv

done

I added the dependencies to the conda and pycall extensions + a script example. See https://github.com/gaelforget/ClimateModels.jl/pull/122/files

For now this can only be used from the master branch. For example:

using Pkg
Pkg.add(url="https://github.com/gaelforget/ClimateModels.jl", rev="master")

And then

using ClimateModels, Conda, PyCall
p=dirname(pathof(ClimateModels))
f=joinpath(p,"..","examples","seaduck.jl")
include(f); demo_seaduck()

and ?demo_seaduck to see the docstring of that function.

next steps?

Would you be willing to build up the example and docstring in examples/seaduck.jl ?

1 the code (inside "demo_seaduck() = begin ..."

  • Right now the demo runs https://macekuailv.github.io/seaduck/one_min_guide.html and returns one number. We could already use this example for the CI (test/runtests.jl)
  • But for a more appealing example, with a nice plot at the end, I feel we could do https://macekuailv.github.io/seaduck/idealize_test/hor_stream.html -- or do you prefer another example?

notes :
- Since this will be run during the CI via GitHub action, examples should be small (compute, downloads, etc)
- via pull request as per normal

2 the docstring is the markdown bloc just above "demo_seaduck() = begin ..."

  • add a bit of text saying what seaduck is (e.g., a couple summary sentences from your docs) + link to your docs' url
  • add a bit of text about the test case that demo_seaduck runs (for now it is the one minute example)
  • add a plot using the Makie library in the code bloc indicated by ``` based on the output from demo_seaduck

e.g.

using CairoMakie
lines(rand(100),rand(100))

3 making a Pluto notebook

once the next version of ClimateModels.jl is released then we will be able to take the example from step 2 and put it in Pluto format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions