Skip to content

Validate mapping#230

Merged
teunbrand merged 13 commits intoposit-dev:mainfrom
teunbrand:validate_mapping
Mar 19, 2026
Merged

Validate mapping#230
teunbrand merged 13 commits intoposit-dev:mainfrom
teunbrand:validate_mapping

Conversation

@teunbrand
Copy link
Collaborator

This PR aims to fix #120.

Instead of just checking if required aesthetics are present, we now also check if the mapping has unsupported entries.
An extra AestheticContext method was needed to report user-facing position aesthetics.

teunbrand and others added 13 commits March 16, 2026 11:30
Adds comprehensive tests for map_internal_to_user() method and validation
error messages to ensure internal aesthetic names (pos1, pos2, facet1) are
correctly translated to user-facing names (x, y, panel) in error messages.

Tests cover:
- Cartesian coordinates (x, y and variants)
- Polar coordinates (theta, radius)
- Facet aesthetics (panel, row, column)
- Roundtrip conversion (user -> internal -> user)
- Validation error messages for missing and unsupported aesthetics

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@teunbrand teunbrand marked this pull request as ready for review March 19, 2026 09:33
@teunbrand teunbrand requested a review from thomasp85 March 19, 2026 09:33
Copy link
Collaborator

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

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

LGTM

@teunbrand teunbrand merged commit d6f6765 into posit-dev:main Mar 19, 2026
18 checks passed
@teunbrand teunbrand deleted the validate_mapping branch March 19, 2026 10:25
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.

Validation of mapped aesthetics

2 participants