Automatic parsing of subjects' tabular data and imaging metadata into Neurobagel graph-compatible JSONLD files.
Project description
The Neurobagel CLI is a Python command-line tool to automatically parse and describe subject phenotypic and imaging attributes in an annotated dataset for integration into the Neurobagel graph.
For information on how to use the CLI, please refer to the official Neurobagel documentation.
Installation
The Neurobagel CLI is available as a Python package that can be installed from PyPI using:
pip install bagel
(If you prefer to run the CLI using Docker or Singularity containers instead, please refer to the Neurobagel documentation.)
Development environment
Setting up a local development environment
To work on the CLI, we suggest that you create a development environment that is as close as possible to the environment we run in production.
-
Clone the repository
git clone https://github.com/neurobagel/bagel-cli.git cd bagel-cli
-
Install the CLI and all development dependencies in editable mode:
pip install -e ".[dev]"
-
Install the
bids-examplesandneurobagel_examplessubmodules needed to run the test suite:git submodule init git submodule update
Confirm that everything works well by running the tests:
pytest .
Setting up code formatting and linting (recommended)
pre-commit is configured in the development environment for this repository, and can be set up to automatically run a number of code linters and formatters on any commit you make according to the consistent code style set for this project.
Run the following from the repository root to install the configured pre-commit "hooks" for your local clone of the repo:
pre-commit install
pre-commit will now run automatically whenever you run git commit.
Updating dependencies
If new runtime or development dependencies are needed, add them to pyproject.toml using minimal version constraints.
Regenerating the Neurobagel vocabulary file
Terms in the Neurobagel namespace (nb prefix) and their class relationships are serialized to a file
called nb_vocab.ttl, which is automatically
uploaded to new Neurobagel graph deployments.
This vocabulary is used by Neurobagel APIs to fetch available attributes and attribute instances from a graph store.
When the Neurobagel graph data model is updated (e.g., if new classes or subclasses are created), this file should be regenerated by running:
python helper_scripts/generate_nb_vocab_file.py
This will create a file called nb_vocab.ttl in the current working directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bagel-0.7.1.tar.gz.
File metadata
- Download URL: bagel-0.7.1.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd3d7f85d986a4f1e8eb58b6a2e50efc5a8ec49f67b3c41a53adfdfc966940d0
|
|
| MD5 |
0b628dd233c296900cb3767cb5850569
|
|
| BLAKE2b-256 |
8ae3b82bf1a2c849c9fe39851f814229b58cf601f741c71584324af2373facb7
|
File details
Details for the file bagel-0.7.1-py3-none-any.whl.
File metadata
- Download URL: bagel-0.7.1-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bdf1257a1f51058ed3b9715096441c43e914f6e51f46d039c6652a62e4c67cd
|
|
| MD5 |
518642b607320958aa2a26a35c096044
|
|
| BLAKE2b-256 |
76c28b5dc874e631e6d4eb45c1d887730a48f20395c20a6acd54f3a5cc0bcb46
|