Skip to content

Commit d511071

Browse files
authored
move plotting to Makie (#204)
* move plotting to Makie * also use github CI * add library to deps * remove coverage * [wip] remove PyPlot; left at: raysplitting * finish raysplitting * remove unecessary files * push minor docfix
1 parent 59cb7dc commit d511071

28 files changed

+287
-1175
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Minimal Working Example**
14+
Please provide a piece of code that leads to the bug you encounter.
15+
16+
If the code is **runnable**, it will help us identify the problem faster.
17+
18+
**Package version**
19+
20+
Please provide the version you use (you can do `Pkg.status("DynamicalBilliards")`.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.

.github/workflows/CompatHelper.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: CompatHelper
22

33
on:
44
schedule:
5-
- cron: '00 00 * * *'
5+
- cron: '00 * * * *'
66

77
jobs:
88
CompatHelper:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
julia-version: [1.2.0]
12+
julia-version: [1]
1313
julia-arch: [x86]
1414
os: [ubuntu-latest]
1515
steps:

.github/workflows/TagBot.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 * * * *
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
57
jobs:
68
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
710
runs-on: ubuntu-latest
811
steps:
912
- uses: JuliaRegistries/TagBot@v1
1013
with:
1114
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Tests, Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- '1'
19+
os: [ubuntu-latest, windows-latest, macos-latest]
20+
arch:
21+
- x64
22+
steps:
23+
# Cancel ongoing CI test runs if pushing to branch again before the previous tests
24+
# have finished
25+
- name: Cancel ongoing test runs for previous commits
26+
uses: styfle/[email protected]
27+
with:
28+
access_token: ${{ github.token }}
29+
30+
# Do tests
31+
- uses: actions/checkout@v2
32+
- uses: julia-actions/setup-julia@v1
33+
with:
34+
version: ${{ matrix.version }}
35+
arch: ${{ matrix.arch }}
36+
- uses: actions/cache@v2
37+
env:
38+
cache-name: cache-artifacts
39+
with:
40+
path: ~/.julia/artifacts
41+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
42+
restore-keys: |
43+
${{ runner.os }}-test-${{ env.cache-name }}-
44+
${{ runner.os }}-test-
45+
${{ runner.os }}-
46+
- uses: julia-actions/julia-buildpkg@latest
47+
- uses: julia-actions/julia-runtest@latest
48+
49+
docs:
50+
name: Documentation
51+
runs-on: ${{ matrix.os }}
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
version:
56+
- '1'
57+
os:
58+
- ubuntu-18.04
59+
arch:
60+
- x64
61+
steps:
62+
# Cancel ongoing documentation build if pushing to branch again before the previous
63+
# build is finished.
64+
- name: Cancel ongoing builds and checkout
65+
uses: styfle/[email protected]
66+
with:
67+
access_token: ${{ github.token }}
68+
- uses: actions/checkout@v2
69+
- uses: julia-actions/setup-julia@v1
70+
with:
71+
version: '1'
72+
- uses: actions/cache@v1
73+
env:
74+
cache-name: cache-artifacts
75+
with:
76+
path: ~/.julia/artifacts
77+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
78+
restore-keys: |
79+
${{ runner.os }}-test-${{ env.cache-name }}-
80+
${{ runner.os }}-test-
81+
${{ runner.os }}-
82+
- name: Install binary dependencies
83+
run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
84+
- name: Install Julia dependencies
85+
run: >
86+
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'
87+
julia --project=docs -e '
88+
using Pkg
89+
Pkg.develop(PackageSpec(path=pwd()))
90+
Pkg.instantiate()'
91+
- name: Generate documentation and deploy
92+
env: # needed for pushing to gh-pages branch
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
95+
run: >
96+
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'
97+
julia --project=docs --color=yes docs/make.jl

.github/workflows/doccleanup.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
doc-preview-cleanup:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout gh-pages branch
12+
uses: actions/checkout@v2
13+
with:
14+
ref: gh-pages
15+
16+
- name: Delete preview and history
17+
run: |
18+
git config user.name "Documenter.jl"
19+
git config user.email "[email protected]"
20+
git rm -rf "previews/PR$PRNUM"
21+
git commit -m "delete preview"
22+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
23+
env:
24+
PRNUM: ${{ github.event.number }}
25+
26+
- name: Push changes
27+
run: |
28+
git push --force origin gh-pages-new:gh-pages

.travis.yml

-30
This file was deleted.

Project.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
name = "DynamicalBilliards"
22
uuid = "4986ee89-4ee5-5cef-b6b8-e49ba721d7a5"
33
repo = "https://github.com/JuliaDynamics/DynamicalBilliards.jl.git"
4-
version = "3.12.1"
4+
version = "4.0.0"
55

66
[deps]
77
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
88
Elliptic = "b305315f-e792-5b7a-8f41-49f472929428"
99
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
1010
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
11-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
11+
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
1212
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1313
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1414

1515
[compat]
16-
Elliptic = "0.5, 1.0"
17-
Requires = "0.5, 1.0"
18-
StaticArrays = "0.12, 1.0"
16+
Elliptic = "1"
17+
Scratch = "1"
18+
StaticArrays = "1"
1919
julia = "1"

docs/Project.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
[deps]
2+
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
23
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
34
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
45
DynamicalBilliards = "4986ee89-4ee5-5cef-b6b8-e49ba721d7a5"
5-
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
6+
InteractiveDynamics = "ec714cd0-5f51-11eb-0b6e-452e7367ff84"
7+
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
68
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
9+
libsass_jll = "47bcb7c8-5119-555a-9eeb-0afcc36cd728"
10+
11+
[compat]
12+
Documenter = "0.24.6"
13+
libsass_jll = "~3.5"

docs/make.jl

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
cd(@__DIR__)
22
using Pkg
3-
Pkg.activate(@__DIR__)
43
CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing
4+
CI && Pkg.activate(@__DIR__)
55
CI && Pkg.instantiate()
66

77
using DynamicalBilliards
8-
using Documenter, PyPlot, DocumenterTools
8+
using Documenter, DocumenterTools, Literate
9+
using InteractiveDynamics, CairoMakie
910

1011
# %%
1112
using DocumenterTools: Themes
@@ -23,12 +24,14 @@ end
2324
Themes.compile(joinpath(@__DIR__, "juliadynamics-light.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-light.css"))
2425
Themes.compile(joinpath(@__DIR__, "juliadynamics-dark.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"))
2526

26-
27-
ioff()
28-
27+
# %% Build docs
28+
using Literate
29+
infile = joinpath(pkgdir(InteractiveDynamics), "docs", "src", "billiards.jl")
30+
outdir = joinpath(@__DIR__, "src")
31+
Literate.markdown(infile, outdir; credit = false, name = "billiards_visualizations")
2932

3033
makedocs(
31-
modules=[DynamicalBilliards],
34+
modules=[DynamicalBilliards, InteractiveDynamics],
3235
doctest=false,
3336
depth = 1,
3437
sitename= "DynamicalBilliards.jl",
@@ -43,7 +46,7 @@ format = Documenter.HTML(
4346
pages = [
4447
"Introduction" => "index.md",
4548
"High Level API" => "basic/high_level.md",
46-
"Visualizing & Animating" => "visualizing.md",
49+
"Visualizing & Animating" => "billiards_visualizations.md",
4750
"Phase Spaces" => "basic/phasespaces.md",
4851
"Ray-Splitting" => "ray-splitting.md",
4952
"Lyapunov Exponents" => "lyapunovs.md",
@@ -53,14 +56,10 @@ pages = [
5356
"Tutorials" => [
5457
"Defining a Billiard" => "tutorials/billiard_table.md",
5558
"Defining your own Obstacles" => "tutorials/own_obstacle.md",
56-
"Examples" => "tutorials/examples.md",
5759
]
5860
],
5961
)
6062

61-
close("all")
62-
ion()
63-
6463
if CI
6564
deploydocs(
6665
repo = "github.com/JuliaDynamics/DynamicalBilliards.jl.git",

docs/mkdocs.yml

-51
This file was deleted.

0 commit comments

Comments
 (0)