Skip to content

Jf/extensions#81

Merged
j-fu merged 11 commits intomainfrom
jf/extensions
Jun 13, 2025
Merged

Jf/extensions#81
j-fu merged 11 commits intomainfrom
jf/extensions

Conversation

@j-fu
Copy link
Copy Markdown
Member

@j-fu j-fu commented Jun 13, 2025

Move all plotting backend code to extensions.

Essentially this is meant to remove technical debt.
E.g. if only makie is used, this will spare the compilation of all other code backends.

@j-fu j-fu requested review from Copilot and pjaap June 13, 2025 10:44
Copy link
Copy Markdown

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

This PR reorganizes the code by moving plotting backend implementations into separate extension modules to reduce unnecessary compilation overhead and technical debt. Key changes include:

  • Updating tests to use the mktempdir do-block for better resource management.
  • Adding stub functions with clear missing implementation errors in src/dispatch.jl.
  • Splitting plotting backend code into dedicated extension modules for Makie, PyPlot, PlutoVista, Plots, MeshCat, VTKView, and updating documentation accordingly.

Reviewed Changes

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

Show a summary per file
File Description
test/runtests.jl Update tests to use a mktempdir do-block for generating plots.
src/dispatch.jl Introduce stub functions for various plot types with clear error messages.
src/common.jl Add leglocs constant for legend location mapping.
src/GridVisualize.jl Remove direct backend includes/export and adjust module exports.
ext/* (all extension modules) Organize plotting backend code into extensions; update docstrings and inline references.
docs/* Update documentation to reference the new extension modules.
Comments suppressed due to low confidence (2)

ext/GridVisualizeMeshCatExt.jl:62

  • Please add a comment to clarify the purpose of the added parameter '1.0' in this call, so that future maintainers understand its role.
mesh = regionmesh(grid, 1.0, i; cellcoloring = ctx[:cellcoloring])

ext/GridVisualizeMeshCatExt.jl:216

  • [nitpick] Consider including a brief comment explaining the role and expected range of 'outlinealpha' to enhance maintainability.
if ctx[:outlinealpha] > 0

Copy link
Copy Markdown
Member

@pjaap pjaap left a comment

Choose a reason for hiding this comment

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

Thanks for the refactoring. I second the idea to move the code into extensions.

docs/make.jl Outdated
mkdocs()

deploydocs(; repo = "github.com/WIAS-PDELib/GridVisualize.jl.git", devbranch = "main")
#deploydocs(; repo = "github.com/WIAS-PDELib/GridVisualize.jl.git", devbranch = "main")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This shouldn't be disabled, right?

@j-fu j-fu merged commit a89bcba into main Jun 13, 2025
9 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.

3 participants