Skip to content

Commit

Permalink
move Makie support to an extension (#109)
Browse files Browse the repository at this point in the history
* move Makie support to an extension

* test fix for Julia 1.10

* update CI
  • Loading branch information
palday authored Mar 13, 2024
1 parent 2008c9f commit 2feb223
Show file tree
Hide file tree
Showing 9 changed files with 562 additions and 458 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
tags:
- v*
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}-TrialReportCI
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - Makie - ${{ matrix.makie }}
Expand All @@ -16,29 +21,24 @@ jobs:
matrix:
version:
- '1'
- '1.7'
- '1.9'
- '1.6'
os:
- ubuntu-latest
arch:
- x64
makie:
- '0.20'
env:
JULIA_NUM_THREADS: 2
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v2
- uses: julia-actions/cache@v1
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-artifacts-${{ hashFiles('**/Project.toml') }}
restore-keys: ${{ runner.os }}-test-artifacts
cache-compiled: true
cache-name: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}-${{ matrix.makie }}
- name: "Install Makie and instantiate project"
shell: julia --color=yes --project {0}
run: |
Expand All @@ -54,17 +54,22 @@ jobs:
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
version: '1.10'
- uses: julia-actions/cache@v1
with:
cache-compiled: true
cache-name: ${{ github.workflow }}-${{ github.job }}
- run: |
julia --project=docs -e '
using Pkg
Expand Down
11 changes: 9 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Lighthouse"
uuid = "ac2c24cd-07f0-4848-96b2-1b82c3ea0e59"
authors = ["Beacon Biosignals, Inc."]
version = "0.16.0"
version = "0.17.0"

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

[weakdeps]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"

[extensions]
LighthouseMakieExt = ["Makie"]

[compat]
Arrow = "2.3"
ArrowTypes = "1, 2"
Expand All @@ -33,8 +39,9 @@ julia = "1.6"
[extras]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Arrow", "CairoMakie", "StableRNGs"]
test = ["Test", "Arrow", "CairoMakie", "Makie", "StableRNGs"]
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Lighthouse = "ac2c24cd-07f0-4848-96b2-1b82c3ea0e59"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"

[compat]
Expand Down
8 changes: 8 additions & 0 deletions docs/src/plotting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
!!! note
All plotting functions require a valid Makie backend, e.g. CairoMakie, to be loaded.
If there is no backend loaded, then functions won't do anything interesting.
On Julia 1.9+, Makie is a weak dependency and so won't incur any compilation/dependency
cost without a backend. On Julia < 1.9, Makie will still be loaded, but without a
backend, the resulting figure will not be rendered.

# Confusion matrices

```@docs
Expand Down Expand Up @@ -82,6 +89,7 @@ Note that all curve plot types accepts these types:
Lighthouse.XYVector
Lighthouse.SeriesCurves
```

## Theming

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

2 comments on commit 2feb223

@palday
Copy link
Member Author

@palday palday commented on 2feb223 Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/102829

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.17.0 -m "<description of version>" 2feb22365d17e7ff3cc1a5677b7df199648e3d22
git push origin v0.17.0

Please sign in to comment.