-
Notifications
You must be signed in to change notification settings - Fork 14
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
Cm/docs canon #193
Cm/docs canon #193
Conversation
src/canon/docs_test.jl
Outdated
|
||
macro create_pode(modelname,source,variable,pode) | ||
quote | ||
local v1 = $(esc(modelname)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don’t need the local on this.
src/canon/docs_test.jl
Outdated
|
||
$v3 | ||
|
||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the “”” you want to have const $modelname = @decapode begin $pode end
src/canon/docs_test.jl
Outdated
end | ||
|
||
for (modelname,link,variable,pode) ∈ db | ||
@eval @create_pode $modelname $link $variable $pode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you replace @create_pode
with a function create_pode
then the line here can be
eval(create_pode(modelname, link, variable, pode))
src/canon/docs_test.jl
Outdated
,("Oscillator", "https://www.archlinux.org", "oscillator", quote y="BBBB" end)] | ||
|
||
macro create_pode(modelname,source,variable,pode) | ||
quote |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For auto docs, you will need to add export @modelname
to the expr that you are generating.
src/canon/canon.jl
Outdated
|
||
$desc | ||
|
||
### Model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promote to ## Model
src/canon/canon.jl
Outdated
" end, "\n") | ||
|
||
docstring = " | ||
## $modelname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promote to # $modelname
src/canon/canon.jl
Outdated
|
||
### Model | ||
|
||
$modeldef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$modeldef
I think we should use the Markdown stdlib to get the formatting right. https://github.com/JuliaLang/julia/blob/master/stdlib/Markdown/src/Markdown.jl
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost there. We have 3 changes in 1 PR, which we should try to avoid, but I don't want to delay by starting over here. See inline comments
.buildkite/toolbox/dryrun.sh
Outdated
# check if we are in a valid git repository | ||
REPO=`git rev-parse --show-toplevel` | ||
if [[ ! $REPO ]]; then | ||
echo "badness" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "We are not in a valid git repo $(pwd)"
@@ -0,0 +1,6 @@ | |||
srun --cpus-per-task=32 \ | |||
--mem=8G \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16G by default might be safer.
using Decapodes | ||
using MultiScaleArrays | ||
using MLStyle | ||
using OrdinaryDiffEq | ||
using LinearAlgebra | ||
using GLMakie | ||
using CairoMakie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should use
using CairoMakie
import CairoMakie: wireframe [all the other methods we use]
and then we won't have to use the CairoMakie namespace in the code. Then if we switch back to GL, we can just change it at the top of the file.
src/canon/Physics.jl
Outdated
end | ||
) | ||
|
||
# @docapode(:OutgoingLongwaveRadiation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why commented out?
src/canon/Physics.jl
Outdated
|
||
|
||
|
||
# Diffusion = @decapode DiffusionQuantities begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why commented out?
Also squash all this history into 1-3 commits before merging. |
ac6bd73
to
fcc53d1
Compare
@@ -32,7 +33,6 @@ Catlab = "0.15, 0.16" | |||
CombinatorialSpaces = "0.5, 0.6" | |||
ComponentArrays = "0.15" | |||
DataStructures = "0.18.13" | |||
DiagrammaticEquations = "0.1.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems important. Why delete?
Brusselator = @decapode begin | ||
# Values living on vertices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these comments get the ## coment
treatment that we discovered in the literate docs?
fcc53d1
to
fe85847
Compare
…akie but we should not expect these docs to work until the pmap branch is completed
20c20ef
to
e6fd11b
Compare
the commit that got lost in being bad at git diff --git a/examples/chemistry/brusselator_bounded.jl b/examples/chemistry/brusselator_bounded.jl
index b2cf391..4b72fb0 100644
--- a/examples/chemistry/brusselator_bounded.jl
+++ b/examples/chemistry/brusselator_bounded.jl
@@ -65,7 +65,7 @@ resolve_overloads!(Brusselator)
to_graphviz(Brusselator)
# TODO: Create square domain of approximately 32x32 vertices.
-s = loadmesh(Rectangle_30x10())
+s = triangulated_grid(30,10,2,2)
scaling_mat = Diagonal([1/maximum(x->x[1], s[:point]),
1/maximum(x->x[2], s[:point]),
1.0])
@@ -230,7 +230,7 @@ constants_and_parameters = (
R = R,
F = t -> t ≥ 1.1 ? F₂ : F₁)
-tₑ = 21.5e4
+tₑ = 21.5e2
@info("Precompiling Solver")
prob = ODEProblem(fₘ, u₀, (0, 1e-4), constants_and_parameters) |
Docs broken.