Skip to content

Commit

Permalink
Merge pull request #58 from euroargodev/v0p1p21a
Browse files Browse the repository at this point in the history
try adding argopy example back in docs build
  • Loading branch information
gaelforget authored Aug 19, 2024
2 parents 648306f + d75ca5e commit b4f0b6f
Show file tree
Hide file tree
Showing 3 changed files with 1,206 additions and 436 deletions.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[deps]
Climatology = "9e9a4d37-2d2e-41e3-8b85-f7978328d9c7"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Dataverse = "9c0b9be8-e31e-490f-90fe-77697562404d"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MITgcm = "dce5fa8e-68ce-4431-a242-9469c69627a0"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
30 changes: 21 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,40 @@ pth=Climatology.MITPROFclim_download()
println(pth)

#python dependencies
if false
import Pkg, PyCall, Conda

tmpfile=joinpath(tempdir(),"pythonpath.txt")
run(pipeline(`which python`,tmpfile)) #external python path
ENV["PYTHON"]=readline(tmpfile)
#ENV["PYTHON"]=""
Pkg.build("PyCall")
Conda.add("argopy")
run_argopy=true
Sys.ARCH==:aarch64 ? run_argopy=false : nothing

argopy=PyCall.pyimport("argopy")
if run_argopy
method="internal"
if method=="external"
tmpfile=joinpath(tempdir(),"pythonpath.txt")
run(pipeline(`which python`,tmpfile)) #external python path
ENV["PYTHON"]=readline(tmpfile)
else
ENV["PYTHON"]=""
end

using Pkg
Pkg.build("PyCall")
using PyCall, Conda
ArgoData.conda(:argopy)
argopy=ArgoData.pyimport(:argopy)
end

#make docs
makedocs(;
modules=[ArgoData],
format=Documenter.HTML(),
# format=Documenter.HTML(repolink = "github.com/euroargodev/ArgoData.jl.git"),
pages=[
"Home" => "index.md",
"Examples" => "examples.md",
"Reference" => "Functionalities.md",
],
repo="https://github.com/euroargodev/ArgoData.jl/blob/{commit}{path}#L{line}",
# repo = "github.com/euroargodev/ArgoData.jl.git",
# repo=Remotes.GitHub("euroargodev", "ArgoData.jl"),
sitename="ArgoData.jl",
authors="gaelforget <[email protected]>",
warnonly = [:cross_references,:missing_docs],
Expand All @@ -41,6 +52,7 @@ mv("Argo_float_files.csv",joinpath(@__DIR__,"build", "Argo_float_files.csv"))

#run notebooks
lst=("ArgoToMITprof.jl",)
run_argopy ? lst=(lst...,"Argo_argopy.jl") : nothing
for i in lst
fil_in=joinpath(@__DIR__,"..", "examples",i)
fil_out=joinpath(@__DIR__,"build", i[1:end-2]*"html")
Expand Down
Loading

0 comments on commit b4f0b6f

Please sign in to comment.