This release is a pre-release and may not be stable for production use.
BEP032 tools
This repository collects tools supporting the BEP032 proposal. It originally emerged under the name AnDO (Animal Data Organization) and gathers a set of tools facilitating the usage of the proposed structure. For the documentation of BIDS itself, see https://bids-specification.readthedocs.io. The proposal is open to any type of feedback from the community and we are welcoming all types of constructive comments.
The provided tools integrating with BEP032 are :
-
BEP032Validator script to check if your dataset follows the current BEP032 rules
-
BEP032Generator script to create a BEP032 compatible folder structure without metadata files for a given set of subjects and sessions. These files need to be listed in an input CSV file.
-
BEP032Templater script to generate a BEP032 compatible folder structure including dummy files to be extended manually, e.g. using Excel or a text editor
-
BEP032Viewer script to display your dataset directory in a convenient way. (deprecated)
The official documentation is hosted on ReadTheDocs.
Installation
Dependencies
BEP032Validator requires:
- Python (>= 3.7)
- Pip3
User installation
To include all packages required for the BEP032 tools download the repository from https://github.com/INT-NIT/BEP032tools and run the following in the unpacked version of the repository
> pip install BEP032tools[tools]
By installing BEP032Validator the following scripts will be installed:
General usage for the BEP032Validator script
usage: BEP032Validator.py [-h] [-v] path
positional arguments:
path Path to your folder
optional arguments: -h, --help show this help message and exit
-v, --verbose increase output verbosity
Specific usage
The validator can be directly used from the command line interface (CLI)
> BEP032Validator -v tests/dataset001/Landing
or from within Python
> from bep032tools.validator import BEP032Validator
> BEP032Validator.is_valid('tests/dataset001/Landing')
General usage for the Generator script
The generator can be used to create a BEP032 compatible folder structure (without metadata files) based on a list of sessions and subject. This list of sessions and subject has to be provided in form of a CSV file:
usage: BEP032Generator.py [-h] pathToCsv pathToDir
positional arguments:
pathToCsv Path to your folder
pathToDir Path to your csv file
optional arguments:
-h, --help show this help message and exit
The generator can be directly used from the command line interface (CLI)
> BEP032Generator data.csv data/
General usage for the Templater script
usage: BEP032Temlater.py [-h] pathToCsv pathToDir
positional arguments:
pathToCsv Path to your folder
pathToDir Path to your csv file
optional arguments:
-h, --help show this help message and exit
The templater can be directly used from the command line interface (CLI)
> BEP032Templater data.csv data/
How to create a BEP032 structure including custom metadata
There are two options to add custom metadata (files) to a BEP032 structure
- Generation of the structure including dummy metadata files using the
BEP032Templatorand manual entry of the metadata in those files. - Programmatic extension of the
BEP032Generator. For this you need to create a Python class that inherits frombep032tools.generator.BE032Generatorand implements the missing metadata methods:generate_metadata_file_sessionsgenerate_metadata_file_tasksgenerate_metadata_file_dataset_descriptiongenerate_metadata_file_participantsgenerate_metadata_file_probesgenerate_metadata_file_probesgenerate_metadata_file_channelsgenerate_metadata_file_contactsgenerate_metadata_file_scans
These methods should fetch the corresponding metadata information from your project specific location and create the corresponding CSV or JSON file using the generator.utils.save_json and generator.utils.save_tsv functions correspondingly. When all missing methods are implemented generator.BEP032Generator.generate_struct() will not only create the corresponding folder structure, but also all metadata files with the metadata provided.
Installation issues
In some cases pandas might not be properly installed via pip. In this case we recommend installing pandas via conda.
Development
We welcome new contributors of all experience levels.
Important links
- Official source code repo: https://github.com/INT-NIT/BEP032tools
- (In planning) Download releases: https://pypi.org/project/BEP032tools/
- Issue tracker:https://github.com/INT-NIT/BEP032tools/issues
Contributing
To contribute to the development of BEP032tools, please open an issue or pull request or directly comment in the BEP032 proposal.
Metadata
Release files for BEP032tools 0.3.32.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bep032tools-0.3.32.dev0.tar.gz | 38.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| BEP032tools-0.3.32.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.3 kB
Release files / bep032tools-0.3.32.dev0.tar.gz
| Download URL | bep032tools-0.3.32.dev0.tar.gz |
|---|---|
| Size | 38.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0dce6a6f367e55df43c0ac01a9448bd56f3729c006fa375c469a2b1353d9630
|
|
BLAKE2b-256 checksum How to use checksums |
a5dc7d3274d7f6ce96ae3f87f79f75e676ca635e3dbcc0fa0993cef5bae4231a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / BEP032tools-0.3.32.dev0-py3-none-any.whl
| Download URL | BEP032tools-0.3.32.dev0-py3-none-any.whl |
|---|---|
| Size | 54.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
896410996c986671254cbad7f956cb14c82471bb293d0dee7680f94629e9abc0
|
|
BLAKE2b-256 checksum How to use checksums |
f70d28972c3754cf19780b4f78574e837671f62d50365f987c8b26005a72ae29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Security for BEP032tools 0.3.32.dev0
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.