refactor backend of maps#7
Open
jd-lara wants to merge 1 commit into
Open
Conversation
Member
Author
|
This PR requires the PR in PA for branch processing |
There was a problem hiding this comment.
Pull request overview
Refactors PowerSystemsMaps’ plotting implementation into a backend-agnostic core with Julia package extensions providing rendering (CairoMakie for static + animation export, PlotlyLight for interactive static), and adds a generic animation API for mapping arbitrary time-series values onto network edges/nodes.
Changes:
- Introduces backend selection (
PlottingBackend,default_backend) and moves rendering intoext/extensions for CairoMakie and PlotlyLight. - Rebuilds the core plotting/animation API around backend-agnostic “spec” structs (
StaticMap,EdgeAnimationSpec,NodeAnimationSpec) plus a normalized value-source layer (time_series_values,resolve_edges/resolve_nodes). - Updates tests, docs, and CI/workflows to match the new backend/ext-based architecture and animation support.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/test_maps.jl | Updates static map tests to use the new backend API and shapefile ring extraction. |
| test/test_animation.jl | Adds synthetic tests that exercise the new generic animation engine and CairoMakie record. |
| test/runtests.jl | Ensures CairoMakie is loaded before PowerSystemsMaps so the extension is active; imports Dates for tests. |
| test/Project.toml | Adds CairoMakie/Dates/PowerAnalytics and switches from PlotlyJS to PlotlyLight for tests. |
| src/PowerSystemsMaps.jl | Reorganizes exports/imports, includes new source files, and adds an init-time backend warning. |
| src/plots.jl | Adds the new public plotting + animation API and backend dispatch stubs. |
| src/plot_network.jl | Removes legacy Plots.jl-based plotting implementation. |
| src/mapdata.jl | Adds value-source normalization and mapping from series names to projected geometry. |
| src/graph.jl | Reintroduces graph construction/layout and node coloring in a backend-agnostic way. |
| src/geography.jl | Adds coordinate helpers, projections, and shapefile ring extraction. |
| src/backends.jl | Defines backend types, backend detection, and “no backend loaded” error. |
| scripts/formatter/formatter_code.jl | Expands formatter coverage to include ext/. |
| README.md | Updates README to reflect backend loading and adds animated map usage examples. |
| Project.toml | Bumps version to 0.3.0, adds deps/weakdeps/extensions, and updates compat bounds. |
| ext/PlotlyLightExt.jl | Implements static rendering for PlotlyLight and explicitly errors for animation export. |
| ext/CairoMakieExt.jl | Implements static rendering and animation export via CairoMakie record. |
| docs/src/api.md | Fixes module name in autogenerated API docs. |
| docs/make.jl | Updates Documenter devbranch to main. |
| .github/workflows/pr_testing.yml | Updates Actions versions, adds caching, and adjusts OS matrix. |
| .github/workflows/main-tests.yml | Updates Actions versions, adds caching, and adjusts OS matrix. |
| .github/workflows/format-check.yml | Updates Actions versions, branch name, and arch. |
| .github/workflows/docs.yml | Updates Actions versions and Julia version used for docs build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+112
to
+122
| m = StaticMap( | ||
| node_x, | ||
| node_y, | ||
| get_prop(g, :nodecolor), | ||
| Float64.(get_prop(g, :alpha)), | ||
| string.(get_prop(g, :group)), | ||
| string.(get_prop(g, :name)), | ||
| Float64(nodesize), | ||
| edge_segments, | ||
| rings, | ||
| ) |
acostarelli
reviewed
Jul 1, 2026
| julia-version: ['1'] | ||
| julia-arch: [x64] | ||
| os: [ubuntu-latest, windows-latest, macOS-latest] | ||
| os: [ubuntu-latest, macOS-latest] |
Member
There was a problem hiding this comment.
Why remove Windows from the CI/CD?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.