diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ed9130d..0d1e9d276 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,12 @@ * Fixed `--modules` flag in `nwbinspector` command line interface to allow for import of additional modules in the command line. This was necessary to be able to register new customized checks to the NWB Inspector. [#446](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/446) +### Improvements + +* Enabled auto-import of checks defined from a set of known extensions, beginning with `ndx_multichannel_volume`. [#447](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/447) + + + # v0.4.33 ### Fixes diff --git a/src/nwbinspector/__init__.py b/src/nwbinspector/__init__.py index c73d0f208..d94abe686 100644 --- a/src/nwbinspector/__init__.py +++ b/src/nwbinspector/__init__.py @@ -22,3 +22,12 @@ from .checks.icephys import * default_check_registry = {check.__name__: check for check in available_checks} + +# Automatically import from a set of known extensions that might be installed +import importlib + +KNOWN_EXTENSIONS = ["ndx_multichannel_volume"] +for extension_candidate in KNOWN_EXTENSIONS: + if importlib.util.find_spec(name=extension_candidate) is not None: + importlib.import_module(name=extension_candidate) + # Any checks exposed to the extension __init__ will now be registered