-
Notifications
You must be signed in to change notification settings - Fork 28
add support for OptoDAS v9 #528
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
WalkthroughIntroduces a new Changes
Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #528 +/- ##
=======================================
Coverage 99.88% 99.88%
=======================================
Files 122 122
Lines 10027 10029 +2
=======================================
+ Hits 10015 10017 +2
Misses 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
dascore/io/optodas/core.py (1)
70-74: Add explicit version gating inget_formatto avoid ambiguous plugin matches.
OptoDASV8.get_formatcurrently returns a match for any OptoDAS file version. With V9 added, multiple IOs may claim the same file unless the registry enforces (name, version) equality. To keep selection deterministic, overrideget_formathere to only return when the detected version equals"9".Apply this diff inside
OptoDASV9:class OptoDASV9(OptoDASV8): """Support for OptoDAS V 9.""" version = "9" + + def get_format(self, resource: H5Reader, **kwargs) -> tuple[str, str] | bool: + version_str = _get_opto_das_version_str(resource) + if version_str and str(version_str) == self.version: + return self.name, version_strOptional: mirror the same override in
OptoDASV10for consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
dascore/io/optodas/core.py(1 hunks)pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
- GitHub Check: test_code (macos-latest, 3.12)
- GitHub Check: test_code (windows-latest, 3.11)
- GitHub Check: test_code (windows-latest, 3.13)
- GitHub Check: test_code (windows-latest, 3.12)
- GitHub Check: test_code (windows-latest, 3.10)
- GitHub Check: test_code (macos-latest, 3.13)
- GitHub Check: test_code (macos-latest, 3.10)
- GitHub Check: test_code (ubuntu-latest, 3.12)
- GitHub Check: test_code (ubuntu-latest, 3.13)
- GitHub Check: test_code (ubuntu-latest, 3.10)
- GitHub Check: test_code (ubuntu-latest, 3.11)
- GitHub Check: test_code_min_deps (macos-latest, 3.13)
- GitHub Check: test_code_min_deps (windows-latest, 3.12)
- GitHub Check: test_code_min_deps (windows-latest, 3.13)
- GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
- GitHub Check: test_code_min_deps (ubuntu-latest, 3.12)
- GitHub Check: test_code_min_deps (macos-latest, 3.12)
🔇 Additional comments (1)
pyproject.toml (1)
114-115: Entry points for V9/V10 look good. Consider adding a discovery smoke test.The mappings match the class names and placement alongside V8 is consistent. As a follow-up, add a small test ensuring the entry-point discovery resolves
OPTODAS__V9for a v9 sample (or a mockedH5Readerreturning"9"), to prevent regressions.
Description
DASCore currently support OptoDAS V8, and V10. Version 10 can be parsed with the same code as version 8. Turns out, version 9 is also compatible. See #526.
Checklist
I have (if applicable):
Summary by CodeRabbit
New Features
Chores