Skip to content

Streamline parameter validation - #614

Open
teunbrand wants to merge 12 commits into
mainfrom
param-validation
Open

teunbrand wants to merge 12 commits into
mainfrom
param-validation

Conversation

@teunbrand

Copy link
Copy Markdown
Collaborator

This PR aims to fix #586.

Briefly, core validation/resolution logic is implemented as ParameterDefinition methods.
Helper wraps this to loop over ParameterDefinition and Parameters list and checks for extra (unknown) parameters.

Comment thread src/params.rs
/// Validate `properties` against `definitions` and resolve each parameter
/// to its effective value: the user's value if present, otherwise the
/// definition's default. Returns a new map with defaults filled.
pub fn resolve_parameters(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the main function to understand

Comment thread src/plot/facet/resolve.rs

// Handle ncol/nrow for wrap facets
if facet.is_wrap() {
let has_ncol = facet.properties.contains_key("ncol");

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This had a bug where FACET foo SETTING ncol => null skips compute_default_ncol() and we had an unresolved setting.

@teunbrand
teunbrand changed the base branch from table-feature to main November 16, 2026 10:52

This branch has not been deployed

No deployments
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.

1 participant