Skip to content

Commit 4fe7938

Browse files
authored
Add docs (#35)
* Add docs * Fix warning
1 parent f49858c commit 4fe7938

File tree

9 files changed

+38
-20
lines changed

9 files changed

+38
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
*.jl.*.cov
33
*.jl.mem
44
deps/deps.jl
5+
docs/build/
56
*.odg

.travis.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ language: julia
55
os:
66
- linux
77
- osx
8+
- windows
89

910
julia:
1011
- 1.4
@@ -27,21 +28,16 @@ git:
2728
env:
2829
- JULIA_CUDA_SILENT=true
2930

30-
## uncomment the following lines to allow failures on nightly julia
31-
## (tests will run but not make your overall status red)
32-
matrix:
33-
allow_failures:
34-
- julia: nightly
35-
36-
## uncomment and modify the following lines to manually install system packages
37-
#addons:
38-
# apt: # apt-get for linux
39-
# packages:
40-
# - gfortran
41-
#before_script: # homebrew for mac
42-
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi
43-
44-
# uncomment the following lines to override the default test script
45-
# script:
46-
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
47-
# - julia -e 'using Pkg; Pkg.add(PackageSpec(url=pwd())); Pkg.build("GeometricFlux"); Pkg.test("GeometricFlux"; coverage=true)'
31+
jobs:
32+
allow_failures:
33+
- julia: nightly
34+
fast_finish: true
35+
include:
36+
- stage: Documentation
37+
julia: 1.4
38+
script: julia --project=docs -e '
39+
using Pkg;
40+
Pkg.develop(PackageSpec(path=pwd()));
41+
Pkg.instantiate();
42+
include("docs/make.jl");'
43+
after_success: skip

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<img width="400px" src="https://github.com/yuehhua/GeometricFlux.jl/raw/master/logos/logo.png"/>
55
</p>
66

7+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://yuehhua.github.io/GeometricFlux.jl/stable)
8+
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://yuehhua.github.io/GeometricFlux.jl/dev)
79
[![Build Status](https://travis-ci.org/yuehhua/GeometricFlux.jl.svg?branch=master)](https://travis-ci.org/yuehhua/GeometricFlux.jl)
810
[![codecov](https://codecov.io/gh/yuehhua/GeometricFlux.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/yuehhua/GeometricFlux.jl)
911
[![pipeline status](https://gitlab.com/JuliaGPU/GeometricFlux-jl/badges/master/pipeline.svg)](https://gitlab.com/JuliaGPU/GeometricFlux-jl/commits/master)

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "0.24"

docs/make.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ makedocs(
55
sitename = "GeometricFlux",
66
format = Documenter.HTML(),
77
modules = [GeometricFlux],
8-
analytics = "",
98
pages = ["Home" => "index.md",
109
"Manual" =>
1110
["Convolutional Layers" => "manual/conv.md",
1211
"Pooling Layers" => "manual/pool.md",
13-
"Models" => "manual/models.md"]
12+
"Models" => "manual/models.md",
13+
"Linear Algebra" => "manual/linalg.md",
14+
"Utilities" => "manual/utils.md"]
1415
]
1516
)
1617

docs/src/manual/linalg.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Linear Algebra
2+
3+
4+
```@docs
5+
GeometricFlux.degrees
6+
```

docs/src/manual/utils.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Utilities
2+
3+
```@docs
4+
GeometricFlux.save_div
5+
```

src/linalg.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Degree of each vertex. Return a vector which contains the degree of each vertex
1212
1313
# Examples
1414
```jldoctest
15+
julia> using GeometricFlux
16+
1517
julia> m = [0 1 1; 1 0 0; 1 0 0];
1618
1719
julia> GeometricFlux.degrees(m)

src/utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ end
4949
identity(; kwargs...) = kwargs.data
5050

5151
"""
52+
save_div(x, y)
53+
5254
Savely divde `x` by `y`. If `y` is zero, return `x` directly.
5355
"""
5456
save_div(x, y) = ifelse(iszero(y), x, x/y)

0 commit comments

Comments
 (0)