Skip to content

Commit 767aa2b

Browse files
authored
Update Pollen.jl documentation (#262)
* Update Pollen.jl documentation * Fix tests and add compat
1 parent cd74e12 commit 767aa2b

32 files changed

+240
-309
lines changed

.github/workflows/pollen.build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
tag:
5+
description: 'The version tag to associate with this documentation build, e.g. "dev", "stable", "pr-201"'
6+
required: true
7+
default: "dev"
8+
type: string
9+
docdir:
10+
description: "Path of the subdirectory where Pollen's Project.toml, make.jl, and project.jl are stored."
11+
required: false
12+
default: "docs"
13+
type: string
14+
databranch:
15+
description: "Branch where the generated documentation is stored"
16+
required: false
17+
default: "pollen"
18+
type: string
19+
juliaversion:
20+
description: "Julia version to use when building the documentation"
21+
required: false
22+
default: "1.8"
23+
type: string
24+
25+
jobs:
26+
pollen:
27+
name: "Pollen - Build documentation data"
28+
runs-on: ubuntu-latest
29+
steps:
30+
# Check out the package directory at the branch that triggered
31+
# the workflow
32+
- uses: actions/checkout@v2
33+
# Check out Pollen.jl's data branch, where the generated documentation
34+
# data will be stored.
35+
- uses: actions/checkout@v2
36+
with:
37+
ref: ${{inputs.databranch}}
38+
path: pollen
39+
# Install Julia
40+
- uses: julia-actions/setup-julia@latest
41+
with:
42+
version: ${{inputs.juliaversion}}
43+
# Install the package to-be-documented and its dependencies. Also adds
44+
- name: "Install package and docs dependencies"
45+
run: |
46+
julia --color=yes --project=./${{inputs.docdir}} -e 'using Pkg; Pkg.develop([Pkg.PackageSpec(path="."), Pkg.PackageSpec(path="./FastVision"), Pkg.PackageSpec(path="./FastMakie"), Pkg.PackageSpec(path="./FastTabular"), Pkg.PackageSpec(url="https://github.com/lorenzoh/Pollen.jl")]); Pkg.instantiate();'
47+
# Build the documentation data and annotate it with the package tag
48+
- name: Build
49+
run: |
50+
julia --color=yes --project=./${{inputs.docdir}} ./${{inputs.docdir}}/make.jl ./pollen/ ${{inputs.tag}}
51+
- name: Deploy
52+
run: |
53+
cd pollen
54+
git config user.name github-actions
55+
git config user.email [email protected]
56+
git add .
57+
git commit -m "Build documentation data (Pollen.jl)"
58+
git push

.github/workflows/pollen.render.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
name: "Pollen - Prerender static frontend and deploy"
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
with:
1818
ref: pollen
1919
path: data
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
with:
2222
ref: "gh-pages"
2323
path: pages
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
with:
2626
repository: lorenzoh/pollenjl-frontend
2727
path: frontend
@@ -31,7 +31,7 @@ jobs:
3131
ls
3232
rm -rf data/.git
3333
cp -r data/ frontend/static/
34-
- uses: actions/setup-node@v2
34+
- uses: actions/setup-node@v3
3535
- name: Install dependencies
3636
run: |
3737
cd frontend
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Pollen.jl build - dev
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
pollen:
11+
name: "Pollen - Build documentation on push to main"
12+
uses: "./.github/workflows/pollen.build.yml"
13+
with:
14+
tag: dev
15+
secrets: inherit
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Pollen.jl build - PR preview
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
pollen:
8+
name: "Pollen - Build documentation on push to main"
9+
uses: "./.github/workflows/pollen.build.yml"
10+
with:
11+
tag: pr-${{ github.event.number }}
12+
secrets: inherit
13+
commentonpr:
14+
runs-on: ubuntu-latest
15+
needs: pollen
16+
name: "Comment on pull request"
17+
steps:
18+
- name: Comment PR
19+
uses: unsplash/[email protected]
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
msg: "A documentation preview has been successfully built, view it here: [Documentation preview PR-${{github.event.number}}](https://${{github.event.repository.owner.login}}.github.io/${{github.event.repository.name}}/pr-${{github.event.pull_request.number}})"
24+
delete_prev_regex_msg: "ocumentation preview PR"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pollen.jl build - Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
pollen:
9+
name: "Pollen - Build documentation on push to main"
10+
uses: "./.github/workflows/pollen.build.yml"
11+
with:
12+
tag: ${{github.event.release.name}}
13+
secrets: inherit
14+
pollenstable:
15+
name: "Pollen - Build documentation on push to main"
16+
uses: "./.github/workflows/pollen.build.yml"
17+
with:
18+
tag: stable
19+
secrets: inherit

.github/workflows/pollenbuild.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/pollenpr.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/pollenstatic.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ docs/Manifest.toml
44
development/**
55
Manifest.toml
66
**/*.jld2
7-
*.so
7+
*.so
8+
SysimagePreferences.toml

FastTabular/src/container.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,3 @@ Base.length(dataset::TableDataset{<:CSV.File}) = length(dataset.table)
9292
rm("test.csv")
9393
end
9494
end
95-
96-
@testset "TimeSeriesDataset" begin
97-
@testset "TimeSeriesDataset from TS" begin
98-
folderpath = datasetpath("atrial")
99-
filepath = joinpath(folderpath, "AtrialFibrillation_TRAIN.ts")
100-
tsd = TimeSeriesDataset(filepath)
101-
@test tsd isa TimeSeriesDataset{}
102-
@test size(getindex(tsd, 10)) == (2, 640)
103-
@test length(tsd) == 15
104-
end
105-
end

0 commit comments

Comments
 (0)