Skip to content

refactor backend of maps#7

Open
jd-lara wants to merge 1 commit into
mainfrom
feature/cairomakie-maps-animation
Open

refactor backend of maps#7
jd-lara wants to merge 1 commit into
mainfrom
feature/cairomakie-maps-animation

Conversation

@jd-lara

@jd-lara jd-lara commented Jun 28, 2026

Copy link
Copy Markdown
Member

No description provided.

@jd-lara jd-lara self-assigned this Jun 28, 2026
@jd-lara

jd-lara commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

This PR requires the PR in PA for branch processing

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 into ext/ 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 thread src/plots.jl
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,
)
julia-version: ['1']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, macOS-latest]

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.

Why remove Windows from the CI/CD?

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