Skip to content

Conversation

@t-b
Copy link
Collaborator

@t-b t-b commented Jul 29, 2025

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).

Close #2117

@t-b t-b requested review from rly and stephprince July 29, 2025 11:44
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.32%. Comparing base (43cfa7b) to head (3f74c44).
⚠️ Report is 11 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2118   +/-   ##
=======================================
  Coverage   95.32%   95.32%           
=======================================
  Files          28       28           
  Lines        2845     2846    +1     
  Branches      735      735           
=======================================
+ Hits         2712     2713    +1     
  Misses         77       77           
  Partials       56       56           
Flag Coverage Δ
integration 74.27% <100.00%> (+<0.01%) ⬆️
unit 85.20% <50.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@t-b t-b assigned t-b and unassigned rly and stephprince Jul 29, 2025
@t-b t-b marked this pull request as draft July 29, 2025 12:02
@t-b t-b force-pushed the ignore-nwb-prefix-in-version branch from 48f6cb1 to 35eb2de Compare July 29, 2025 12:11
t-b added 2 commits July 29, 2025 14:24
…pecifiers

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 (NeurodataWithoutBorders#1651), 2023-02-24).
@t-b t-b force-pushed the ignore-nwb-prefix-in-version branch from 35eb2de to ca4faea Compare July 29, 2025 12:25
@t-b t-b marked this pull request as ready for review July 29, 2025 12:40
@t-b t-b assigned rly and stephprince and unassigned t-b Jul 29, 2025
Copy link
Contributor

@stephprince stephprince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @t-b! To summarize, NWB files created after 2.0.2 should use semantic versioning, but these changes will allow files using the older NWB- prefix to be read

@stephprince stephprince merged commit f9cd2a2 into NeurodataWithoutBorders:dev Jul 31, 2025
26 checks passed
@t-b t-b deleted the ignore-nwb-prefix-in-version branch July 31, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix parsing pre-semver nwb_version attributes

3 participants