-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from s-ccs/docum
Docum Adding basic scripts for docs and tests
- Loading branch information
Showing
16 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- '1' | ||
os: | ||
- ubuntu-latest | ||
arch: | ||
- x64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
- uses: actions/cache@v1 | ||
env: | ||
cache-name: cache-artifacts | ||
with: | ||
path: ~/.julia/artifacts | ||
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-test-${{ env.cache-name }}- | ||
${{ runner.os }}-test- | ||
${{ runner.os }}- | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
file: lcov.info | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: '1' | ||
- run: | | ||
julia --project=docs -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate()' | ||
- run: | | ||
julia --project=docs -e ' | ||
using Documenter: DocMeta, doctest | ||
using ERPExplorer | ||
DocMeta.setdocmeta!(ERPExplorer, :DocTestSetup, :(using ERPExplorer); recursive=true) | ||
doctest(ERPExplorer)' | ||
- run: julia --project=docs docs/make.jl | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: CompatHelper | ||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
jobs: | ||
CompatHelper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pkg.add("CompatHelper") | ||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")' | ||
- name: CompatHelper.main() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} | ||
run: julia -e 'using CompatHelper; CompatHelper.main()' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: TagBot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Format suggestions | ||
on: | ||
pull_request: | ||
jobs: | ||
code-style: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[deps] | ||
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" | ||
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" | ||
DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964" | ||
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
ERPExplorer = "a0936657-5da6-42c1-a2f2-44cfa89f194c" | ||
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" | ||
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" | ||
Unfold = "181c99d8-e21b-4ff3-b70b-c233eddec679" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# ERPExplorer Highlights | ||
|
||
# ERPExplorer.jl allows interactive exploration of regression-ERPs. | ||
# You can switch on and off formula terms, term values, row and column faceting, line colours and style, marker style. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using ERPExplorer | ||
using Documenter | ||
using DocStringExtensions | ||
|
||
# preload once | ||
|
||
using CairoMakie | ||
const Makie = CairoMakie # - for references | ||
using Unfold | ||
using DataFrames | ||
using DataFramesMeta | ||
using Literate | ||
using Glob | ||
|
||
GENERATED = joinpath(@__DIR__, "src", "generated") | ||
SOURCE = joinpath(@__DIR__, "literate") | ||
for subfolder ∈ ["intro"] #["how_to", "intro", "tutorials", "explanations"] | ||
local SOURCE_FILES = Glob.glob(subfolder * "/*.jl", SOURCE) | ||
foreach(fn -> Literate.markdown(fn, GENERATED * "/" * subfolder), SOURCE_FILES) | ||
end | ||
|
||
DocMeta.setdocmeta!(ERPExplorer, :DocTestSetup, :(using ERPExplorer); recursive = true) | ||
|
||
makedocs(; | ||
modules = [ERPExplorer], | ||
authors = "Vladimir Mikheev, Simon Danisch, Benedikt Ehinger", | ||
repo = Documenter.Remotes.GitHub("s-ccs", "ERPExplorer.jl"), | ||
sitename = "ERPExplorer.jl", | ||
warnonly = :cross_references, | ||
format = Documenter.HTML(; | ||
prettyurls = get(ENV, "CI", "false") == "true", | ||
canonical = "https://s-css.github.io/ERPExplorer.jl", | ||
assets = String[], | ||
), | ||
pages = [ | ||
"ERPExplorer highlights" => "index.md", | ||
#"Plotting" => "generated/intro/toposeries.md", | ||
#"Diagnostics" => "generated/intro/gnostics.md", | ||
"API / DocStrings" => "api.md", | ||
], | ||
) | ||
|
||
deploydocs(; | ||
repo = "github.com/s-ccs/ERPExplorer.jl", | ||
devbranch = "main", | ||
versions = "v#.#", | ||
push_preview = true, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using LiveServer | ||
servedocs( | ||
skip_dir = joinpath("src", "generated"), | ||
literate_dir = joinpath("literate"), | ||
literate = joinpath("literate"), | ||
foldername = ".", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```@autodocs | ||
Modules = [ERPExplorer] | ||
Order = [:function] | ||
``` | ||
|
||
Internally, we use a `PlotConfig` struct to keep track of common plotting options, so that all functions have a similar API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# ERPExplorer Highlights | ||
|
||
# ERPExplorer.jl allows interactive exploration of regression-ERPs. | ||
# You can switch on and off formula terms, term values, row and column faceting, line colours and style, marker style. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dataS, evts, pos2d = gen_data() | ||
formulaS = @formula(0 ~ 1 + luminance + fruit + animal) | ||
times = range(0, length = size(dataS, 2), step = 1 ./ 100) | ||
model = Unfold.fit(UnfoldModel, formulaS, evts, dataS, times) | ||
_, positions = TopoPlots.example_data() | ||
|
||
@testset "basic test" begin | ||
explore(model; positions = positions) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include("setup.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using ERPExplorer | ||
using Test | ||
|
||
path = dirname(Base.current_project()) | ||
include(path * "/docs/gen_data.jl") |