Skip to content

Commit

Permalink
MAINT: Fix bug with overrides (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Dec 12, 2022
1 parent daabeb8 commit 762e5e8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# <img src="https://raw.github.com/mne-tools/mne-bids-pipeline/main/docs/source/assets/mne.svg" alt="MNE Logo" height="20"> The MNE-BIDS-Pipeline

<!--keep description in sync with pyproject.toml-->

<!--tagline-start-->
**The MNE-BIDS-Pipeline is a full-flegded processing pipeline for your MEG and
EEG data.** It operates on data stored according to the [Brain Imaging Data
Structure (BIDS)](https://bids.neuroimaging.io/). Under the hood, it uses [MNE-Python](https://mne.tools).

<!--tagline-end-->

## 💡 Basic concepts and features

<!--features-list-start-->

* 🐾 Data processing as a sequence of standard processing steps.
* ⏩ Steps are cached to avoid unnecessary recomputation.
* ⏏ Data can be "ejected" from the pipeline at **any** stage. No lock-in!
Expand All @@ -16,6 +23,8 @@ Structure (BIDS)](https://bids.neuroimaging.io/). Under the hood, it uses [MNE-P
* 💻 Execution via an easy-to-use command-line utility.
* 🆘 Helpful error messages in case something goes wrong.

<!--features-list-end-->

## 📘 Installation and usage instructions

Please find the documentation at
Expand Down
24 changes: 24 additions & 0 deletions docs/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import logging
from typing import Dict, Any

from mkdocs.config.defaults import MkDocsConfig

logger = logging.getLogger('mkdocs')

config_updated = False


# Ideally there would be a better hook, but it's unclear if context can
# be obtained any earlier
def on_template_context(
context: Dict[str, Any],
template_name: str,
config: MkDocsConfig,
) -> None:
"""Update the copyright in the footer."""
global config_updated
if not config_updated:
config_updated = True
now = context['build_date_utc'].strftime('%Y/%m/%d')
config.copyright = f'{config.copyright}, last updated {now}'
logger.info(f'Updated copyright to {config.copyright}')
5 changes: 4 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ site_name: MNE-BIDS-Pipeline
repo_url: https://github.com/mne-tools/mne-bids-pipeline
edit_uri: edit/main/docs/source/
# Keep this in sync with pyproject.toml and index.md
site_description: The MNE-BIDS-Pipeline is a standardized pipeline for automated processing of MEG and EEG data.
site_description: The MNE-BIDS-Pipeline is a full-flegded processing pipeline for your MEG and EEG data.
site_author: MNE-BIDS-Pipeline authors
docs_dir: ./source
site_dir: ./site
Expand All @@ -17,6 +17,7 @@ theme:
- navigation.tracking
palette:
primary: white
custom_dir: overrides
extra:
social:
- icon: fontawesome/brands/github
Expand All @@ -31,6 +32,8 @@ extra:
version:
provider: mike
default: stable
hooks:
- ./hooks.py

copyright: Copyright &copy; MNE-BIDS-Pipeline authors

Expand Down
14 changes: 6 additions & 8 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
What is the MNE-BIDS-Pipeline?
==============================
# What is the MNE-BIDS-Pipeline?

**The MNE-BIDS-Pipeline is a standardized processing pipeline for your MEG and
EEG data.**

It operates on raw data stored according to the Brain Imaging Data
Structure (BIDS). Processing is controlled using a simple human-readable
configuration file.
{%
include-markdown "../../README.md"
start="<!--tagline-start-->"
end="<!--tagline-end-->"
%}

[Learn more](features/features.md){: .md-button } &nbsp;
[Get started :fontawesome-solid-rocket:](getting_started/install.md){: .md-button .md-button--primary }
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "mne-bids-pipeline"
description = "A standardized processing pipeline for your MEG and EEG data"
# Keep in sync with README.md:
description = "A full-flegded processing pipeline for your MEG and EEG data"
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE.txt"}
Expand Down

0 comments on commit 762e5e8

Please sign in to comment.