Skip to content

Conversation

@d-chambers
Copy link
Contributor

@d-chambers d-chambers commented Sep 4, 2025

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

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings or appropriate doc page.
  • included a test. See testing guidelines.
  • your name has been added to the contributors page (docs/contributors.md).
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

Summary by CodeRabbit

  • New Features

    • Added support for OPTODAS version 9 data.
    • Enabled discovery and use of OPTODAS versions 9 and 10 via plugin/IO entry points, allowing loading and processing similar to existing versions.
  • Chores

    • Updated package entry points to include OPTODAS V9 and V10 for broader format compatibility.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 4, 2025

Walkthrough

Introduces a new OptoDASV9 subclass (inherits from OptoDASV8) with version = "9". Updates packaging entry points to expose OPTODAS__V9 and OPTODAS__V10 under dascore.fiber_io, mapping to the corresponding classes. No method overrides or logic changes to existing classes.

Changes

Cohort / File(s) Summary
OptoDAS class definitions
dascore/io/optodas/core.py
Added OptoDASV9(OptoDASV8) with version = "9". Existing OptoDASV8 and OptoDASV10 unchanged.
Entry point declarations
pyproject.toml
Added OPTODAS__V9 = "dascore.io.optodas.core:OptoDASV9" and OPTODAS__V10 = "dascore.io.optodas.core:OptoDASV10" under [project.entry-points."dascore.fiber_io"]. Existing OPTODAS__V8 retained.

Possibly related PRs

  • Add OptoDAS I/O format V10 #506 — Also modifies optodas core by adding a new versioned OptoDAS subclass and related entry points, overlapping with the introduced V9/V10 entries.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_526

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (47f83cc) to head (30bce9b).

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           
Flag Coverage Δ
unittests 99.88% <100.00%> (+<0.01%) ⬆️

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 in get_format to avoid ambiguous plugin matches.

OptoDASV8.get_format currently 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, override get_format here 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_str

Optional: mirror the same override in OptoDASV10 for 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 47f83cc and 30bce9b.

📒 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__V9 for a v9 sample (or a mocked H5Reader returning "9"), to prevent regressions.

@d-chambers d-chambers merged commit a82fe82 into master Sep 4, 2025
21 checks passed
@d-chambers d-chambers deleted the fix_526 branch September 4, 2025 09:51
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.

2 participants