-
Notifications
You must be signed in to change notification settings - Fork 28
Fix febus format empty file #492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request updates the Febus version string retrieval logic and expands the test suite. In the Febus utility, the conditional check now requires both a valid Febus flag and non-empty instrument keys before returning a version string. Meanwhile, new tests were introduced that create an empty HDF5 file fixture and verify that calling the format retrieval function on such a file raises an appropriate error. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant VersionFunc as _get_febus_version_str
Caller->>VersionFunc: Call with (inst_keys, is_febus)
alt inst_keys is non-empty and is_febus is true
VersionFunc-->>Caller: Return version string
else Condition not met
VersionFunc-->>Caller: No version string returned
end
sequenceDiagram
participant Test
participant FileFixture as empty_h5_path
participant DC as dc.get_format
Test->>FileFixture: Create an empty HDF5 file
Test->>DC: Call get_format(empty HDF5 file)
DC-->>Test: Raise UnknownFiberFormatError
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (15)
🔇 Additional comments (4)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #492 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 118 118
Lines 9696 9696
=======================================
Hits 9682 9682
Misses 14 14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
This PR fixes an issue in the Febus data format which causes dascore to identify empty hdf5 files as febus format.
Checklist
I have (if applicable):
Summary by CodeRabbit