Skip to content

Commit e9f3b19

Browse files
authored
Add documentation with Documenter.jl (#152)
* add documentation with Documenter.jl * add workflow to documenter * update doctest results * add badges to README
1 parent ba18de0 commit e9f3b19

File tree

7 files changed

+67
-1
lines changed

7 files changed

+67
-1
lines changed

.github/workflows/docs.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches: [main]
5+
tags: [v*]
6+
pull_request:
7+
jobs:
8+
docs:
9+
name: Documentation
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: julia-actions/julia-buildpkg@v1
14+
- uses: julia-actions/julia-docdeploy@v1
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# IntervalSets.jl
22
Interval Sets for Julia
33

4+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMath.github.io/IntervalSets.jl/stable)
5+
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMath.github.io/IntervalSets.jl/dev)
46
[![Build Status](https://github.com/JuliaMath/IntervalSets.jl/workflows/CI/badge.svg)](https://github.com/JuliaMath/IntervalSets.jl/actions)
57
[![Coverage](https://codecov.io/gh/JuliaMath/IntervalSets.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaMath/IntervalSets.jl)
68

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+
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"

docs/make.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using IntervalSets
2+
using Documenter
3+
4+
DocMeta.setdocmeta!(IntervalSets, :DocTestSetup, :(using IntervalSets); recursive=true)
5+
6+
makedocs(;
7+
modules=[IntervalSets],
8+
repo="https://github.com/JuliaMath/IntervalSets.jl/blob/{commit}{path}#{line}",
9+
sitename="IntervalSets.jl",
10+
format=Documenter.HTML(;
11+
prettyurls=get(ENV, "CI", "false") == "true",
12+
canonical="https://JuliaMath.github.io/IntervalSets.jl",
13+
assets = ["assets/custom.css", "assets/favicon.ico"],
14+
),
15+
pages=[
16+
"Home" => "index.md",
17+
"APIs" => "api.md",
18+
],
19+
)
20+
21+
deploydocs(;
22+
repo="github.com/JuliaMath/IntervalSets.jl", devbranch="master",
23+
)

docs/src/api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# API
2+
3+
```@autodocs
4+
Modules = [IntervalSets]
5+
Order = [:type, :function]
6+
```

docs/src/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# IntervalSets.jl
2+
3+
A Julia package implementing [IntervalSets](https://en.wikipedia.org/wiki/Quaternion).
4+
5+
!!! note "Documentation"
6+
The documentation is still work in progress.
7+
For more information, see also
8+
* [README in the repository](https://github.com/JuliaMath/IntervalSets.jl)
9+
* [Tests in the repository](https://github.com/JuliaMath/IntervalSets.jl/tree/master/test)
10+
Feel free to [open pull requests](https://github.com/JuliaMath/IntervalSets.jl/pulls) and improve this document!
11+
12+
## Installation
13+
```
14+
pkg> add IntervalSets
15+
```

src/findall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ julia> y = 8:-0.5:0
2525
2626
julia> collect(y)'
2727
1×17 adjoint(::Vector{Float64}) with eltype Float64:
28-
8.0 7.5 7.0 6.5 6.0 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0
28+
8.0 7.5 7.0 6.5 6.0 5.5 5.0 4.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0
2929
3030
julia> findall(in(1..6), y)
3131
5:15

0 commit comments

Comments
 (0)