Skip to content

Commit 8ec212b

Browse files
authored
initialize documentation (#27)
1 parent 5687005 commit 8ec212b

File tree

7 files changed

+99
-11
lines changed

7 files changed

+99
-11
lines changed

.github/workflows/docs.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Documentation
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'release-'
9+
tags: '*'
10+
release:
11+
types: [published]
12+
13+
jobs:
14+
build:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
julia-version: [1]
19+
os: [ubuntu-latest]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: julia-actions/setup-julia@latest
23+
with:
24+
version: ${{ matrix.julia-version }}
25+
- name: Cache artifacts
26+
uses: actions/cache@v1
27+
env:
28+
cache-name: cache-artifacts
29+
with:
30+
path: ~/.julia/artifacts
31+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
32+
restore-keys: |
33+
${{ runner.os }}-test-${{ env.cache-name }}-
34+
${{ runner.os }}-test-
35+
${{ runner.os }}-
36+
- name: Install dependencies
37+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
38+
- name: Build and deploy
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
run: julia --project=docs/ docs/make.jl

README.md

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

33
[![Build Status](https://github.com/JuliaImages/ImageBase.jl/workflows/CI/badge.svg)](https://github.com/JuliaImages/ImageBase.jl/actions)
44
[![Coverage](https://codecov.io/gh/JuliaImages/ImageBase.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaImages/ImageBase.jl)
5+
[![][docs-stable-img]][docs-stable-url]
6+
[![][docs-dev-img]][docs-dev-url]
57

68
This is a twin package to [ImageCore] with functions that are used among many of the packages in JuliaImages.
79
The main purpose of this package is to reduce unnecessary compilation overhead from external dependencies.
810

911
This package reexports [ImageCore] so can be a direct replacement of it.
1012

11-
This package can be seen as an experimental package inside JuliaImages:
12-
13-
1. functions here might be moved to a seperate package if they get better supports (with more dependency), and
14-
2. is very conservative to external dependencies outside JuliaImages unless there is a real need, in which case,
15-
it may just fit the first case.
16-
17-
Functions provided by this package:
18-
19-
- `restrict` for two-fold image downsample. (Originally from ImageTransformations.jl)
20-
- finite difference operator `fdiff`/`fdiff!` (Originally from Images.jl)
13+
Check the [reference page](https://juliaimages.org/ImageCore.jl/stable/reference) for more information of the functions.
2114

2215

2316
[ImageCore]: https://github.com/JuliaImages/ImageCore.jl
17+
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
18+
[docs-stable-url]: https://JuliaImages.github.io/ImageBase.jl/stable
19+
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
20+
[docs-dev-url]: https://JuliaImages.github.io/ImageBase.jl/latest

docs/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
ImageBase = "c817782e-172a-44cc-b673-b171935fbb9e"
4+
ImageShow = "4e3cecfd-b093-5904-9786-8bbb286a6a31"

docs/make.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Documenter, ImageBase, ImageShow
2+
3+
format = Documenter.HTML(edit_link = "master",
4+
prettyurls = get(ENV, "CI", nothing) == "true")
5+
6+
makedocs(modules = [ImageBase, ],
7+
format = format,
8+
sitename = "ImageBase",
9+
pages = ["index.md", "reference.md"])
10+
11+
deploydocs(repo = "github.com/JuliaImages/ImageBase.jl.git")

docs/src/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ImageBase
2+
3+
4+
This is a twin package to [ImageCore] with functions that are used among many of the packages in JuliaImages.
5+
The main purpose of this package is to reduce unnecessary compilation overhead from external dependencies.
6+
7+
This package reexports [ImageCore] so can be a direct replacement of it.
8+
9+
Check the [reference page](@ref function_reference) for more information.

docs/src/reference.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [Reference](@id function_reference)
2+
3+
## Spatial transformation
4+
5+
- `restrict` originally lives in [ImageTransformation.jl](https://github.com/JuliaImages/ImageTransformations.jl). This function is still reexported by ImageTransformation.
6+
7+
```@docs
8+
restrict
9+
```
10+
11+
## Discrete gradient operator
12+
13+
```@autodocs
14+
Modules = [ImageBase.FiniteDiff]
15+
order = [:module, :function]
16+
```
17+
18+
## Statistics
19+
20+
```@docs
21+
minimum_finite
22+
maximum_finite
23+
meanfinite
24+
varfinite
25+
sumfinite
26+
```

src/diff.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fdiff(A::AbstractArray; kwargs...) = fdiff!(similar(A, maybe_floattype(eltype(A)
8989
"""
9090
fdiff!(dst::AbstractArray, src::AbstractArray; dims::Int, rev=false, boundary=:periodic)
9191
92-
The in-place version of [`ImageBase.fdiff`](@ref)
92+
The in-place version of [`fdiff`](@ref)
9393
"""
9494
function fdiff!(dst::AbstractArray, src::AbstractArray;
9595
dims=_fdiff_default_dims(src),

0 commit comments

Comments
 (0)