Store the git hash of the nwb-schema submodule in the NWBFile #1236
Labels
category: enhancement
improvements of code or code behavior
priority: low
alternative solution already working and/or relevant to only specific user(s)
Description
In the event that the nwb-schema submodule of PyNWB is accidentally updated to a non-release version (the default git branches of nwb-schema and hdmf-common-schema contain the bleeding edge and not necessarily the latest release), then storing the git hash of the loaded submodule in the file would help decipher which unreleased version of the schema was used.
Note: the current workflow requires that all unreleased versions of the schema (the state of the default branches of those repos) have the suffix "-alpha" in the version string. This helps determine that an unreleased version of the schema was used, but does not differentiate between multiple commits that occur between schema releases. The suffix "-alpha" might also be accidentally forgotten. Storing the git hash will solve both issues.
It would also be nice to store the version of PyNWB (or git hash) in the NWBFile.
Proposed solution
Modify 'package_data' in
setup.py
to store the git hash of the nwb-schema submodule as a resource:pynwb/setup.py
Line 36 in 9d73463
Load the git hash and store it in the file. See as example:
https://github.com/NeurodataWithoutBorders/pynwb/blob/dev/src/pynwb/__init__.py#L24-L28
The text was updated successfully, but these errors were encountered: