Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eyelink sync #2

Open
wants to merge 133 commits into
base: main_hochberger
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
3b17158
Prepare for 1.4.0 release (#753)
hoechenberger Jul 4, 2023
49c2e31
MAINT: Cleanup dependencies and doc build (#755)
larsoner Jul 5, 2023
4d16356
ENH: Add annotation of head velocity (#757)
larsoner Jul 6, 2023
ccbac54
BUG: Fix bug with cache invalidation (#756)
larsoner Jul 6, 2023
ea37de0
ENH: Add T1 and FLASH BEM to website (#758)
larsoner Jul 6, 2023
e5d5f1f
BUG: Fix bug with empty room processing (#761)
larsoner Jul 10, 2023
721162a
ENH: More compact logging (#764)
larsoner Jul 18, 2023
62dde41
ENH: Add eSSS (#762)
larsoner Jul 18, 2023
81d6f55
ENH: Cache grand-average steps (#765)
larsoner Jul 19, 2023
018552e
MAINT: Test MD5 hashing too (#768)
larsoner Jul 19, 2023
ea95979
ENH: Better logging of distances (#769)
larsoner Jul 19, 2023
4b289c9
MAINT: pre-commit.ci (#774)
larsoner Aug 7, 2023
721e728
Added deriv_root argument to CLI (#773)
vferat Aug 7, 2023
5c19b94
MAINT: Use pooch for downloading web data (#775)
larsoner Aug 7, 2023
a931cae
[pre-commit.ci] pre-commit autoupdate (#776)
pre-commit-ci[bot] Aug 8, 2023
918cc3b
API: Change default to _cache (#778)
larsoner Aug 14, 2023
34350ce
[pre-commit.ci] pre-commit autoupdate (#780)
pre-commit-ci[bot] Aug 15, 2023
7a5d01d
ENH: Validate inputs with pydantic (#779)
larsoner Aug 15, 2023
866c2bb
TST: Rerun CIs (#781)
larsoner Aug 18, 2023
f512fe9
BUG: Fix bug where individual invs were not rendered (#782)
larsoner Aug 18, 2023
dad6aa9
[pre-commit.ci] pre-commit autoupdate (#784)
pre-commit-ci[bot] Aug 22, 2023
8ee8d8d
[pre-commit.ci] pre-commit autoupdate (#786)
pre-commit-ci[bot] Aug 29, 2023
e58675c
[pre-commit.ci] pre-commit autoupdate (#787)
pre-commit-ci[bot] Sep 5, 2023
0b4bfcc
[pre-commit.ci] pre-commit autoupdate (#788)
pre-commit-ci[bot] Sep 12, 2023
38138d3
[pre-commit.ci] pre-commit autoupdate (#789)
pre-commit-ci[bot] Sep 19, 2023
5dac5cb
[pre-commit.ci] pre-commit autoupdate (#790)
pre-commit-ci[bot] Sep 26, 2023
f781b59
MAINT: Fix bug with item (#791)
larsoner Sep 26, 2023
754c85f
[pre-commit.ci] pre-commit autoupdate (#792)
pre-commit-ci[bot] Oct 4, 2023
f99ada6
Ensure link in "You're not viewing the latest stable version" banner…
hoechenberger Oct 19, 2023
9904fb3
[pre-commit.ci] pre-commit autoupdate (#795)
pre-commit-ci[bot] Oct 23, 2023
327cb94
Reduce logging output when creating and saving reports (#799)
hoechenberger Oct 30, 2023
2ff1a35
Use inst.pick() instead of inst.pick_types() (#800)
hoechenberger Oct 30, 2023
8843a38
Use cleaned epochs for sensor-space decoding (#796)
hoechenberger Oct 30, 2023
4f5e465
[pre-commit.ci] pre-commit autoupdate (#803)
pre-commit-ci[bot] Oct 30, 2023
1bc1e82
Add "picard-extended_infomax" ICA algorithm (#801)
hoechenberger Oct 31, 2023
03cc03a
Do not reject epochs based on PTP threshold before ICA cleaning (#806)
hoechenberger Nov 2, 2023
418a2e7
Add `"autoreject_local"` as new option for `preprocessing/ptp_reject`…
hoechenberger Nov 3, 2023
db45d21
ENH: Table sorting and ds004229 updates (#809)
larsoner Nov 4, 2023
3931daf
[pre-commit.ci] pre-commit autoupdate (#811)
pre-commit-ci[bot] Nov 6, 2023
abd5458
Add support for `autoreject` (local) before running ICA (#810)
hoechenberger Nov 7, 2023
8d8717d
BUG: Fix bug with verbosity
larsoner Nov 7, 2023
76b1dd7
Do not interpolate bad segments using autoreject before ICA (#816)
hoechenberger Nov 13, 2023
1705142
Omit bad channels when gathering data used for decoding (#817)
hoechenberger Nov 13, 2023
08ee388
[pre-commit.ci] pre-commit autoupdate (#818)
pre-commit-ci[bot] Nov 20, 2023
87a64b1
Allow decoding using epochs at different stages of pre-processing (#819)
hoechenberger Nov 21, 2023
6dd86f9
Prepare for 1.5.0 release (#821)
larsoner Nov 30, 2023
bae0b2e
FIX: PyQt6 (#822)
larsoner Nov 30, 2023
bc6c166
The "Behavior changes" heading was incorrectly commented out in the c…
hoechenberger Dec 7, 2023
cc63122
MAINT: Fix CIs (#824)
larsoner Dec 7, 2023
a6995ab
Switch build backend to hatchling (#825)
hoechenberger Dec 8, 2023
c624a10
[pre-commit.ci] pre-commit autoupdate (#826)
pre-commit-ci[bot] Dec 11, 2023
00daafe
[pre-commit.ci] pre-commit autoupdate (#827)
pre-commit-ci[bot] Dec 18, 2023
885fd15
[pre-commit.ci] pre-commit autoupdate (#828)
pre-commit-ci[bot] Dec 25, 2023
ffab60a
[pre-commit.ci] pre-commit autoupdate (#829)
pre-commit-ci[bot] Jan 8, 2024
9055e9c
[pre-commit.ci] pre-commit autoupdate (#830)
pre-commit-ci[bot] Jan 15, 2024
860c5c4
FIX: Paths and pyarrow (#834)
larsoner Jan 24, 2024
742e27e
MAINT: Test result caching (#836)
larsoner Jan 24, 2024
cc93c66
MAINT: Enable more ruff rules (#838)
larsoner Jan 26, 2024
ce233bd
ENH: Add artifact regression (#837)
larsoner Jan 27, 2024
a65f278
BUG: Fix several bugs (#839)
larsoner Jan 30, 2024
2796d01
[pre-commit.ci] pre-commit autoupdate (#843)
pre-commit-ci[bot] Feb 5, 2024
92be603
ENH: Write out raw data and SSP events (#840)
larsoner Feb 6, 2024
fe56c01
BUG: Fix bug with Maxwell step when find_noise_channels_meg=False (#847)
larsoner Feb 7, 2024
d76abaa
[pre-commit.ci] pre-commit autoupdate (#851)
pre-commit-ci[bot] Feb 13, 2024
9f8b170
BUG: Fix bug with multichannel classification (#853)
larsoner Feb 15, 2024
5d4e3c3
ENH: Better event count rep and noise_cov_method (#854)
larsoner Feb 16, 2024
3c9a22c
BUG: Fix bug with split epochs and ICA (#855)
larsoner Feb 19, 2024
4e6733d
[pre-commit.ci] pre-commit autoupdate (#856)
pre-commit-ci[bot] Feb 20, 2024
61b3553
DOC: Automatic flowchart (#860)
larsoner Feb 26, 2024
e663d93
DOC: Automatically document settings (#863)
larsoner Feb 28, 2024
4c73c2c
add image_kwargs to report (#859)
SophieHerbst Feb 29, 2024
324d4b4
MAINT: Remove datalad (#867)
larsoner Mar 1, 2024
94256f7
ENH: Split ICA into multiple steps (#865)
larsoner Mar 1, 2024
525646a
ENH: Document relevant steps (#866)
larsoner Mar 1, 2024
5a1ef0e
ENH: Doc config in sheet (#869)
larsoner Mar 1, 2024
fbee2d1
Fix a typo in the readme (#871)
hoechenberger Mar 3, 2024
022c59b
Enable stricter linting (#872)
hoechenberger Mar 4, 2024
5afe560
Improve logging during cache invalidation (#877)
hoechenberger Mar 7, 2024
b52742e
Update contributing instructions and remove outdated building instruc…
hoechenberger Mar 7, 2024
60e6a54
Fix handling of `analyze_channels` for EEG data, where some steps (li…
hoechenberger Mar 12, 2024
0d2b87a
[pre-commit.ci] pre-commit autoupdate (#885)
pre-commit-ci[bot] Mar 13, 2024
f0f0baf
Remove ancient config parameter `shortest_event` (#888)
hoechenberger Mar 14, 2024
5f046fc
Add missing release dates to changelog (#887)
hoechenberger Mar 14, 2024
04b9fac
Explicitly depend on `annotated-types` (#886)
hoechenberger Mar 14, 2024
1c2a081
MAINT: Check that all options are used (#889)
larsoner Mar 14, 2024
45e4c13
BUG: Fix bug with CSP computation and Maxwell filter (#890)
larsoner Mar 15, 2024
541eb9b
[pre-commit.ci] pre-commit autoupdate (#891)
pre-commit-ci[bot] Mar 18, 2024
313dc18
MAINT: Print longer traceback on report error (#892)
larsoner Mar 20, 2024
06d2bb9
Set up Dependabot to automatically keep GitHub Actions up-to-date (#893)
hoechenberger Mar 20, 2024
d770879
[dependabot]: Bump actions/setup-python from 4 to 5 (#894)
dependabot[bot] Mar 20, 2024
8f23780
[dependabot]: Bump actions/download-artifact from 3 to 4 (#895)
dependabot[bot] Mar 20, 2024
90baed9
[dependabot]: Bump actions/upload-artifact from 3 to 4 (#896)
dependabot[bot] Mar 20, 2024
71f9f18
[dependabot]: Bump codecov/codecov-action from 3 to 4 (#898)
dependabot[bot] Mar 20, 2024
be6850a
[dependabot]: Bump actions/checkout from 3 to 4 (#897)
dependabot[bot] Mar 20, 2024
8e5546f
add n sbs to report (#902)
SophieHerbst Mar 25, 2024
ed5939a
[pre-commit.ci] pre-commit autoupdate (#903)
pre-commit-ci[bot] Mar 25, 2024
96251a8
Drop support for Python 3.9, drop `Optional` and `Union` from type hi…
hoechenberger Mar 28, 2024
f74d9eb
Render type annotations in the documentation again (#909)
hoechenberger Mar 28, 2024
59d83fa
MAINT: Ensure input changes cause output changes (#904)
larsoner Mar 28, 2024
8cc0754
Add number of subjects to grand-average report (cont'd) (#910)
SophieHerbst Mar 29, 2024
9706946
Do not show `Annotated` types in configuration options documentation …
hoechenberger Mar 29, 2024
635b49a
Try to fix documentation deployment (#913)
hoechenberger Mar 29, 2024
00d390c
Restructure configuration options documentation sections (#914)
hoechenberger Mar 30, 2024
d8c1e4b
[pre-commit.ci] pre-commit autoupdate (#917)
pre-commit-ci[bot] Apr 2, 2024
3eccc1d
enhance documentation of caching, continuation of #914 (#918)
SophieHerbst Apr 2, 2024
6288770
Improve documentation and config validation of `loose` and `depth` pa…
hoechenberger Apr 2, 2024
cbeeb98
change default for info to use for inverse #905 (#919)
SophieHerbst Apr 2, 2024
856dfe2
ENH: Streamline ICA reporting (#899)
larsoner Apr 16, 2024
79e19c1
[pre-commit.ci] pre-commit autoupdate (#923)
pre-commit-ci[bot] Apr 16, 2024
148a785
Support variable time windows for epochs metadata creation (#874)
hoechenberger Apr 22, 2024
04331fa
Raise a more helpful error message when requested subjects are missin…
hoechenberger Apr 22, 2024
a46c980
[pre-commit.ci] pre-commit autoupdate (#929)
pre-commit-ci[bot] Apr 23, 2024
a52c00c
Fix report section on original raw data (didn't contain bad channels …
hoechenberger Apr 23, 2024
ec1c8fd
In the report TOC, don't put the run numbers in quotation marks (#933)
hoechenberger Apr 23, 2024
b80ed31
Rename `ica_ctps_ecg_threshold` to `ica_ecg_threshold` (#935)
hoechenberger Apr 24, 2024
4d3a878
Improve logging output when rejecting epochs; and log number of recon…
hoechenberger Apr 24, 2024
afdf160
Save ECG and EOG evokeds created during ICA artifact detection to dis…
hoechenberger Apr 24, 2024
7e1d9f9
Improve logging during ICA artifact discovery and rejection (#937)
hoechenberger Apr 24, 2024
44a884f
DOC: Fix typo (#940)
larsoner Apr 26, 2024
31ee24e
[pre-commit.ci] pre-commit autoupdate (#942)
pre-commit-ci[bot] Apr 29, 2024
88b3e4f
[pre-commit.ci] pre-commit autoupdate (#945)
pre-commit-ci[bot] May 6, 2024
2872b98
MAINT: Cleaner hook into mkdocstrings-python (#943)
larsoner May 7, 2024
87be595
[pre-commit.ci] pre-commit autoupdate (#947)
pre-commit-ci[bot] May 13, 2024
0a87002
remove ref-names from .git_archival.txt (#948)
sappelhoff May 14, 2024
fb3116d
initial new step for sync
behinger May 21, 2024
ed6538f
added extras
behinger May 21, 2024
fc75863
adapted parameters of the combine_annotations function to fix synchro…
jschepers May 23, 2024
ab66145
added edf conversion
behinger May 28, 2024
aaf5b32
Merge branch 'eyelink_sync' of https://github.com/s-ccs/mne-bids-pipe…
behinger May 28, 2024
1e96e2d
Replace nan values in the ET data with zeros before synchronizing ET …
jschepers May 28, 2024
f54ca71
Use EEG sync event regex if ET sync event regex is not given
jschepers May 29, 2024
0c2ece1
Only use EEG channels for the ICA, needs to be more general
jschepers Jun 11, 2024
f7e2303
Added some comments and fixed mistakes
jschepers Jun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 133 additions & 180 deletions .circleci/config.yml

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions .circleci/remove_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

set -eo pipefail

VER=$1
if [ -z "$VER" ]; then
echo "Usage: $0 <version>"
exit 1
fi
ROOT="$PWD/$VER/examples/"
if [ ! -d ${ROOT} ]; then
echo "Version directory does not exist or appears incorrect:"
echo
echo "$ROOT"
echo
echo "Are you on the gh-pages branch and is the ds000117 directory present?"
exit 1
fi
if [ ! -d ${ROOT}ds000117 ]; then
echo "Directory does not exist:"
echo
echo "${ROOT}ds000117"
echo
echo "Assuming already pruned and exiting."
exit 0
fi
echo "Pruning examples in ${ROOT} ..."

find $ROOT -type d -name "*" | tail -n +2 | xargs rm -Rf
find $ROOT -name "*.html" -exec sed -i /^\<h2\ id=\"generated-output\"\>Generated/,/^\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $/{d} {} \;
find $ROOT -name "*.html" -exec sed -i '/^ <a href="#generated-output"/,/^ <\/a>$/{d}' {} \;

echo "Done"
57 changes: 57 additions & 0 deletions .circleci/run_dataset_and_copy_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

set -eo pipefail

COPY_FILES="true"
RERUN_TEST="true"
while getopts "cr" option; do
echo $option
case $option in
c)
COPY_FILES="false";;
r)
RERUN_TEST="false";;
esac
done
shift "$(($OPTIND -1))"

DS_RUN=$1
if [[ -z $1 ]]; then
echo "Missing dataset argument"
exit 1
fi
if [[ "$DS_RUN" == "ERP_CORE_"* ]]; then
DS="ERP_CORE"
else
DS="$1"
fi

SECONDS=0
pytest mne_bids_pipeline --junit-xml=test-results/junit-results.xml -k ${DS_RUN}
echo "Runtime: ${SECONDS} seconds"

# rerun test (check caching)!
SECONDS=0
RERUN_LIMIT=30
if [[ "$RERUN_TEST" == "false" ]]; then
echo "Skipping rerun test"
RUN_TIME=0
else
pytest mne_bids_pipeline --cov-append -k $DS_RUN
RUN_TIME=$SECONDS
echo "Runtime: ${RUN_TIME} seconds (should be <= $RERUN_LIMIT)"
fi
test $RUN_TIME -le $RERUN_LIMIT

if [[ "$COPY_FILES" == "false" ]]; then
echo "Not copying files"
exit 0
fi
mkdir -p ~/reports/${DS}
# these should always exist
cp -av ~/mne_data/derivatives/mne-bids-pipeline/${DS}/*/**/*.html ~/reports/${DS}/
cp -av ~/mne_data/derivatives/mne-bids-pipeline/${DS}/*.xlsx ~/reports/${DS}/
# these are allowed to be optional
cp -av ~/mne_data/derivatives/mne-bids-pipeline/${DS}/*/**/*.json ~/reports/${DS}/ || :
cp -av ~/mne_data/derivatives/mne-bids-pipeline/${DS}/*/**/*.tsv ~/reports/${DS}/ || :
ls -al test-results/*.xml
9 changes: 4 additions & 5 deletions .circleci/setup_bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ fi

# Set up image
sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1
wget -q -O- http://neuro.debian.net/lists/focal.us-tn.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com 0xA5D32F012649A5A9
echo "export RUN_TESTS=\"pytest mne_bids_pipeline --junit-xml=test-results/junit-results.xml -k\"" >> "$BASH_ENV"
echo "export DOWNLOAD_DATA=\"python -m mne_bids_pipeline._download\"" >> "$BASH_ENV"
echo "export RUN_TESTS=\".circleci/run_dataset_and_copy_files.sh\"" >> "$BASH_ENV"
echo "export DOWNLOAD_DATA=\"coverage run -m mne_bids_pipeline._download\"" >> "$BASH_ENV"

# Similar CircleCI setup to mne-python (Xvfb, venv, minimal commands, env vars)
wget -q https://raw.githubusercontent.com/mne-tools/mne-python/main/tools/setup_xvfb.sh
bash setup_xvfb.sh
sudo apt install -qq tcsh git-annex-standalone python3.10-venv python3-venv libxft2
sudo apt install -qq tcsh python3.10-venv python3-venv libxft2
python3.10 -m venv ~/python_env
wget -q https://raw.githubusercontent.com/mne-tools/mne-python/main/tools/get_minimal_commands.sh
source get_minimal_commands.sh
Expand All @@ -57,6 +55,7 @@ echo 'export MPLBACKEND=Agg' >> "$BASH_ENV"
echo "source ~/python_env/bin/activate" >> "$BASH_ENV"
echo "export MNE_3D_OPTION_MULTI_SAMPLES=1" >> "$BASH_ENV"
echo "export MNE_BIDS_PIPELINE_FORCE_TERMINAL=true" >> "$BASH_ENV"
echo "export FORCE_COLOR=1" >> "$BASH_ENV" # for rich to use color in logs
mkdir -p ~/.local/bin
if [[ ! -f ~/.local/bin/python ]]; then
ln -s ~/python_env/bin/python ~/.local/bin/python
Expand Down
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependabot"
commit-message:
prefix: "[dependabot]"
1 change: 1 addition & 0 deletions .github/workflows/circleci-redirector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ jobs:
uses: larsoner/circleci-artifacts-redirector-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLECI_TOKEN }}
artifact-path: 0/site/index.html
circleci-jobs: build_docs
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Check env vars
run: |
echo "Triggered by: ${{ github.event_name }}"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
Expand Down
78 changes: 58 additions & 20 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,70 @@ concurrency:
on: [push, pull_request]

jobs:
check-style:
name: Style
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install ruff and codespell
run: pip install ruff codespell tomli
- run: make ruff
- run: make codespell-error
- uses: psf/black@stable
check-doc:
name: Doc consistency
name: Doc consistency and codespell
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install --upgrade setuptools[toml] pip
- run: pip install --no-build-isolation -ve .[tests]
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install --upgrade pip
- run: pip install -ve .[tests] codespell tomli
- run: make codespell-error
- run: pytest mne_bids_pipeline -m "not dataset_test"
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
if: success()
name: 'Upload coverage to CodeCov'
caching:
name: 'Caching on ${{ matrix.os }}'
timeout-minutes: 30
continue-on-error: true
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
env:
MNE_BIDS_PIPELINE_LEGACY_WINDOWS: "false"
PYTHONIOENCODING: 'utf8' # for Windows
steps:
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- uses: actions/setup-python@v5
with:
python-version: "3.11" # no "multidict" wheels on 3.12 yet
- run: pip install -ve .[tests]
- uses: actions/cache@v4
with:
key: ds001971
path: ~/mne_data/ds001971
id: ds001971-cache
- run: python -m mne_bids_pipeline._download ds001971
if: steps.ds001971-cache.outputs.cache-hit != 'true'
- run: pytest --cov-append -k ds001971 mne_bids_pipeline/
- run: pytest --cov-append -k ds001971 mne_bids_pipeline/ # uses "hash" method
timeout-minutes: 1
- uses: actions/cache@v4
with:
key: ds003392
path: ~/mne_data/ds003392
id: ds003392-cache
- run: python -m mne_bids_pipeline._download ds003392
if: steps.ds003392-cache.outputs.cache-hit != 'true'
- run: pytest --cov-append -k ds003392 mne_bids_pipeline/
- run: pytest --cov-append -k ds003392 mne_bids_pipeline/ # uses "mtime" method
timeout-minutes: 1
- uses: codecov/codecov-action@v4
if: success()
26 changes: 14 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
---
# Eventually we should use yamllint, too
files: ^(.*\.(py|yaml))$
exclude: ^(\.[^/]*cache/.*)$
# We need to match the exclude list in pyproject.toml because pre-commit.ci
# passes filenames and these do not get passed through the tool.black filter
# for example
exclude: ^(\.[^/]*cache/.*|.*/freesurfer/contrib/.*)$
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args:
- --safe
- --quiet
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.178
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict]
9 changes: 0 additions & 9 deletions BUILDING.md

This file was deleted.

22 changes: 8 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
# Overview
# Contributing to MNE-BIDS-Pipeline

Contributors to MNE-BIDS-Pipeline are expected to follow our
[Code of Conduct](https://github.com/mne-tools/.github/blob/main/CODE_OF_CONDUCT.md).

# Installation
## Installation

First, you need to make sure you have MNE-Python installed and working on your
system. See the [installation instructions](http://martinos.org/mne/stable/install_mne_python.html).
Once this is done, you should be able to run this in a terminal:

`$ python -c "import mne; mne.sys_info()"`

You can then install the following additional packages via `pip`. Note that
You can then install the following additional package via `pip`. Note that
the URL points to the bleeding edge version of `mne_bids`:

`$ pip install datalad`
`$ pip install https://github.com/mne-tools/mne-bids/zipball/main`

To get the test data, you need to install `git-annex` on your system. If you
installed MNE-Python via `conda`, you can simply call:

`conda install -c conda-forge git-annex`

Now, get the pipeline through git:

`$ git clone https://github.com/mne-tools/mne-bids-pipeline.git`
Expand All @@ -32,9 +26,9 @@ If you do not know how to use git, download the pipeline as a zip file
Finally, for source analysis you'll also need `FreeSurfer`, follow the
instructions on [their website](https://surfer.nmr.mgh.harvard.edu/).

# Testing
## Testing

## Running the tests, and continuous integration
### Running the tests, and continuous integration

The tests are run using `pytest`. You can run them by calling
`pytest mne_bids_pipeline` to run
Expand All @@ -48,17 +42,17 @@ For every pull request or merge into the `main` branch of the
[CircleCI](https://circleci.com/gh/brainthemind/CogBrainDyn_MEG_Pipeline)
will run tests as defined in `./circleci/config.yml`.

## Debugging
### Debugging

To run the test in debugging mode, just pass `--pdb` to the `pytest` call
as usual. This will place you in debugging mode on failure.
See the
[pdb help](https://docs.python.org/3/library/pdb.html#debugger-commands)
for more commands.

## Config files
### Config files

Nested in the `/tests` directory is a `/configs` directory, which contains
Nested in the `tests` directory is a `configs` directory, which contains
config files for specific test datasets. For example, the `config_ds001810.py`
file specifies parameters only for the `ds001810` data, which should overwrite
the more general parameters in the main `_config.py` file.
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ doc:

check:
which python
git-annex version
datalad --version
openneuro-py --version
mri_convert --version
mne_bids --version
Expand All @@ -33,10 +31,6 @@ check:
trailing-spaces:
find . -name "*.py" | xargs perl -pi -e 's/[ \t]*$$//'

ruff:
ruff .
@echo "ruff passed"

codespell: # running manually; auto-fix spelling mistakes
@codespell --write-changes $(CODESPELL_DIRS)

Expand Down
Loading