Skip to content

pygfx: support Point symbols#65

Merged
gselzer merged 5 commits intopyapp-kit:mainfrom
gselzer:pygfx-points-markers
Apr 15, 2026
Merged

pygfx: support Point symbols#65
gselzer merged 5 commits intopyapp-kit:mainfrom
gselzer:pygfx-points-markers

Conversation

@gselzer
Copy link
Copy Markdown
Collaborator

@gselzer gselzer commented Apr 15, 2026

Somehow point symbols were overlooked to this point for pygfx. This PR adds them in.

@tlambert03, since you wrote scenex.model.SymbolName: there are many symbol types that pertain only to pygfx that aren't in that list, and conversely some symbols that the pygfx backend can't (without a custom marker type, which is some additional effort) handle. We should probably come up with a strategy to address that for each backend (maybe just make SymbolName the union of all supported markers, and only support some in each backend?) - but we can address this in another PR, for sure

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.41%. Comparing base (6e10ae7) to head (5bc6418).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   88.38%   88.41%   +0.03%     
==========================================
  Files          62       62              
  Lines        3064     3074      +10     
==========================================
+ Hits         2708     2718      +10     
  Misses        356      356              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

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 point symbol support to the pygfx backend by translating scenex.model.SymbolName values into pygfx.PointsMarkerMaterial.marker values, with warnings for unsupported symbols.

Changes:

  • Implement _snx_set_symbol for the pygfx Points adaptor, including a few alias translations and a warning path for unsupported symbols.
  • Add a new parametrized test covering all SymbolName values, including alias handling and expected warnings for unsupported markers.

Reviewed changes

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

File Description
src/scenex/adaptors/_pygfx/_points.py Implements pygfx marker selection logic for Points.symbol, with aliases and warnings for unsupported symbols.
tests/adaptors/_pygfx/test_points.py Adds coverage for symbol updates across all SymbolName options, including unsupported-symbol warning behavior.

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

Comment thread tests/adaptors/_pygfx/test_points.py Outdated
Comment thread tests/adaptors/_pygfx/test_points.py Outdated
Comment thread src/scenex/adaptors/_pygfx/_points.py Outdated
Comment thread src/scenex/adaptors/_pygfx/_points.py Outdated
@gselzer gselzer merged commit 50076c9 into pyapp-kit:main Apr 15, 2026
36 checks passed
@gselzer gselzer deleted the pygfx-points-markers branch April 15, 2026 18:12
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.

2 participants