Skip to main content

A lightweight, easy to modify pipeline controller for data processing (e.g. eeg, meg, etc.).

Project description

About the Lightweight Pipeline

As the name suggests - a lightweight, easy to modify pipeline. Initially built for EEG analysis using MNE-Python and MNE-BIDS.

Main design criterion is to keep the controller part minimal.

Table of Contents

Goals

  • Provide a scheme to model concrete pipeline steps after.
  • Take care of a configuration file handling and saving/loading to some extend.
  • Decouple the content of a pipeline, i.e. its processing logic, from the organisatorial part.

Usage: rough idea and trivial example

Start by creating a project folder containing:

steps/__init__.py: empty

steps/00_steps.py:

from lw_pipeline import Pipeline_Step

class A_First_Pipeline_Step(Pipeline_Step):
    def __init__(self, config):
        super().__init__("This is a description of a first step.", config)

    def step(self, data):
        print(f"Here data is '{data}'.")
        data = self.config.variable_a
        return data

class A_Second_Pipeline_Step(Pipeline_Step):
    def __init__(self, config):
        super().__init__("This is a description of a second step.", config)

    def step(self, data):
        print(f"Here data is '{data}'.")
        return data

config.py:

steps_dir = "steps/"

variable_a = 1

Now run the following command in the project directory to list the steps detected

lw_pipeline -c config.py --list

while

lw_pipeline -c config.py --run

runs the pipeline entirely. Use --help for further parameter info. You can find a similar example in examples/trivial/.

In a more interesting case, one would pass a data object, e.g. a subclass of Pipeline_Data, through the pipeline. As of now, the pipeline comes with a data container class for processing eeg/meg data utilizing MNE-BIDS.

Minimal example (to use with MNE-BIDS)

For a more interesting example demonstrating eeg/meg processing, we refer to a minimal example.

Installation

To install, clone the github repository, navigate to the folder and execute (for an editable install)

pip install -e ".[dev]"

Contributing

Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request.

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

Comparison

  • The MNE-BIDS-Pipeline provides an actual eeg/meg processing pipeline that bundles logic and content.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lw_pipeline-0.2.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lw_pipeline-0.2.0-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file lw_pipeline-0.2.0.tar.gz.

File metadata

  • Download URL: lw_pipeline-0.2.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lw_pipeline-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a2fef34a4d1347e8fd11e35e56b22100f8019eaa159901aaded4ed65d8e1981e
MD5 7153d400da56b419d27560df6c9d95b7
BLAKE2b-256 5d37b62df0dff8ebc286e1ad8a50b994955cfbe1ddee3c323a79b21d8209da45

See more details on using hashes here.

Provenance

The following attestation bundles were made for lw_pipeline-0.2.0.tar.gz:

Publisher: release.yml on jbkordass/lightweight-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lw_pipeline-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: lw_pipeline-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lw_pipeline-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3e2ea397fc9c4f31bd0ae954d6d1e98bd9e5249b821c92a1f527daee0331832
MD5 c088d9aabdaf9c5369d1492fe654a259
BLAKE2b-256 318ce09d5ae9cd5beb34fe3018d666e624c4c5787b0ad1a97e89bd1f7ab94029

See more details on using hashes here.

Provenance

The following attestation bundles were made for lw_pipeline-0.2.0-py3-none-any.whl:

Publisher: release.yml on jbkordass/lightweight-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page