Skip to content

Commit 2feb223

Browse files
authored
move Makie support to an extension (#109)
* move Makie support to an extension * test fix for Julia 1.10 * update CI
1 parent 2008c9f commit 2feb223

File tree

9 files changed

+562
-458
lines changed

9 files changed

+562
-458
lines changed

.github/workflows/CI.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
tags:
88
- v*
99
pull_request:
10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: only if it is a pull request build.
13+
group: ${{ github.workflow }}-${{ github.ref }}-TrialReportCI
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1015
jobs:
1116
test:
1217
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - Makie - ${{ matrix.makie }}
@@ -16,29 +21,24 @@ jobs:
1621
matrix:
1722
version:
1823
- '1'
19-
- '1.7'
24+
- '1.9'
2025
- '1.6'
2126
os:
2227
- ubuntu-latest
2328
arch:
2429
- x64
2530
makie:
2631
- '0.20'
27-
env:
28-
JULIA_NUM_THREADS: 2
2932
steps:
30-
- uses: actions/checkout@v2
31-
with:
32-
fetch-depth: 0
33+
- uses: actions/checkout@v4
3334
- uses: julia-actions/setup-julia@v1
3435
with:
3536
version: ${{ matrix.version }}
3637
arch: ${{ matrix.arch }}
37-
- uses: actions/cache@v2
38+
- uses: julia-actions/cache@v1
3839
with:
39-
path: ~/.julia/artifacts
40-
key: ${{ runner.os }}-test-artifacts-${{ hashFiles('**/Project.toml') }}
41-
restore-keys: ${{ runner.os }}-test-artifacts
40+
cache-compiled: true
41+
cache-name: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}-${{ matrix.makie }}
4242
- name: "Install Makie and instantiate project"
4343
shell: julia --color=yes --project {0}
4444
run: |
@@ -54,17 +54,22 @@ jobs:
5454
env:
5555
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
5656
- uses: julia-actions/julia-processcoverage@v1
57-
- uses: codecov/codecov-action@v2
57+
- uses: codecov/codecov-action@v4
5858
with:
5959
file: lcov.info
60+
token: ${{ secrets.CODECOV_TOKEN }}
6061
docs:
6162
name: Documentation
6263
runs-on: ubuntu-latest
6364
steps:
64-
- uses: actions/checkout@v2
65+
- uses: actions/checkout@v4
6566
- uses: julia-actions/setup-julia@v1
6667
with:
67-
version: '1.6'
68+
version: '1.10'
69+
- uses: julia-actions/cache@v1
70+
with:
71+
cache-compiled: true
72+
cache-name: ${{ github.workflow }}-${{ github.job }}
6873
- run: |
6974
julia --project=docs -e '
7075
using Pkg

Project.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Lighthouse"
22
uuid = "ac2c24cd-07f0-4848-96b2-1b82c3ea0e59"
33
authors = ["Beacon Biosignals, Inc."]
4-
version = "0.16.0"
4+
version = "0.17.0"
55

66
[deps]
77
ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd"
@@ -18,6 +18,12 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1818
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1919
TensorBoardLogger = "899adc3e-224a-11e9-021f-63837185c80f"
2020

21+
[weakdeps]
22+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
23+
24+
[extensions]
25+
LighthouseMakieExt = ["Makie"]
26+
2127
[compat]
2228
Arrow = "2.3"
2329
ArrowTypes = "1, 2"
@@ -33,8 +39,9 @@ julia = "1.6"
3339
[extras]
3440
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
3541
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
42+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
3643
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
3744
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3845

3946
[targets]
40-
test = ["Test", "Arrow", "CairoMakie", "StableRNGs"]
47+
test = ["Test", "Arrow", "CairoMakie", "Makie", "StableRNGs"]

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
Lighthouse = "ac2c24cd-07f0-4848-96b2-1b82c3ea0e59"
45
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
56

67
[compat]

docs/src/plotting.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
!!! note
2+
All plotting functions require a valid Makie backend, e.g. CairoMakie, to be loaded.
3+
If there is no backend loaded, then functions won't do anything interesting.
4+
On Julia 1.9+, Makie is a weak dependency and so won't incur any compilation/dependency
5+
cost without a backend. On Julia < 1.9, Makie will still be loaded, but without a
6+
backend, the resulting figure will not be rendered.
7+
18
# Confusion matrices
29

310
```@docs
@@ -82,6 +89,7 @@ Note that all curve plot types accepts these types:
8289
Lighthouse.XYVector
8390
Lighthouse.SeriesCurves
8491
```
92+
8593
## Theming
8694

8795
All generic series and axis attributes can be themed via `SeriesPlot.Series` / `SeriesPlot.Axis`.

0 commit comments

Comments
 (0)