Skip to content
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

new docs and bugfixes from juliacon #11

Merged
merged 15 commits into from
Nov 22, 2024
Merged
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RASTERDATASOURCES_PATH: "."
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
/Manifest.toml
/docs/Manifest.toml
/docs/build/
node_modules/
package-lock.json
Manifest.toml
.vscode
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
EvoTrees = "f6006082-12f8-11e9-0c9c-0d5d367ab1e5"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
Lasso = "b4fcebef-c861-5a0f-a7e2-ba9dc32b180a"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Loess = "4345ca2d-374a-55d4-8d30-97f9976e7612"
Expand Down Expand Up @@ -42,15 +43,15 @@ SpeciesDistributionModelsMakieExt = "Makie"
CategoricalDistributions = "0.1.14"
Distances = "0.10"
MLJGLMInterface = "0.3.7"
Rasters = "0.10.1, 0.11"
Rasters = "0.10.1, 0.11, 0.12"
StatisticalMeasures = "0.1.5"
StatsModels = "0.7.3"
julia = "1.9"

[extras]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
MLJModels = "d491faf4-2d78-11e9-2867-c94bc002c0b7"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Expand Down
12 changes: 12 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[deps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
EvoTrees = "f6006082-12f8-11e9-0c9c-0d5d367ab1e5"
GBIF2 = "dedd4f52-e074-43bf-924d-d6bce14ad628"
MLJGLMInterface = "caf8df21-4939-456d-ac9c-5fefbfb04c0c"
Maxnet = "81f79f80-22f2-4e41-ab86-00c11cf0f26f"
NaturalEarth = "436b0209-26ab-4e65-94a9-6526d86fea76"
RasterDataSources = "3cb90ccd-e1b6-4867-9617-4276c8b2ca36"
Rasters = "a3a2b9e3-a471-40c9-b274-f788e487c689"
SpeciesDistributionModels = "3ef73bbf-0321-4d3b-9a2e-5fbebc8e35da"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
29 changes: 13 additions & 16 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
using Documenter, DocumenterVitepress
using SpeciesDistributionModels
using Documenter

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

makedocs(;
modules=[SpeciesDistributionModels],
authors="Tiem van der Deure <[email protected]>, Rafael Schouten <[email protected]>",
repo="https://github.com/tiemvanderdeure/SpeciesDistributionModels.jl/blob/{commit}{path}#{line}",
authors= "Tiem van der Deure <[email protected]>, Rafael Schouten <[email protected]>",
sitename="SpeciesDistributionModels.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://tiemvanderdeure.github.io/SpeciesDistributionModels.jl",
edit_link="master",
assets=String[],
format=DocumenterVitepress.MarkdownVitepress(
repo = "github.com/tiemvanderdeure/SpeciesDistributionModels.jl",
devurl = "dev",
devbranch = "master",
),
pages=[
"Home" => "index.md",
],
warnonly = true
)

deploydocs(;
deploydocs(;
repo="github.com/tiemvanderdeure/SpeciesDistributionModels.jl",
devbranch="master",
)
target = "build", # this is where Vitepress stores its output
branch = "gh-pages",
devbranch = "master",
push_preview = true
)
16 changes: 16 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"scripts": {
"docs:dev": "vitepress dev build/.documenter",
"docs:build": "vitepress build build/.documenter",
"docs:preview": "vitepress preview build/.documenter"
},
"devDependencies": {
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.2.3",
"vitepress-plugin-tabs": "^0.5.0"
},
"dependencies": {
"markdown-it": "^14.0.0",
"markdown-it-footnote": "^4.0.0"
}
}
66 changes: 66 additions & 0 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import mathjax3 from "markdown-it-mathjax3";
import footnote from "markdown-it-footnote";

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',// TODO: replace this in makedocs!
title: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
description: 'Species distirbution modelling in Julia',
lastUpdated: true,
cleanUrls: true,
outDir: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // This is required for MarkdownVitepress to work correctly...
head: [['link', { rel: 'icon', href: 'REPLACE_ME_DOCUMENTER_VITEPRESS_FAVICON' }]],
ignoreDeadLinks: true,

markdown: {
math: true,
config(md) {
md.use(tabsMarkdownPlugin),
md.use(mathjax3),
md.use(footnote)
},
theme: {
light: "github-light",
dark: "github-dark"}
},
themeConfig: {
outline: 'deep',
logo: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
search: {
provider: 'local',
options: {
detailedView: true
}
},
nav: [
{ text: 'Getting started', link: '/getting_started' },
{ text: 'Examples', items:
[
{ text: 'Distribution of Eucalyptus regnans', link: '/eucalyptus_regnans' },
]
},
{ text: 'API', link: '/api' },
{ text: 'Ecosystem',
items: [
{ text: 'Rasters.jl', link: 'https://rafaqz.github.io/Rasters.jl/dev/' },
{ text: 'MLJ.jl', link: 'https://juliaai.github.io/MLJ.jl/dev/' },
{ text: 'GBIF2.jl', link: 'https://rafaqz.github.io/GBIF2.jl/dev/' },
{ text: 'RasterDataSources.jl', link: 'http://docs.ecojulia.org/RasterDataSources.jl/dev/' },
]
},
],
editLink: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
socialLinks: [
{ icon: 'github', link: 'REPLACE_ME_DOCUMENTER_VITEPRESS' }
],
footer: {
message: 'Made with <a href="https://luxdl.github.io/DocumenterVitepress.jl/dev/" target="_blank"><strong>DocumenterVitepress.jl</strong></a><br>',
copyright: `© Copyright ${new Date().getUTCFullYear()}.`
}
}
})



19 changes: 19 additions & 0 deletions docs/src/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// .vitepress/theme/index.ts
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'

import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
import './style.css'

export default {
extends: DefaultTheme,
Layout() {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
enhanceAppWithTabs(app)
}
} satisfies Theme
Loading
Loading