Conversation
Reviewer's GuideImproves OPSIN/py2opsin handling by suppressing noisy Java warnings, clarifying verification behavior in docs and CLI, tightening Python version and project metadata, and adding tests to ensure OPSIN verification degrades gracefully when Java is unavailable. Sequence diagram for OPSIN verification with graceful py2opsin/Java handlingsequenceDiagram
actor User
participant PythonAPI as openclatura_name
participant OpsinVerifier as verify_opsin
participant Py2opsinImporter as _try_import_py2opsin
participant Py2opsin
User->>PythonAPI: openclatura.name(verify_opsin=True)
PythonAPI->>OpsinVerifier: verify_opsin(smiles, name)
OpsinVerifier->>Py2opsinImporter: _try_import_py2opsin()
Py2opsinImporter->>Py2opsin: import py2opsin (Java warnings ignored)
Py2opsin-->Py2opsinImporter: py2opsin or None
alt py2opsin is None
OpsinVerifier-->>PythonAPI: opsin_check.status = skipped_no_opsin
else Java unavailable
OpsinVerifier-->>PythonAPI: opsin_check.status = skipped_no_java
else OPSIN parses and round-trips
OpsinVerifier-->>PythonAPI: opsin_check.status = matched/mismatched
end
PythonAPI-->>User: result with opsin_check.status and verified flag
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSuppresses a Java-related RuntimeWarning during optional py2opsin import in opsin_verify.py, adds a corresponding test, updates CLI help text wording, bumps package version and Python requirement, updates project URLs, revises README documentation on OPSIN verification behavior, and removes a standalone QM9 batch test script. ChangesOPSIN warning suppression, docs, and metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Related PRs: None identified. Suggested labels: documentation, dependencies Suggested reviewers: None identified. Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The warning suppression in
_try_import_py2opsinrelies on a very specific message string frompy2opsin; consider matching more robustly (e.g., on category or a broader substring) to avoid leaking noise if upstream tweaks the wording. - In
test_py2opsin_java_import_warning_is_suppressed, the monkeypatch ofbuiltins.__import__affects all imports during the test; if more imports are added later, consider scoping this more tightly (e.g., patching onlyopenclatura.opsin_verify.py2opsin) to reduce the chance of side effects.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The warning suppression in `_try_import_py2opsin` relies on a very specific message string from `py2opsin`; consider matching more robustly (e.g., on category or a broader substring) to avoid leaking noise if upstream tweaks the wording.
- In `test_py2opsin_java_import_warning_is_suppressed`, the monkeypatch of `builtins.__import__` affects all imports during the test; if more imports are added later, consider scoping this more tightly (e.g., patching only `openclatura.opsin_verify.py2opsin`) to reduce the chance of side effects.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Improve OPSIN verification handling and documentation while updating project metadata.
New Features:
Bug Fixes:
Enhancements:
Build:
Tests:
Summary by CodeRabbit
Documentation
Bug Fixes
Tests
Chores