Commit 0ddafc2
committed
get_nwbfile_version/get_nwb_version: Fix parsing pre-semver version specifiers
In commit NeurodataWithoutBorders/nwb-schema@dba02ff (update YAML specs with 2.1.0 specs,
2019-08-19) the help for nwb_version was changed in the following regard:
--- a/core/nwb.file.yaml
+++ b/core/nwb.file.yaml
@@ -2,220 +2,231 @@ groups:
[...]
- name: nwb_version
dtype: text
- doc: 'File version string. COMMENT: Eg, NWB-1.0.0. This will be the name of the
- format with trailing major, minor and patch numbers.'
- value: 2.0b
+ value: 2.0.2
+ doc: File version string. Use semantic versioning, e.g. 1.2.1. This will be the
+ name of the format with trailing major, minor and patch numbers.
While adopting semantic versioning for nwb_version is a good step, care
needs to be taken to allow reading older files.
Versions of IPNWB prior to AllenInstitute/IPNWB@70c65d4 (Switch to newer
NWB specification 2.2.4, 2020-04-15) did follow the old suggestion in
prefixing nwb_version with `NWB-`.
Let's disregard that prefix as was previsously done with the suffix 'b' in
26538b3 (Fix handling of version 2.0b (#1651), 2023-02-24).1 parent 43cfa7b commit 0ddafc2
File tree
3 files changed
+10
-1
lines changed- src/pynwb
- io
- tests/integration/utils
3 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| |||
0 commit comments