Development#
This guide provides information for developers who want to contribute to or extend AutoClean EEG.
Setting Up Development Environment#
Prerequisites:
Python 3.10 or higher
Git
Clone the repository:
git clone https://github.com/cincibrainlab/autoclean_pipeline cd autoclean_pipeline
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install development dependencies:
pip install -e ".[dev]"
Project Structure#
The project is organized as follows:
configs/
: Configuration templatessrc/autoclean/core/
: Core classes and functionalitypipeline.py
: Main entry point for the APItask.py
: Base class for all task implementations
src/autoclean/io/
: Modular processing functionsexport.py
: Exporting functionsimport.py
: Importing functions
src/autoclean/mixins/signal_processing/
: Signal processing related functionssrc/autoclean/mixins/viz/
: Visualization related functionssrc/autoclean/step_functions/
: Modular processing functionscontinuous.py
: Core preprocessing stepsreports.py
: Post-task reports such as processing log
src/autoclean/plugins/
: Import and event handling pluginssrc/autoclean/tasks/
: Task implementationsresting_eyes_open.py
: Resting state taskassr_default.py
: ASSR taskAnd others…
src/autoclean/utils/
: Utility functionsconfig.py
: Configuration handlingdatabase.py
: Database operationslogging.py
: Logging functionality
src/autoclean/tools/
: Additional features for the pipelineautoclean_review.py
: Review GUI
Architecture#
AutoClean follows a modular architecture with several key components:
Pipeline Class: Central coordinator that manages configuration, processing, and output.
Task Classes: Implementations for specific EEG paradigms (resting state, ASSR, etc.).
Step Functions: Modular processing operations that can be combined into workflows.
Database Tracking: Database-backed tracking of processing runs.
The architecture uses a combination of:
Abstract Base Classes: For extensibility and consistent interfaces
Mixins: For shared functionality across tasks
Asynchronous Processing: For parallel file processing
YAML Configuration: For reproducible processing parameters