Skip to content

Commit f5d9723

Browse files
committed
set up documention basics with Documenter.jl
1 parent 5af1bad commit f5d9723

7 files changed

Lines changed: 60 additions & 5 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: julia-actions/setup-julia@latest
16+
with:
17+
version: '1.6'
18+
- name: Install dependencies
19+
run: |
20+
julia --project=docs/ -e '
21+
using Pkg
22+
Pkg.develop(PackageSpec(path=pwd()))
23+
Pkg.instantiate()'
24+
- name: Build and deploy
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
27+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
28+
run: julia --project=docs/ docs/make.jl

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RandomExtensions
22

3-
[![Build Status](https://travis-ci.org/rfourquet/RandomExtensions.jl.svg?branch=master)](https://travis-ci.org/rfourquet/RandomExtensions.jl)
4-
[![Coverage Status](https://coveralls.io/repos/rfourquet/RandomExtensions.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/rfourquet/RandomExtensions.jl?branch=master)
5-
[![codecov.io](http://codecov.io/github/rfourquet/RandomExtensions.jl/coverage.svg?branch=master)](http://codecov.io/github/rfourquet/RandomExtensions.jl?branch=master)
3+
[![Tests Status](https://github.com/JuliaRandom/RandomExtensions.jl/workflows/CI/badge.svg)](https://github.com/JuliaRandom/RandomExtensions.jl/actions?query=workflow%3ACI)
4+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaRandom.github.io/RandomExtensions.jl/stable)
5+
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaRandom.github.io/RandomExtensions.jl/dev)
66

77
This package explores a possible extension of `rand`-related
88
functionalities (from the `Random` module); the code is initially

docs/.gitignore

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

docs/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
RandomExtensions = "fb686558-2515-59ef-acaa-46db3789a887"
4+
5+
[compat]
6+
Documenter = "0.26"

docs/make.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Documenter, RandomExtensions
2+
3+
makedocs(
4+
sitename="RandomExtensions.jl",
5+
modules=[RandomExtensions],
6+
authors="Rafael Fourquet",
7+
)
8+
9+
deploydocs(
10+
repo = "github.com/JuliaRandom/RandomExtensions.jl.git",
11+
)

docs/src/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# RandomExtensions
2+
3+
Most of the "documentation" is still in the
4+
[README](https://github.com/JuliaRandom/RandomExtensions.jl/blob/master/README.md).
5+
Here is the updated docstring for `rand`:
6+
7+
```@docs
8+
rand
9+
```

src/RandomExtensions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Pick a random element or collection of random elements from the set of values sp
6969
* an `AbstractDict` or `AbstractSet` object,
7070
* a string (considered as a collection of characters), or
7171
* a type: the set of values to pick from is then equivalent to `typemin(S):typemax(S)` for
72-
integers (this is not applicable to [`BigInt`](@ref)), and to ``[0, 1)`` for floating
72+
integers (this is not applicable to `BigInt`, and to ``[0, 1)`` for floating
7373
point numbers;
7474
* a `Distribution` object, e.g. `Normal()` for a normal distribution (like `randn()`),
7575
or `CloseOpen(10.0, 20.0)` for uniform `Float64` numbers in the range ``[10.0, 20.0)``;
@@ -78,7 +78,7 @@ Pick a random element or collection of random elements from the set of values sp
7878
given as concrete types, e.g. `make(ComplexF64, 1:3, Int)` to generate `ComplexF64` instead
7979
of `Complex{Int}`.
8080
81-
`S` usually defaults to [`Float64`](@ref).
81+
`S` usually defaults to `Float64`.
8282
8383
If `C...` is not specified, `rand` produces a scalar. Otherwise, `C` can be:
8484

0 commit comments

Comments
 (0)