bump-dictionary is a tool to help migrate your existing Neurobagel data dictionaries to the latest data dictionary schema.
bump-dictionary currently works with Python 3.10+, and can be installed from PyPI using pip:
-
(Recommended) Create and activate a Python virtual environment (using a tool such as venv).
-
Install the
bump-dictionarypackage into your virtual environment:pip install bump-dictionary
To upgrade a Neurobagel data dictionary in your current directory named my_legacy_dictionary.json, run in your terminal:
bump-dictionary my_legacy_dictionary.jsonBy default, the updated data dictionary file will be saved to ./updated_dictionary.json.
For full CLI help, run:
bump-dictionary -h
-
Clone the repository
git clone https://github.com/neurobagel/bump-dictionary.git cd bump-dictionary -
Install the CLI and all development dependencies in editable mode:
pip install -e ".[dev]"
Confirm that everything works well by running the tests:
pytest .
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 installpre-commit will now run automatically whenever you run git commit.
If new runtime or development dependencies are needed, add them to pyproject.toml using minimal version constraints.