Skip to content

Add a little helper to CalculusPatch to make a FieldPlotter#266

Merged
inducer merged 6 commits intoinducer:mainfrom
alexfikl:calculus-patch-visualization
Mar 13, 2026
Merged

Add a little helper to CalculusPatch to make a FieldPlotter#266
inducer merged 6 commits intoinducer:mainfrom
alexfikl:calculus-patch-visualization

Conversation

@alexfikl
Copy link
Collaborator

This also has a bunch of typing fixes, so it looks bigger than it is.

For the actual functionality: just added a points=None to the FieldPlotter constructor so that it can take the (possibly non-uniform) grid from CalculusPatch instead of making its own.

@alexfikl alexfikl force-pushed the calculus-patch-visualization branch 2 times, most recently from 3625545 to 140bcbc Compare March 13, 2026 13:48
@alexfikl alexfikl force-pushed the calculus-patch-visualization branch 2 times, most recently from 5eb8b2a to d9532ae Compare March 13, 2026 14:10
@alexfikl alexfikl marked this pull request as ready for review March 13, 2026 14:35
@alexfikl alexfikl changed the title This adds a little helper to CalculusPatch to make a FieldPlotter Add a little helper to CalculusPatch to make a FieldPlotter Mar 13, 2026
@alexfikl alexfikl requested a review from Copilot March 13, 2026 14:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a way to build a FieldPlotter directly from a CalculusPatch grid (including non-uniform grids) and updates typing/documentation/CI to support the new optype-based annotations.

Changes:

  • Extend FieldPlotter to optionally accept an explicit grid (points=None -> pass provided points through).
  • Add CalculusPatch.make_field_plotter() and deprecate CalculusPatch.plot() in favor of it.
  • Typing/doc/CI updates (optype annotations, Sphinx nitpick ignores, basedpyright baseline adjustments, CI installs optype).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sumpy/visualization.py Adds points support to FieldPlotter and tightens type annotations.
sumpy/point_calculus.py Introduces make_field_plotter(), deprecates plot(), and improves typing/docs.
sumpy/toys.py Removes a couple of type-ignore comments as part of typing cleanup.
sumpy/symbolic.py Removes an unnecessary type-ignore on an import assignment.
doc/conf.py Adjusts Sphinx nitpick ignores / missing-reference aliases for optype-based types.
.github/workflows/ci.yml Installs optype in the basedpyright job environment.
.basedpyright/baseline.json Updates the type-checker baseline to reflect the new typing state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alexfikl alexfikl force-pushed the calculus-patch-visualization branch from d9532ae to 1ecb062 Compare March 13, 2026 15:08
@alexfikl alexfikl force-pushed the calculus-patch-visualization branch from 1ecb062 to ff2fc62 Compare March 13, 2026 17:21
@inducer inducer merged commit 580ef67 into inducer:main Mar 13, 2026
9 checks passed
@inducer
Copy link
Owner

inducer commented Mar 13, 2026

Thanks!

@alexfikl alexfikl deleted the calculus-patch-visualization branch March 15, 2026 17:36
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.

3 participants