-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add format and spellcheck CI * more CI * YAS Style * fix arch * wrap tests into testsets * typos * formatter tweak * bump Julia compat * drop macos from testing
- Loading branch information
Showing
18 changed files
with
470 additions
and
383 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 @@ | ||
style = "yas" |
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,49 @@ | ||
--- | ||
name: Style Guide | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- /^release-.*$/ | ||
tags: ["*"] | ||
paths: | ||
- "**/*.jl" | ||
- ".github/workflows/FormatCheck.yml" | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
paths: | ||
- "**/*.jl" | ||
- ".github/workflows/FormatCheck.yml" | ||
jobs: | ||
format-check: | ||
name: Julia | ||
# These permissions are needed to: | ||
# - Delete old caches: https://github.com/julia-actions/cache#usage | ||
# - Post formatting suggestions: https://github.com/reviewdog/action-suggester#required-permissions | ||
permissions: | ||
actions: write | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: "1" | ||
- uses: julia-actions/cache@v2 | ||
- name: Install JuliaFormatter | ||
shell: julia --project=@format --color=yes {0} | ||
run: | | ||
using Pkg | ||
Pkg.add(PackageSpec(; name="JuliaFormatter", version="1")) | ||
- name: Check formatting | ||
shell: julia --project=@format --color=yes {0} | ||
run: | | ||
using JuliaFormatter | ||
format(".", YASStyle(); verbose=true) || exit(1) | ||
# Add formatting suggestions to non-draft PRs even if when "Check formatting" fails | ||
- uses: reviewdog/action-suggester@185c9c06d0a28fbe43b50aca4b32777b649e7cbd # v1.12.0 | ||
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.draft == false }} | ||
with: | ||
tool_name: JuliaFormatter |
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,21 @@ | ||
# adapted from https://github.com/JuliaDocs/Documenter.jl/blob/master/.github/workflows/SpellCheck.yml | ||
# see docs at https://github.com/crate-ci/typos | ||
name: Spell Check | ||
on: [pull_request] | ||
|
||
jobs: | ||
typos-check: | ||
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: crate-ci/typos@b74202f74b4346efdbce7801d187ec57b266bac8 # v1.27.3 | ||
with: | ||
config: _typos.toml | ||
write_changes: true | ||
- uses: reviewdog/action-suggester@v1 | ||
with: | ||
tool_name: Typos | ||
fail_on_error: 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
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,3 @@ | ||
[default.extend-words] | ||
# don't current this name | ||
Shepard = "Shepard" |
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
using PyMNE, PythonCall, TopoPlots | ||
channels = ["fp1", "f3", "c3", "p3", "o1", "f7", "t3", "t5", "fz", "cz", "pz", "fp2", "f4", "c4", "p4", "o2", "f8", "t4", "t6"] | ||
channels = ["fp1", "f3", "c3", "p3", "o1", "f7", "t3", "t5", "fz", "cz", "pz", "fp2", "f4", | ||
"c4", "p4", "o2", "f8", "t4", "t6"] | ||
info = pycall(PyMNE.mne.create_info, PyObject, channels, 120.0; ch_types="eeg") | ||
info.set_montage("standard_1020"; match_case=false) | ||
layout = PyMNE.mne.find_layout(info) | ||
write(TopoPlots.assetpath("layout_10_20.bin"), hcat(layout.pos[:, 1], layout.pos[:, 2])) | ||
write(TopoPlots.assetpath("layout_10_20.bin"), hcat(layout.pos[:, 1], layout.pos[:, 2])) | ||
|
||
#--- | ||
|
||
using CSV,DataFrames | ||
using CSV, DataFrames | ||
|
||
loc2d = CSV.read(TopoPlots.assetpath("1005.tsv"),DataFrame) # taken from https://github.com/sappelhoff/eeg_positions/blob/main/data/Fpz-T8-Oz-T7/standard_1005_2D.tsv | ||
write(TopoPlots.assetpath("layout_10_05.bin"),hcat(loc2d.x,loc2d.y)) | ||
loc2d = CSV.read(TopoPlots.assetpath("1005.tsv"), DataFrame) # taken from https://github.com/sappelhoff/eeg_positions/blob/main/data/Fpz-T8-Oz-T7/standard_1005_2D.tsv | ||
write(TopoPlots.assetpath("layout_10_05.bin"), hcat(loc2d.x, loc2d.y)) |
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
Oops, something went wrong.