Skip to content

feature/SOF 7894 4#315

Merged
VsevolodX merged 5 commits into
mainfrom
feature/SOF-7894-4
May 17, 2026
Merged

feature/SOF 7894 4#315
VsevolodX merged 5 commits into
mainfrom
feature/SOF-7894-4

Conversation

@VsevolodX
Copy link
Copy Markdown
Member

@VsevolodX VsevolodX commented May 16, 2026

  • update: fix of imports
  • update: fix of imports 2

Summary by CodeRabbit

  • Chores

    • Updated example notebooks to use revised package install/import targets and adjusted plotting import paths for compatibility.
    • Reorganized plotting utilities to expose a clearer public API.
  • New Features

    • Automatic matplotlib renderer configuration for non-interactive environments (improves plotting in browser/Pyodide).
    • Notebooks now explicitly import helper for downloading remote outputs before post-processing.

Review Change Stack

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e1fa7bef-4c48-408b-ab57-d8c224431548

📥 Commits

Reviewing files that changed from the base of the PR and between f845ddc and 973a881.

📒 Files selected for processing (5)
  • examples/workflow/qe_scf_calculation.ipynb
  • other/materials_designer/workflows/valence_band_offset.ipynb
  • src/py/mat3ra/notebooks_utils/ipython/plot/_matplotlib.py
  • src/py/mat3ra/notebooks_utils/ipython/plot/_plotly.py
  • src/py/mat3ra/notebooks_utils/plot.py
💤 Files with no reviewable changes (1)
  • src/py/mat3ra/notebooks_utils/ipython/plot/_plotly.py

📝 Walkthrough

Walkthrough

Centralizes plotting exports and pyodide-aware Matplotlib backend configuration into mat3ra.notebooks_utils.plot and updates several notebooks to import utilities and install api_examples where previously they referenced older/internal paths.

Changes

Notebooks utilities API restructuring and import consolidation

Layer / File(s) Summary
Plot module public API and renderer configuration
src/py/mat3ra/notebooks_utils/ipython/plot/_matplotlib.py, src/py/mat3ra/notebooks_utils/plot.py, src/py/mat3ra/notebooks_utils/ipython/plot/_plotly.py
Adds configure_matplotlib_renderer() (Pyodide-aware backend switch), re-exports plotting helpers from ipython submodules in plot.py, invokes renderer configuration on import, and defines __all__ to control public exports.
Notebook imports updated to new module paths
examples/workflow/qe_scf_calculation.ipynb, examples/job/run-simulations-and-extract-properties.ipynb, other/materials_designer/workflows/convergence.ipynb, other/materials_designer/workflows/total_energy_convergence.ipynb, other/materials_designer/workflows/valence_band_offset.ipynb
Notebooks: switch dependency install spec to `api_examples

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • pranabdas
  • timurbazhirov

Poem

🐰 I hopped through imports, neat and spry,
I nudged the backend so plots won't cry,
Re-exports bundled, paths made right,
Notebooks now import with delight,
A rabbit's hop — clean code in sight.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'feature/SOF 7894 4' is vague and does not clearly describe the actual changes made in the PR. Use a descriptive title that summarizes the main change, such as 'Refactor imports: reorganize plotting and API utilities' or 'Update notebook imports and consolidate plotting API'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/SOF-7894-4

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/py/mat3ra/notebooks_utils/plot.py`:
- Around line 21-30: The __all__ list in the module is unsorted and triggers
Ruff RUF022; reorder the entries in the __all__ assignment (the __all__ variable
containing "display_matplotlib_figure", "plot_distribution_function",
"plot_series", "create_scatter_plot_2d", "create_realtime_plot",
"create_update_callback", "plot_2d_heatmap", "plot_3d_surface") into
lexicographical order and commit the updated sorted list so the linter warning
is resolved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f363dd8e-a736-42bc-af92-8e11f007899a

📥 Commits

Reviewing files that changed from the base of the PR and between 438f16c and f845ddc.

📒 Files selected for processing (5)
  • examples/job/run-simulations-and-extract-properties.ipynb
  • examples/workflow/qe_scf_calculation.ipynb
  • other/materials_designer/workflows/convergence.ipynb
  • other/materials_designer/workflows/total_energy_convergence.ipynb
  • src/py/mat3ra/notebooks_utils/plot.py

Comment thread src/py/mat3ra/notebooks_utils/plot.py
@VsevolodX VsevolodX merged commit 38c1137 into main May 17, 2026
8 checks passed
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