Oceananigans.jl
Oceananigans.jl copied to clipboard
Can we build examples separately from `makedocs`?
Our suite of examples is fairly expensive; in recent runs the documentation build exceeds 90 minutes.
If we're able to "build" the examples first, before calling makedocs:
https://github.com/CliMA/Oceananigans.jl/blob/8da72d122f887c1584d8c6f0bb5d4eea27e003d3/docs/make.jl#L155-L165
we can probably speed up the build. This is crucial now because we need to add new examples both for HydrostaticFreeSurfaceModel and for simulations in complex domains via ImmersedBoundaryGrid. We can also move some examples to the GPU and either speed them up, run them at higher resolution, or both.
What I know now: we provide .md files to makedocs, which then expands code blocks and generates .html:
https://github.com/CliMA/Oceananigans.jl/blob/8da72d122f887c1584d8c6f0bb5d4eea27e003d3/docs/make.jl#L66
https://github.com/CliMA/Oceananigans.jl/blob/8da72d122f887c1584d8c6f0bb5d4eea27e003d3/docs/make.jl#L133
https://github.com/CliMA/Oceananigans.jl/blob/8da72d122f887c1584d8c6f0bb5d4eea27e003d3/docs/make.jl#L159
I think one solution is to generate the .html (by running code, which generates images and animations + links in the html) in separate buildkite jobs, and then somehow generate links to the pre-built .html in the "primary" make.jlcall to makedocs before deploydocs.
I don't know this fits here, but I was thinking about a way to have a separate repository for examples from community that doesn't affect the test running time of the main repo.
The repo could generate a wiki-like page with the examples. We could give a code template for the simulations. For instance, all simulations must inform and check the version of Oceananigans and it's dependencies. Or maybe containing a yml equivalent for Julia project. What do you guys think?
I know this can get messy.. but it could be a nice way to avoid people reinventing the wheel while making their own simulations. With enough time, almost any experiment will have some others similar.
I think we'll want a "community repo" for cases eventually.
Something like https://github.com/FluxML/model-zoo if I understand the purpose of that correctly.
For instance, all simulations must inform and check the version of Oceananigans and it's dependencies. Or maybe containing a yml equivalent for Julia project.
Isn't an ordinary Julia environment enough? For the community repo I think either
- There is one repo-wide
Project.tomland all examples are kept up to date or - Each example has it's own
Project.toml.
As I understand the flux model zoo takes approach 1 (this is in principle better, because otherwise the examples grow stale and cease to be useful). However, that requires maintenance and substantial effort.
I think we will still want in-house examples in addition to an external community repo.
Duplicate of #1053