Skip to content

fix: Adapt new visualizer version #4025

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

AlejandroFernandezLuces
Copy link
Contributor

@AlejandroFernandezLuces AlejandroFernandezLuces commented Jun 20, 2025

Description

Please provide a brief description of the changes made in this pull request.

Issue linked

Please mention the issue number or describe the problem this pull request addresses.

Checklist

Summary by Sourcery

Adapt plotting methods to the updated visualization interface by removing deprecated keyword arguments from show() calls and upgrade the ansys-tools-visualization-interface dependency to 0.10.0.

Enhancements:

  • Remove **kwargs from pl.show() and backend.show() invocations across all plot methods to comply with the new visualizer API

Build:

  • Bump ansys-tools-visualization-interface from 0.9.2 to 0.10.0 in dev and documentation dependencies

@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

Copy link
Contributor

sourcery-ai bot commented Jun 20, 2025

Reviewer's Guide

Adapts the codebase to the updated visualization interface by removing unsupported keyword arguments from show() calls, bumping the tools-visualization-interface dependency to 0.10.0, and aligning the Visualizer.show method with the new backend API.

Sequence diagram for plotting workflow with updated show() calls

sequenceDiagram
    participant User
    participant Mapdl
    participant MapdlPlotter
    participant Visualizer
    User->>Mapdl: Call plot method (e.g., kplot, lplot, aplot, nplot, eplot)
    Mapdl->>MapdlPlotter: plot(..., **kwargs)
    MapdlPlotter->>Visualizer: show(...)
    Visualizer->>Visualizer: show(window_size, savefig, return_plotter)
    Note right of Visualizer: No extra **kwargs passed to show()
    Visualizer-->>User: Rendered plot or plotter object
Loading

File-Level Changes

Change Details Files
Removed **kwargs from pl.show() invocations across multiple plot methods
  • Replaced pl.show(**kwargs) with pl.show() in keypoint, line, area, volume, node, and element plotters
  • Unified show() calls in post-processing scalar plots to drop kwargs
src/ansys/mapdl/core/mapdl_extended.py
src/ansys/mapdl/core/post.py
Updated ansys-tools-visualization-interface dependency
  • Bumped version to 0.10.0 in test requirements
  • Bumped version to 0.10.0 in documentation dependencies
pyproject.toml
Aligned Visualizer.show with new backend API
  • Removed **kwargs forwarding from backend.show() call
  • Adjusted method signature to rely on internal argument handling
src/ansys/mapdl/core/plotting/visualizer.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added dependencies maintenance General maintenance of the repo (libraries, cicd, etc) bug Issue, problem or error in PyMAPDL labels Jun 20, 2025
Copy link
Collaborator

@germa89 germa89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyMAPDL dependencies maintenance General maintenance of the repo (libraries, cicd, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants