Skip to content

Commit f3901a3

Browse files
committed
add doctests.jl test file and /docs folder
1 parent 9ea1328 commit f3901a3

7 files changed

Lines changed: 66 additions & 0 deletions

File tree

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
site/

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
RandomMatrices = "2576dda1-a324-5b11-aa66-c48ed7e3c618"

docs/make.jl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
push!(LOAD_PATH,"../src/")
2+
3+
using Documenter
4+
using RandomMatrices
5+
6+
DocMeta.setdocmeta!(RandomMatrices, :DocTestSetup, :(using RandomMatrices, Random); recursive=true)
7+
8+
function main()
9+
10+
makedocs(
11+
doctest = false,
12+
clean = true,
13+
sitename = "RandomMatrices.jl",
14+
format = Documenter.HTML(
15+
assets=["assets/init.js"]
16+
),
17+
modules = [RandomMatrices],
18+
checkdocs = :exports,
19+
warnonly = false,
20+
authors = "Andrew Kille",
21+
pages = [
22+
"RandomMatrices.jl" => "index.md",
23+
"Full API" => "API.md"
24+
]
25+
)
26+
end
27+
28+
main()

docs/src/API.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# [Full API](@id Full-API)
2+
3+
```@raw html
4+
<style>
5+
.content table td {
6+
padding-top: 0 !important;
7+
padding-bottom: 0 !important;
8+
}
9+
</style>
10+
```
11+
12+
## Autogenerated API list
13+
14+
```@autodocs
15+
Modules = [RandomMatrices]
16+
Private = false
17+
```

docs/src/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# RandomMatrices.jl
2+
3+
```@meta
4+
DocTestSetup = quote
5+
using RandomMatrices
6+
end
7+
```

test/doctests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Documenter
2+
using RandomMatrices
3+
using Test
4+
5+
@testset "Doctests" begin
6+
DocMeta.setdocmeta!(RandomMatrices, :DocTestSetup, :(using RandomMatrices, Random); recursive=true)
7+
doctest(RandomMatrices)
8+
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ using Test
88
include("FormalPowerSeries.jl")
99
include("Haar.jl")
1010
include("StochasticProcess.jl")
11+
include("doctests.jl")
1112

1213
@testset "densities" begin
1314
include("densities/Semicircle.jl")

0 commit comments

Comments
 (0)