Skip to content

Commit f30ac46

Browse files
authored
Merge pull request #127 from dwijenchawra/master
Migrated documentation from Jupyter to Documenter.jl
2 parents bf38251 + 917e1ce commit f30ac46

File tree

14 files changed

+503
-13
lines changed

14 files changed

+503
-13
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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 LuaLatex
19+
run: sudo apt-get install texlive-full && sudo apt-get install texlive-latex-extra && sudo mktexlsr && sudo updmap-sys
20+
- name: Install dependencies
21+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
22+
- name: Build and deploy
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
25+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
26+
run: julia --project=docs/ docs/make.jl
27+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99

1010
.DS_Store
1111

12+
doc/build/
13+
doc/site/
14+
/docs/build/
15+
/.idea/

.travis.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1+
# Documentation: http://docs.travis-ci.com/user/languages/julia
12
language: julia
2-
coveralls: true
3-
os:
4-
- linux
5-
- osx
6-
- windows
3+
notifications:
4+
email: false
75
julia:
86
- 1.0
9-
- 1
10-
matrix:
7+
- 1.5
8+
- nightly
9+
os:
10+
- linux
11+
12+
cache:
13+
directories:
14+
- ~/.julia/artifacts
15+
jobs:
16+
fast_finish: true
1117
allow_failures:
12-
- julia: 1.0
13-
notifications:
14-
email: false
18+
- julia: nightly
19+
include:
20+
- stage: "Documentation"
21+
julia: 1.5
22+
os: linux
23+
script:
24+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
25+
Pkg.instantiate()'
26+
- julia --project=docs/ docs/make.jl
27+
after_success: skip
28+
after_success:
29+
- |
30+
julia -e '
31+
using Pkg
32+
Pkg.add("Coverage")
33+
using Coverage
34+
Coveralls.submit(process_folder())'

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2222
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
2323
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2424
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
25+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
26+
2527

2628
[compat]
2729
DataFrames = "0.21,0.22"
@@ -40,6 +42,7 @@ Requires = "1.0.1"
4042
SpecialFunctions = "0.8,0.10,1.0,1.1,1.2"
4143
StatsBase = "0.25,0.26,0.27,0.28,0.29,0.30,0.31,0.32,0.33"
4244
julia = "1"
45+
Documenter = "0.26"
4346

4447
[extras]
4548
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
This library supports representation, inference, and learning in Bayesian networks.
44

5-
Please read the [documentation](http://nbviewer.ipython.org/github/sisl/BayesNets.jl/blob/master/doc/BayesNets.ipynb).
5+
Please read the [documentation](https://sisl.github.io/BayesNets.jl/dev/index.html).
66

7-
[![Build Status](https://travis-ci.org/sisl/BayesNets.jl.svg?branch=master)](https://travis-ci.org/sisl/BayesNets.jl) [![Coverage Status](https://coveralls.io/repos/sisl/BayesNets.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/sisl/BayesNets.jl?branch=master)
7+
[![Build Status](https://github.com/sisl/BayesNets.jl/actions/workflows/main.yml/badge.svg)](https://travis-ci.org/sisl/BayesNets.jl) [![Coverage Status](https://coveralls.io/repos/sisl/BayesNets.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/sisl/BayesNets.jl?branch=master)
File renamed without changes.
File renamed without changes.

docs/Project.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "0.26"
6+
7+
[extras]
8+
TikzGraphs = "b4f28e30-c73f-5eaf-a395-8a9db949a742"

docs/make.jl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
push!(LOAD_PATH, "../src")
2+
import Pkg
3+
Pkg.add("BayesNets")
4+
Pkg.add("TikzPictures")
5+
Pkg.add("TikzGraphs")
6+
Pkg.add("Documenter")
7+
Pkg.add("Discretizers")
8+
Pkg.add("RDatasets")
9+
using Documenter, BayesNets, TikzGraphs, TikzPictures, Discretizers, RDatasets
10+
11+
makedocs(
12+
modules = [BayesNets, TikzPictures, TikzGraphs, Discretizers, RDatasets],
13+
format = Documenter.HTML(
14+
mathengine = Documenter.MathJax2()
15+
),
16+
sitename = "BayesNets.jl",
17+
pages = [
18+
"Table of Contents" => [
19+
"index.md",
20+
"install.md",
21+
"usage.md",
22+
"concepts.md"
23+
]
24+
]
25+
)
26+
27+
deploydocs(
28+
repo = "github.com/sisl/BayesNets.jl.git",
29+
)

docs/src/concepts.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Concepts
2+
3+
4+
## Bayesian Networks
5+
6+
A Bayesian Network (BN) represents a probability distribution over a set of variables, ``P(x_1, x_2, \ldots, x_n)``.
7+
Bayesian networks leverage variable relations in order to efficiently decompose the joint distribution into smaller conditional probability distributions.
8+
9+
A BN is defined by a directed acyclic graph and a set of conditional probability distributions. Each node in the graph corresponds to a variable ``x_i`` and is associated with a conditional probability distribution ``P(x_i \mid \text{parents}(x_i))``.
10+

0 commit comments

Comments
 (0)