Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Documentation Build and Deploy

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

permissions:
contents: write

jobs:
build-docs:
name: Build Documentation
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[all]"

- name: Build HTML documentation
run: |
cd docs
make html
env:
SPHINXOPTS: ""

- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/html/
retention-days: 7

- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
publish_branch: gh-pages
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,9 @@ matlab/clean_rawdata

# for now excluded; may introduce for purposes of hard-locking dev deps
uv.lock

*.DS_Store

# Sphinx documentation
docs/build/
docs/source/auto_examples/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# EEGPrep

[![Documentation Status](https://github.com/sccn/eegprep/actions/workflows/docs.yml/badge.svg)](https://github.com/sccn/eegprep/actions/workflows/docs.yml)
[![GitHub Pages](https://github.com/sccn/eegprep/actions/workflows/pages.yml/badge.svg)](https://sccn.github.io/eegprep/)

EEGPrep is a Python package that reproduces the EEGLAB default preprocessing pipeline with numerical accuracy down to 1e-5 uV, including clean_rawdata and ICLabel, enabling MATLAB-to-Python equivalence for EEG analysis. It takes BIDS data as input and produces BIDS derivative dataset as output, which can then be reimported into other packages as needed (EEGLAB, Fieldtrip, Brainstorm, MNE). It does produce plots. The package will be fully documented for conversion, packaging, and testing workflows, with installation available via PyPI.

**📚 [View Full Documentation](https://sccn.github.io/eegprep/)** | **🔧 [GitHub Pages Setup Guide](docs/GITHUB_PAGES_SETUP.md)**

## Pre-Release

EEGPrep is currently in a pre-release phase. It functions end-to-end (bids branch) but has not yet been tested with multiple BIDS datasets. The documentation is incomplete, and use is at your own risk. The planned release is scheduled for the end of 2025.
Expand Down
18 changes: 0 additions & 18 deletions TODO.md

This file was deleted.

6 changes: 0 additions & 6 deletions config.json.example

This file was deleted.

83 changes: 83 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXBUILD ?= sphinx-build
SPHINXOPTS ?= --keep-going
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make help" is always printed when you enter `make` without arguments
.PHONY: help
help:
@echo "Sphinx documentation build targets:"
@echo ""
@echo " make html - Build HTML documentation"
@echo " make clean - Remove build artifacts"
@echo " make linkcheck - Check for broken links"
@echo " make spelling - Check spelling"
@echo " make serve - Serve documentation locally on port 8000"
@echo ""
@echo "Variables:"
@echo " SPHINXBUILD = $(SPHINXBUILD)"
@echo " SPHINXOPTS = $(SPHINXOPTS)"
@echo " SOURCEDIR = $(SOURCEDIR)"
@echo " BUILDDIR = $(BUILDDIR)"

# Clean build artifacts
.PHONY: clean
clean:
@echo "Removing build artifacts..."
@rm -rf $(BUILDDIR)
@rm -rf $(SOURCEDIR)/auto_examples
@echo "Build artifacts removed successfully."

# Build HTML documentation
.PHONY: html
html:
@echo "Building HTML documentation..."
@$(SPHINXBUILD) -b html $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@if [ $$? -eq 0 ]; then \
echo ""; \
echo "Build finished successfully! The HTML pages are in $(BUILDDIR)/html"; \
else \
echo "Build failed!"; \
exit 1; \
fi

# Check for broken links
.PHONY: linkcheck
linkcheck:
@echo "Checking for broken links..."
@$(SPHINXBUILD) -b linkcheck $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/linkcheck
@if [ $$? -eq 0 ]; then \
echo ""; \
echo "Link check finished! Results are in $(BUILDDIR)/linkcheck"; \
else \
echo "Link check failed!"; \
exit 1; \
fi

# Check spelling
.PHONY: spelling
spelling:
@echo "Checking spelling..."
@$(SPHINXBUILD) -b spelling $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/spelling
@if [ $$? -eq 0 ]; then \
echo ""; \
echo "Spelling check finished! Results are in $(BUILDDIR)/spelling"; \
else \
echo "Spelling check failed!"; \
exit 1; \
fi

# Serve documentation locally
.PHONY: serve
serve: html
@echo "Serving documentation on http://localhost:8000"
@echo "Press Ctrl+C to stop the server"
@cd $(BUILDDIR)/html && python -m http.server 8000

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -b $@ $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/$@
Empty file added docs/source/_static/.gitkeep
Empty file.
Loading
Loading