bagel-cli

Command line tool for Neurobagel data parsing and annotation

https://github.com/neurobagel/bagel-cli

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Command line tool for Neurobagel data parsing and annotation

Basic Info
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 5
  • Open Issues: 34
  • Releases: 23
Created almost 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

# Neurobagel CLI [![Main branch checks status](https://img.shields.io/github/check-runs/neurobagel/bagel-cli/main?style=flat-square&logo=github)](https://github.com/neurobagel/bagel-cli/actions?query=branch:main) [![Tests status](https://img.shields.io/github/actions/workflow/status/neurobagel/bagel-cli/test.yml?branch=main&style=flat-square&logo=github&label=tests)](https://github.com/neurobagel/bagel-cli/actions/workflows/test.yml) [![Codecov](https://img.shields.io/codecov/c/github/neurobagel/bagel-cli?token=R1KI9KIP8D&style=flat-square&logo=codecov&link=https%3A%2F%2Fcodecov.io%2Fgh%2Fneurobagel%2Fbagel-cli)](https://app.codecov.io/gh/neurobagel/bagel-cli) [![Python versions static](https://img.shields.io/badge/python-3.10%20%7C%203.11-blue?style=flat-square&logo=python)](https://www.python.org) [![License](https://img.shields.io/github/license/neurobagel/bagel-cli?style=flat-square&color=purple&link=LICENSE)](LICENSE) [![PyPI - Version](https://img.shields.io/pypi/v/bagel?style=flat-square&logo=pypi&link=https%3A%2F%2Fimg.shields.io%2Fpypi%2Fv%2Fbagel)](https://pypi.org/project/bagel/) [![Docker Image Version (tag)](https://img.shields.io/docker/v/neurobagel/bagelcli/latest?style=flat-square&logo=docker&link=https%3A%2F%2Fhub.docker.com%2Fr%2Fneurobagel%2Fbagelcli%2Ftags)](https://hub.docker.com/r/neurobagel/bagelcli/tags) [![Docker Pulls](https://img.shields.io/docker/pulls/neurobagel/bagelcli?style=flat-square&logo=docker&link=https%3A%2F%2Fhub.docker.com%2Fr%2Fneurobagel%2Fbagelcli%2Ftags)](https://hub.docker.com/r/neurobagel/bagelcli/tags)

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:

bash 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.

  1. Clone the repository

    bash git clone https://github.com/neurobagel/bagel-cli.git cd bagel-cli

  2. Install the CLI and all development dependencies in editable mode:

    bash pip install -e ".[dev]"

  3. Install the bids-examples and neurobagel_examples submodules needed to run the test suite: bash 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: bash 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: bash python helper_scripts/generate_nb_vocab_file.py This will create a file called nb_vocab.ttl in the current working directory.

Owner

  • Name: Neurobagel
  • Login: neurobagel
  • Kind: organization

Citation (CITATION.cff)

# doc: https://citation-file-format.github.io/
# schema: https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md

cff-version: 1.2.0

title: "Neurobagel CLI: Command line tool for Neurobagel data parsing and annotation"

version: 0.1.0

abstract: "The Bagel CLI is a simple Python command line tool to automatically read and annotate a [BIDS dataset](https://bids-specification.readthedocs.io/en/stable/) so that it can be integrated into the Neurobagel graph."

message: "If you use this software, please cite it as below."

repository-code: "https://github.com/neurobagel/bagel-cli.git"

contact:
  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    family-names: Urchs
    given-names: Sebastian 

authors:
  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    family-names: Urchs
    given-names: Sebastian 
    orcid: "https://orcid.org/0000-0001-5504-8579"

  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    family-names: Dai
    given-names: Alyssa
    orcid: "https://orcid.org/0000-0003-0174-6800"

  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    family-names: Armoza
    given-names: Jonathan
    orcid: "https://orcid.org/0000-0002-7193-9344"

  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    family-names: Jahanpour
    given-names: Arman    

  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    email:  nikhil.bhagwat@mcgill.ca
    family-names: Bhagwat
    given-names: Nikhil
    orcid: "https://orcid.org/0000-0001-6073-7141"

  - affiliation: "ORIGAMI lab, McGill University, Montréal, Canada"
    family-names: Poline
    given-names: Jean-Baptiste
    orcid: "https://orcid.org/0000-0002-9794-749X"    

license: MIT

GitHub Events

Total
  • Create event: 94
  • Release event: 12
  • Issues event: 70
  • Watch event: 1
  • Delete event: 83
  • Issue comment event: 269
  • Push event: 235
  • Pull request review comment event: 129
  • Pull request event: 168
  • Pull request review event: 174
Last Year
  • Create event: 94
  • Release event: 12
  • Issues event: 70
  • Watch event: 1
  • Delete event: 83
  • Issue comment event: 269
  • Push event: 235
  • Pull request review comment event: 129
  • Pull request event: 168
  • Pull request review event: 174

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 41
  • Total pull requests: 69
  • Average time to close issues: 4 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 3
  • Total pull request authors: 5
  • Average comments per issue: 0.9
  • Average comments per pull request: 1.8
  • Merged pull requests: 52
  • Bot issues: 0
  • Bot pull requests: 39
Past Year
  • Issues: 33
  • Pull requests: 53
  • Average time to close issues: 28 days
  • Average time to close pull requests: 6 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 0.55
  • Average comments per pull request: 1.81
  • Merged pull requests: 39
  • Bot issues: 0
  • Bot pull requests: 32
Top Authors
Issue Authors
  • alyssadai (52)
  • surchs (13)
  • michellewang (2)
  • barbarastrasser (1)
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (67)
  • alyssadai (49)
  • surchs (25)
  • pre-commit-ci[bot] (14)
  • neurobagel-bot[bot] (8)
  • neurobagel-chef-bot[bot] (1)
Top Labels
Issue Labels
usability (7) modeling (6) refactor (5) quick fix (5) type:feature (5) type:bug (4) bug:functional (3) feat:improve (3) type:maintenance (3) maint:dependency (3) feat:add (2) _flag:stale (2) good first issue (2) process (2) PR welcome (1) feedback:feature request (1) flag:discuss (1) performance (1) documentation (1) Epic (1) release (1) pr-patch (1) importance:medium (1) _bot (1)
Pull Request Labels
_bot (94) maint:dependency (45) type:maintenance (43) dependencies (21) release (20) skip-release (15) pr-patch (12) pr-internal (7) pr-minor-breaking (3) pr-documentation (3) pr-minor (2) pr-bug-fix (2) python (2) feat:add (1) type:feature (1) flag:discuss (1) pr-dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 768 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 3
  • Total versions: 6
  • Total maintainers: 2
pypi.org: bagel

Automatic parsing of subjects' tabular data and imaging metadata into Neurobagel graph-compatible JSONLD files.

  • Documentation: https://bagel.readthedocs.io/
  • License: MIT License Copyright (c) 2022 - Neurobagel Project, Origami Lab, McGill University. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.7.1
    published 6 months ago
  • Versions: 6
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 768 Last month
Rankings
Dependent repos count: 9.0%
Dependent packages count: 10.1%
Average: 22.3%
Downloads: 23.5%
Forks count: 29.8%
Stargazers count: 38.8%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/stale.yml actions
  • actions/stale v6 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
Dockerfile docker
  • python 3.10-slim-buster build
.github/workflows/add_iss2project.yml actions
  • actions/add-to-project main composite
.github/workflows/cd.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action v3 composite
.github/workflows/cff_validation.yml actions
  • actions/checkout v4 composite
  • citation-file-format/cffconvert-github-action 2.0.0 composite
.github/workflows/codespell.yml actions
  • actions/checkout v4 composite
  • codespell-project/actions-codespell v2 composite
dev_requirements.txt pypi
  • astor ==0.8.1 development
  • attrs ==23.1.0 development
  • bids-validator ==1.12.0 development
  • black ==23.7.0 development
  • build ==0.10.0 development
  • cfgv ==3.4.0 development
  • click ==8.1.7 development
  • coverage ==7.3.0 development
  • distlib ==0.3.7 development
  • docopt ==0.6.2 development
  • filelock ==3.12.2 development
  • flake8 ==6.1.0 development
  • flake8-black ==0.3.6 development
  • formulaic ==0.5.2 development
  • greenlet ==2.0.2 development
  • identify ==2.5.27 development
  • iniconfig ==2.0.0 development
  • interface-meta ==1.3.0 development
  • isodate ==0.6.1 development
  • jsonschema ==4.19.0 development
  • jsonschema-specifications ==2023.7.1 development
  • markdown-it-py ==3.0.0 development
  • mccabe ==0.7.0 development
  • mdurl ==0.1.2 development
  • mypy-extensions ==1.0.0 development
  • nibabel ==5.1.0 development
  • nodeenv ==1.8.0 development
  • num2words ==0.5.12 development
  • numpy ==1.25.2 development
  • packaging ==23.1 development
  • pandas ==2.0.3 development
  • pathspec ==0.11.2 development
  • pip-tools ==7.3.0 development
  • platformdirs ==3.10.0 development
  • pluggy ==1.2.0 development
  • pre-commit ==3.3.3 development
  • pybids ==0.16.3 development
  • pycodestyle ==2.11.0 development
  • pydantic ==1.10.12 development
  • pyflakes ==3.1.0 development
  • pygments ==2.16.1 development
  • pyproject-hooks ==1.0.0 development
  • pytest ==7.4.0 development
  • python-dateutil ==2.8.2 development
  • pytz ==2023.3 development
  • pyyaml ==6.0.1 development
  • referencing ==0.30.2 development
  • rich ==13.5.2 development
  • rpds-py ==0.9.2 development
  • scipy ==1.11.2 development
  • six ==1.16.0 development
  • sqlalchemy ==2.0.20 development
  • typer ==0.9.0 development
  • typing-extensions ==4.7.1 development
  • tzdata ==2023.3 development
  • virtualenv ==20.24.3 development
  • wheel ==0.41.2 development
  • wrapt ==1.15.0 development
pyproject.toml pypi
requirements.txt pypi
  • astor ==0.8.1
  • attrs ==23.1.0
  • bids-validator ==1.12.0
  • click ==8.1.7
  • docopt ==0.6.2
  • formulaic ==0.5.2
  • greenlet ==2.0.2
  • interface-meta ==1.3.0
  • isodate ==0.6.1
  • jsonschema ==4.19.0
  • jsonschema-specifications ==2023.7.1
  • markdown-it-py ==3.0.0
  • mdurl ==0.1.2
  • nibabel ==5.1.0
  • num2words ==0.5.12
  • numpy ==1.25.2
  • packaging ==23.1
  • pandas ==2.0.3
  • pybids ==0.16.3
  • pydantic ==1.10.12
  • pygments ==2.16.1
  • python-dateutil ==2.8.2
  • pytz ==2023.3
  • referencing ==0.30.2
  • rich ==13.5.2
  • rpds-py ==0.9.2
  • scipy ==1.11.2
  • six ==1.16.0
  • sqlalchemy ==2.0.20
  • typer ==0.9.0
  • typing-extensions ==4.7.1
  • tzdata ==2023.3
  • wrapt ==1.15.0
setup.py pypi
.github/workflows/build_docker_on_release.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
.github/workflows/release.yaml actions
  • actions/checkout v4 composite