Closed oruebel closed 4 years ago
As far as I can tell the default setup.py here https://github.com/nwb-extensions/ndx-template/blob/ec1364cd9a35d812f821ac8f52c4b6ae587f9ba2/%7B%7B%20cookiecutter.namespace%20%7D%7D/setup.py#L37 seems to copy the YAML spec to a spec/ subfolder in the python package upon install. If this is the case, should we add in the default init.py file for PyNWB https://github.com/nwb-extensions/ndx-template/blob/master/%7B%7B%20cookiecutter.namespace%20%7D%7D/src/pynwb/%7B%7B%20cookiecutter.py_pkg_name%20%7D%7D/__init__.py also a command for loading the namespace, since all packages would have to do this? I guess this would look something like:
spec/
import os from pynwb import load_namespaces '{{ cookiecutter.namespace }}_specpath = os.path.join(os.path.dirname(__file__), 'spec', '{{ cookiecutter.namespace }}.namespace.yaml') load_namespaces('{{ cookiecutter.namespace }}_specpath)
As far as I can tell the default setup.py here https://github.com/nwb-extensions/ndx-template/blob/ec1364cd9a35d812f821ac8f52c4b6ae587f9ba2/%7B%7B%20cookiecutter.namespace%20%7D%7D/setup.py#L37 seems to copy the YAML spec to a
spec/
subfolder in the python package upon install. If this is the case, should we add in the default init.py file for PyNWB https://github.com/nwb-extensions/ndx-template/blob/master/%7B%7B%20cookiecutter.namespace%20%7D%7D/src/pynwb/%7B%7B%20cookiecutter.py_pkg_name%20%7D%7D/__init__.py also a command for loading the namespace, since all packages would have to do this? I guess this would look something like: