Skip to content

Commit

Permalink
set up documention basics with Documenter.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet committed May 11, 2021
1 parent 5af1bad commit f5d9723
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Documentation

on:
push:
branches:
- master
tags: '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Install dependencies
run: |
julia --project=docs/ -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs/ docs/make.jl
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# RandomExtensions

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

This package explores a possible extension of `rand`-related
functionalities (from the `Random` module); the code is initially
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
RandomExtensions = "fb686558-2515-59ef-acaa-46db3789a887"

[compat]
Documenter = "0.26"
11 changes: 11 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Documenter, RandomExtensions

makedocs(
sitename="RandomExtensions.jl",
modules=[RandomExtensions],
authors="Rafael Fourquet",
)

deploydocs(
repo = "github.com/JuliaRandom/RandomExtensions.jl.git",
)
9 changes: 9 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# RandomExtensions

Most of the "documentation" is still in the
[README](https://github.com/JuliaRandom/RandomExtensions.jl/blob/master/README.md).
Here is the updated docstring for `rand`:

```@docs
rand
```
4 changes: 2 additions & 2 deletions src/RandomExtensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Pick a random element or collection of random elements from the set of values sp
* an `AbstractDict` or `AbstractSet` object,
* a string (considered as a collection of characters), or
* a type: the set of values to pick from is then equivalent to `typemin(S):typemax(S)` for
integers (this is not applicable to [`BigInt`](@ref)), and to ``[0, 1)`` for floating
integers (this is not applicable to `BigInt`, and to ``[0, 1)`` for floating
point numbers;
* a `Distribution` object, e.g. `Normal()` for a normal distribution (like `randn()`),
or `CloseOpen(10.0, 20.0)` for uniform `Float64` numbers in the range ``[10.0, 20.0)``;
Expand All @@ -78,7 +78,7 @@ Pick a random element or collection of random elements from the set of values sp
given as concrete types, e.g. `make(ComplexF64, 1:3, Int)` to generate `ComplexF64` instead
of `Complex{Int}`.
`S` usually defaults to [`Float64`](@ref).
`S` usually defaults to `Float64`.
If `C...` is not specified, `rand` produces a scalar. Otherwise, `C` can be:
Expand Down

0 comments on commit f5d9723

Please sign in to comment.