Skip to main content

Snakebids

Tests Version Python versions DOI License: MIT

This repository implements the Snakebids builder function for Bids Paths. You can install this library as a stand-alone package via pip (see below), however, its contents are repackaged in the main snakebids repository.

Snakebids is a Python package that extends Snakemake, enabling users to create reproducible, scalable pipelines for processing neuroimaging data in the BIDS format. Snakebids workflows expose a CLI that conforms to the BIDS App guidelines.

Features

The bids() function is a flexible, unopinionated tool to build valid bids paths in a clean, pythonic syntax. It tries to support all the official bids tags, but allows any arbitrary custom tags as well. Entities are automatically ordered according to the bids spec.

Installation

Snakebids can be installed using pip:

pip install bids_path

Usage

To use, just import the bids() function:

from bids_path import bids

Note that bids() is just one piece of the broader snakebids. If snakebids is installed, bids() can be imported directly from the snakebids namespace:

from snakebids import bids

For detailed instructions and examples, please refer to the documentation.

Contributing

Snakebids is an open-source project, and contributions are welcome! If you have any bug reports, feature requests, or improvements, please submit them to the issues page.

To contribute, first clone the Github repository. bids_path dependencies are managed with Poetry (version 1.2 or higher). Please refer to the poetry website for installation instructions.

Note: bids_path makes use of Poetry's dynamic versioning. To see a version number on locally installed Snakebids versions, you will have to also install poetry-dynamic-versioning plugin to your poetry installation (`poetry self add "poetry-dynamic-versioning[plugin]"). This is not required for contribution.

Following installation of Poetry, the development can be set up by running the following commands:

poetry install
poetry run poe setup

bids_path uses poethepoet as a task runner. You can see what commands are available by running:

poetry run poe

Tests are done with pytest and can be run via:

poetry run poe test

Additionally, bids_path uses pre-commit hooks (installed via the poe setup command above) to lint and format code (we use black, isort and ruff). By default, these hooks are run on every commit. Please be sure they all pass before making a PR.

License

bids_path is distributed under the MIT License.

Metadata

Release files for bids-path 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bids-path 0.0.1
File Size Uploaded Provenance Actions
bids_path-0.0.1.tar.gz 7.3 kB Without provenance Details for bids_path-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bids-path 0.0.1
File Interpreter ABI Platform Actions
bids_path-0.0.1-py3-none-any.whl Python 3 none any Details for bids_path-0.0.1-py3-none-any.whl

Total release size: 15.3 kB

Release files / bids_path-0.0.1.tar.gz

Download URL bids_path-0.0.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a78aa709a9fcfdc0e9f6eb2eafc67584911c3c8bd53221079ba1cfbbd196b557
BLAKE2b-256 checksum
How to use checksums
8856c97e2b470b209e89953a0029abd81144b23dfd823fd60b1c6d7b719a6790
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.0 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / bids_path-0.0.1-py3-none-any.whl

Download URL bids_path-0.0.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d34e054a9aed3f8be4deda4dc6d4871560301ee0272ae7fb3fea2f82dfd6d9c6
BLAKE2b-256 checksum
How to use checksums
0b94a75bf3c842f623fb908cfefd116c4547f4bca2817ea5b2926f553fc54369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.0 Linux/5.15.90.1-microsoft-standard-WSL2

Security for bids-path 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page