Skip to content

Commit

Permalink
ENH: Table sorting and ds004229 updates (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Nov 4, 2023
1 parent 418a2e7 commit db45d21
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ jobs:
at: ~/
- restore_cache:
keys:
- data-cache-ds004229-2
- data-cache-ds004229-103
- bash_env
- run:
name: Get ds004229
command: |
$DOWNLOAD_DATA ds004229
- codecov/upload
- save_cache:
key: data-cache-ds004229-2
key: data-cache-ds004229-103
paths:
- ~/mne_data/ds004229

Expand Down Expand Up @@ -719,7 +719,7 @@ jobs:
- bash_env
- restore_cache:
keys:
- data-cache-ds004229-2
- data-cache-ds004229-103
- run:
name: test ds004229
command: $RUN_TESTS ds004229
Expand Down
5 changes: 5 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ copyright: Copyright © MNE-BIDS-Pipeline authors

extra_css:
- css/extra.css
# https://squidfunk.github.io/mkdocs-material/reference/data-tables/
extra_javascript:
- https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js
- javascripts/tablesort.js
nav:
- Home: index.md
- Getting started:
Expand Down Expand Up @@ -172,6 +176,7 @@ markdown_extensions:
repo_url_shorthand: true
repo: mne-bids-pipeline
user: mne-tools
- tables
- toc:
permalink: true # Add paragraph symbol to link to current headline
- pymdownx.tabbed:
Expand Down
3 changes: 2 additions & 1 deletion docs/source/examples/gen_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def _gen_demonstrated_funcs(example_config_path: Path) -> dict:
demonstrated_funcs = _gen_demonstrated_funcs(config_path)
all_demonstrated[dataset_name] = demonstrated_funcs
del config, config_options
# Add the subsection and table header
funcs = [
"## Demonstrated features\n",
"Feature | This example",
Expand All @@ -279,7 +280,7 @@ def _gen_demonstrated_funcs(example_config_path: Path) -> dict:
f.write(config_str)
f.write(report_str)

# Finally, write our examples.html file
# Finally, write our examples.html file with a table of examples

_example_header = """\
# Examples
Expand Down
6 changes: 6 additions & 0 deletions docs/source/javascripts/tablesort.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
document$.subscribe(function() {
var tables = document.querySelectorAll("article table:not([class])")
tables.forEach(function(table) {
new Tablesort(table)
})
})
2 changes: 2 additions & 0 deletions docs/source/v1.5.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ All users are encouraged to update.
per-epochs basis; this can be enabled by setting [`reject`][mne_bids_pipeline._config.reject] to `"autoreject_local"`.
The behavior can further be controlled via the new setting
[`autoreject_n_interpolate`][mne_bids_pipeline._config.autoreject_n_interpolate]. (#807 by @hoechenberger)
- Website documentation tables can now be sorted (e.g., to find examples that use a specific feature) (#808 by @larsoner)

[//]: # (### :warning: Behavior changes)

Expand All @@ -38,6 +39,7 @@ All users are encouraged to update.
- Enable [pre-commit.ci](https://pre-commit.ci) (#774 by @larsoner)
- Use `pooch` for web downloads (#775 by @larsoner)
- Ensure compatibility with MNE-Python 1.6 (#800 by @hoechenberger)
- Updated testing dataset for ds004229 v1.0.3 (#808 by @larsoner)

### :bug: Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion mne_bids_pipeline/_config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def get_mf_cal_fname(
root=config.bids_root,
).meg_calibration_fpath
if mf_cal_fpath is None:
raise ValueError("Could not find Maxwell Filter Calibration " "file.")
raise ValueError("Could not find Maxwell Filter Calibration file.")
else:
mf_cal_fpath = pathlib.Path(config.mf_cal_fname).expanduser().absolute()
if not mf_cal_fpath.exists():
Expand Down
2 changes: 0 additions & 2 deletions mne_bids_pipeline/tests/configs/config_ds004229.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
find_flat_channels_meg = True
find_noisy_channels_meg = True
use_maxwell_filter = True
mf_cal_fname = bids_root + "/derivatives/meg_derivatives/sss_cal.dat"
mf_ctc_fname = bids_root + "/derivatives/meg_derivatives/ct_sparse.fif"
mf_destination = mne.transforms.translation( # rotate backward and move up
z=0.055,
) @ mne.transforms.rotation(x=np.deg2rad(-15))
Expand Down
2 changes: 0 additions & 2 deletions mne_bids_pipeline/tests/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ class DATASET_OPTIONS_T(TypedDict, total=False):
"include": [
"sub-102",
"sub-emptyroom/ses-20000101",
"derivatives/meg_derivatives/ct_sparse.fif",
"derivatives/meg_derivatives/sss_cal.dat",
],
},
}

0 comments on commit db45d21

Please sign in to comment.