This repo provides a template for creating Neurodata Extensions (NDX) for the Neurodata Without Borders data standard.
We currently support creating Neurodata Extensions only using Python 3.8+. MATLAB support is in development.
Install Python for your operating system if it is not already installed.
Install cookiecutter (see here for Windows install instructions), pynwb, and hdmf-docutils.
cookiecutter
is a Python-based command-line utility that creates projects from templates.
python -m pip install -U cookiecutter pynwb hdmf-docutils
Run cookiecutter in the directory where you want to create a new directory with the extension:
cookiecutter gh:nwb-extensions/ndx-template
To overwrite the contents of an existing directory, use the --overwrite-if-exists
flag:
cookiecutter --overwrite-if-exists gh:nwb-extensions/ndx-template
This can be useful if you want to populate an existing empty git repository with a new extension.
Answer the prompts, which will be used to fill in the blanks throughout the template automatically. Guidelines:
Select a name for your extension. It must start with 'ndx-'
- The name of the namespace for your extension. This could be a
description of the extension (e.g., "ndx-cortical-surface") or the name of your
lab or group (e.g., "ndx-allen-institute"). The name should generally follow the following naming conventions:
Select an initial version string
- Version of your extension. Versioning should start at 0.1.0 and follow semantic versioning guidelinesSelect a license
- Name of license used for your extension source code. A permissive license, such as BSD, should be used if possible.A new folder with the same name as your entered namespace
will be
created. See NEXTSTEPS.md
in that folder for the next steps in creating
your awesome new Neurodata Extension.
In case cookiecutter runs into problems and you want to avoid reentering
all the information, you can edit the file ~/.cookiecutter_replay/ndx-template.json
,
and use that via cookiecutter --replay gh:nwb-extensions/ndx-template
.
See the PyNWB tutorial for guidance on how to write your extension.
When you are done creating your extension, we encourage you to follow the steps to publish your Neurodata Extension in the NDX Catalog for the benefit of the greater neuroscience community! :)
By default, to aid with debugging, the project is configured NOT to run code coverage as part of the tests. Code coverage testing is useful to help with creation of tests and report test coverage. However, with this option enabled, breakpoints for debugging with pdb are being ignored. To enable this option for code coverage reporting, uncomment out the following line in your pyproject.toml
:
Neurodata Extensions Catalog (NDX Catalog) Copyright (c) 2021-2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.
NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.