Skip to content

Commit 96f3202

Browse files
authored
Use DocumenterCitations.jl (#330)
* Restrict version of `ComplexityMeasures` Fixes #325 * Use DocumenterCitations.jl for references * DocumenterCitations should be in `docs/Project.toml`
1 parent 7278b5d commit 96f3202

File tree

78 files changed

+892
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+892
-548
lines changed

Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "CausalityTools"
22
uuid = "5520caf5-2dd7-5c5d-bfcb-a00e56ac49f7"
33
authors = ["Kristian Agasøster Haaga <kahaaga@gmail.com>", "Tor Einar Møller <temolle@gmail.com>", "George Datseris <datseris.george@gmail.com>"]
44
repo = "https://github.com/kahaaga/CausalityTools.jl.git"
5-
version = "2.8.0"
5+
version = "2.9.0"
66

77
[deps]
88
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
@@ -12,6 +12,7 @@ DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
1212
DelayEmbeddings = "5732040d-69e3-5649-938a-b6b4f237613f"
1313
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
1414
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
15+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1516
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
1617
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1718
HypothesisTests = "09f84164-cd44-5f33-b23f-e6b0d136a0d5"
@@ -35,7 +36,7 @@ TimeseriesSurrogates = "c804724b-8c18-5caa-8579-6025a0767c70"
3536
[compat]
3637
Accessors = "^0.1.28"
3738
Combinatorics = "1"
38-
ComplexityMeasures = "2.8"
39+
ComplexityMeasures = "2 - 2.8"
3940
DSP = "0.7"
4041
DelayEmbeddings = "2.7"
4142
Distances = "^0.10"

docs/Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ DelayEmbeddings = "5732040d-69e3-5649-938a-b6b4f237613f"
77
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
88
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
99
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
10+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
1011
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
1112
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
1213
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
@@ -24,5 +25,5 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2425
TimeseriesSurrogates = "c804724b-8c18-5caa-8579-6025a0767c70"
2526

2627
[compat]
27-
julia = "^1.6"
2828
DynamicalSystemsBase = "3"
29+
julia = "^1.6"

docs/make.jl

Lines changed: 23 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,15 @@
11
cd(@__DIR__)
2-
using Pkg
3-
CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing
4-
CI && Pkg.activate(@__DIR__)
5-
CI && Pkg.instantiate()
6-
ENV["GKSwstype"] = "100" # allow local builds without output
7-
using Documenter
8-
using DocumenterTools: Themes
2+
# Doc-specific (remaining packages are imported in `build_docs_with_style.jl`, which is
3+
# downloaded)
4+
using DocumenterCitations
5+
import Downloads
6+
7+
# Packages used in the doc build.
98
using CausalityTools
109
using ComplexityMeasures
1110
using StateSpaceSets
1211

13-
# %% JuliaDynamics theme.
14-
# download the themes
15-
using DocumenterTools: Themes
16-
for file in ("juliadynamics-lightdefs.scss", "juliadynamics-darkdefs.scss", "juliadynamics-style.scss")
17-
download("https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/$file", joinpath(@__DIR__, file))
18-
end
19-
# create the themes
20-
for w in ("light", "dark")
21-
header = read(joinpath(@__DIR__, "juliadynamics-style.scss"), String)
22-
theme = read(joinpath(@__DIR__, "juliadynamics-$(w)defs.scss"), String)
23-
write(joinpath(@__DIR__, "juliadynamics-$(w).scss"), header*"\n"*theme)
24-
end
25-
# compile the themes
26-
Themes.compile(joinpath(@__DIR__, "juliadynamics-light.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-light.css"))
27-
Themes.compile(joinpath(@__DIR__, "juliadynamics-dark.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"))
28-
29-
# %% Build docs
30-
cd(@__DIR__)
31-
ENV["JULIA_DEBUG"] = "Documenter"
32-
33-
PAGES = [
12+
pages = [
3413
"Overview" => "index.md",
3514
"Association measures" => "measures.md",
3615
"Independence testing" => "independence.md",
@@ -39,26 +18,23 @@ PAGES = [
3918
"Examples" => "examples.md",
4019
"Predefined systems" => "coupled_systems.md",
4120
"Experimental" => "experimental.md",
21+
"References" => "references.md",
4222
]
4323

44-
makedocs(
45-
modules = [CausalityTools, ComplexityMeasures, StateSpaceSets],
46-
format = Documenter.HTML(
47-
prettyurls = CI,
48-
sidebar_sitename = false,
49-
assets = [
50-
asset("https://fonts.googleapis.com/css?family=Montserrat|Source+Code+Pro&display=swap", class=:css),
51-
],
52-
),
53-
sitename = "CausalityTools.jl",
54-
authors = "Kristian Agasøster Haaga, David Diego, Tor Einar Møller, George Datseris",
55-
pages = PAGES
24+
Downloads.download(
25+
"https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/build_docs_with_style.jl",
26+
joinpath(@__DIR__, "build_docs_with_style.jl")
5627
)
28+
include("build_docs_with_style.jl")
5729

58-
if CI
59-
deploydocs(
60-
repo = "github.com/JuliaDynamics/CausalityTools.jl.git",
61-
target = "build",
62-
push_preview = true
63-
)
64-
end
30+
bibliography = CitationBibliography(
31+
joinpath(@__DIR__, "refs.bib");
32+
style=:authoryear
33+
)
34+
35+
build_docs_with_style(pages, CausalityTools, ComplexityMeasures, StateSpaceSets;
36+
expandfirst = ["index.md"],
37+
bib = bibliography,
38+
pages = pages,
39+
authors = "Kristian Agasøster Haaga, David Diego, Tor Einar Møller, George Datseris",
40+
)

0 commit comments

Comments
 (0)