Skip to content

Commit

Permalink
Merge branch 'main' into mt_tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
mthielma committed Feb 29, 2024
2 parents 1a3c05e + 853d36e commit 6ee0479
Show file tree
Hide file tree
Showing 48 changed files with 604 additions and 261 deletions.
File renamed without changes.
48 changes: 48 additions & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Note: this workflow is copied from the Trixi.jl package
name: Documentation
on:
push:
branches:
- 'main'
tags: '*'
paths-ignore:
- '.zenodo.json'
- '.github/workflows/benchmark.yml'
- '.github/workflows/CI.yml'
- '.github/workflows/CompatHelper.yml'
pull_request:
paths-ignore:
- '.zenodo.json'
- '.github/workflows/CI.yml'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/TagBot.yml'
- 'benchmark/**'
- 'utils/**'
workflow_dispatch:

# Cancel redundant CI tests automatically
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
show-versioninfo: true
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
env:
PYTHON: ""
- name: Install dependencies
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
GKSwstype: 100 # To make GitHub Action work, disable showing a plot window with the GR backend of the Plots package
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs --color=yes docs/make.jl
29 changes: 29 additions & 0 deletions .github/workflows/cleanup_caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cleanup caches by a branch
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
24 changes: 0 additions & 24 deletions .github/workflows/documentation.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gmt.history
7 changes: 4 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[deps]
GeoParams = "e018b62d-d9de-4a26-8697-af89c310ae38"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
GMT = "5752ebe1-31b9-557e-87aa-f909b540aa54"
GeophysicalModelGenerator = "3700c31b-fa53-48a6-808a-ef22d5a84742"

[compat]
Documenter = "0.26"
Documenter = "1"
2 changes: 1 addition & 1 deletion docs/gmt.history
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ BEGIN GMT 6.5.0
B afWSen
J X
JX X15c/0
R 0/1/0.1/1
R 0/1/0/0.9
@L 1
END
44 changes: 26 additions & 18 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
using GeophysicalModelGenerator
using .GeophysicalModelGenerator
using Documenter

push!(LOAD_PATH, dirname(@__DIR__))

using GeophysicalModelGenerator

# Importing these activates package extensions
import GLMakie, GMT

#DocMeta.setdocmeta!(GeophysicalModelGenerator, :DocTestSetup, :(using GeophysicalModelGenerator); recursive=true)

# Get GeophysicalModelGenerator.jl root directory
Expand Down Expand Up @@ -48,6 +53,7 @@ open(joinpath(@__DIR__, "src", "man", "code_of_conduct.md"), "w") do io
println(io, "> ", line)
end
end

open(joinpath(@__DIR__, "src", "man", "contributing.md"), "w") do io
# Point to source license file
println(io, """
Expand All @@ -67,7 +73,7 @@ open(joinpath(@__DIR__, "src", "man", "contributing.md"), "w") do io

makedocs(;
modules=[GeophysicalModelGenerator],
authors="Marcel Thielmann, Boris Kaus",
authors="Boris Kaus, Marcel Thielmann",
sitename="GeophysicalModelGenerator.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
Expand All @@ -76,21 +82,21 @@ makedocs(;
"Home" => "index.md",
"Tutorials" => Any[
"Overview" => "man/tutorials.md",
"3D seismic tomography from ASCII" => "man/tutorial_load3DSeismicData.md",
"3D seismic tomography from netCDF" => "man/tutorial_loadregular3DSeismicData_netCDF.md",
"Visualize Moho topography" => "man/tutorial_MohoTopo.md",
"Create GMT-based topography" => "man/tutorial_GMT_Topography.md",
"Coastlines" => "man/tutorial_Coastlines.md",
"Import screenshots" => "man/tutorial_Screenshot_To_Paraview.md",
"Interpolate irregular 3D seismic tomography" => "man/tutorial_loadirregular3DSeismicData.md",
"ETOPO1 Topography and geological maps" => "man/tutorial_GMT_Topography_GeologicalMap.md",
"ISC earthquake data" => "man/tutorial_ISC_data.md",
"Plot GPS vectors" => "man/tutorial_GPS.md",
"Read UTM data" => "man/tutorial_UTM.md",
"VoteMaps" => "man/Tutorial_Votemaps.md",
"Kilometer-scale volcano" => "man/tutorial_local_Flegrei.md",
"Generating LaMEM model" => "man/LaPalma_example.md",
"Create movies" => "man/tutorial_time_Seismicity.md"
"1 - 3D seismic tomography from ASCII" => "man/tutorial_load3DSeismicData.md",
"2 - 3D seismic tomography from netCDF" => "man/tutorial_loadregular3DSeismicData_netCDF.md",
"3 - Visualize Moho topography" => "man/tutorial_MohoTopo.md",
"4 - Create GMT-based topography" => "man/tutorial_GMT_Topography.md",
"5 - Coastlines" => "man/tutorial_Coastlines.md",
"6 - Import screenshots" => "man/tutorial_Screenshot_To_Paraview.md",
"7 - Interpolate irregular 3D seismic tomography" => "man/tutorial_loadirregular3DSeismicData.md",
"8 - ETOPO1 Topography and geological maps" => "man/tutorial_GMT_Topography_GeologicalMap.md",
"9 - ISC earthquake data" => "man/tutorial_ISC_data.md",
"10 - Plot GPS vectors" => "man/tutorial_GPS.md",
"11 - Read UTM data" => "man/tutorial_UTM.md",
"12 - VoteMaps" => "man/Tutorial_Votemaps.md",
"13 - Campi Flegrei" => "man/tutorial_local_Flegrei.md",
"14 - Cartesian Volcano Model" => "man/LaPalma_example.md",
"15 - Create movies" => "man/tutorial_time_Seismicity.md"
],
"User Guide" => Any[
"Installation" => "man/installation.md",
Expand All @@ -110,6 +116,8 @@ makedocs(;
"Code of Conduct" => "man/code_of_conduct.md",
"License" => "man/license.md"
],
pagesonly=true,
warnonly=true
)

deploydocs(;
Expand Down
Loading

0 comments on commit 6ee0479

Please sign in to comment.