-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider non-procedural fixes and other suggestions for the validation framework #33
Comments
Hi @nvmkuruc and team. Thanks for the thought provoking questions. I will try to answer these in the matching bullet.
Can something like this be achieved by applying one of the fixes on a temporary editTarget, which can then be "previewed" / "finalized" or "discarded". If so, I believe something like this can be achieved as an add-on thing of what the fixer interface will provide with the framework. Though there is some core UsdStage level work needed to support this "temporary editTarget being part of the stage's original layer stack", thing I am proposing!
Yup, this is totally achievable via the current ValidationContext interface, and the ability to run a set of tests on a given set of prims. So a client application, say usdview could use the UsdNotice framework to track materials which have been updated and only run Validators tied to UsdShadeMaterial schema (a ValidationContext instance can be created which has all UsdShadeMaterial validators available).
What validators get affected by applying another validator's fix is interesting and can get convoluted very easily I think. A fixer breaking another validator, means either the fixer is incorrect or the validator is testing something incorrectly, at least for the core usd schemas!
Very valid point and thanks for the "hitch" example. Totally makes sense, I will see how I can update the APIs to take this into account.
I think the proposal already takes this into account by providing multiple named fixers per validator, which the client can use to check (by using CanApplyFix) and apply a specific named fix. Note the edit targets can be appropriately set on the Usd stage before applying the fix. Another example for this is a fix for Model Hierarchy validator, where depending on the context kind="component" or kind="group" can fix the broken model hierarchy.
So a site specific validator checks for the extension of a layer / root layer of the stage, to check if it's usda/usdc. And one of the fixers associated with the validator is to give the client an option to convert the layer / stage's root layer appropriately. At the same time the fixer also traverses the layer stack and updates any references (reference/sublayer/etc) to the old "usda" file to the new "usd(c)". (With CanApply checking if the client has the permission to make such an update, write permissions, etc). Am I understanding the question here? If so, shouldn't the above described Validator/Fixer not work in this scenario?
I am not sure I understand these, could you please elaborate? But to what I understand, after discussing the fixer interface extensively internally, we came to a conclusion that a validator should not provide a "decisive" fix, and it should only provide these fixes as a suggestion which the client needs to apply appropriately. Thanks |
By communicating fixes declaratively, we didn't mean that it would automatically or decisively fix it. We just meant some validators could return the suggested fix opinions directly. For example, consider a validator that was checking that was checking for out of range color values. As I understand the current proposal, the validator could return each site containing an out of range value as a It seems like the testing logic has to implemented in two places, in the original validator and then the fixer. The validator has to report that there's an error at By a declarative fix, we're thinking that a validator could return explicitly-- there's an error at When validators can describe fixes as a set of explicit suggestions, it can be easier to figure out whether or not they potentially conflict, might affect each other's results, and present options to the user on how to negotiate the conflicts. We don't think all validators make sense to be structured that way, but that enough (perhaps even most), that it's worth considering. |
We've been discussing some potential usages of the framework (#29).
material:binding
properties and avoid rerunning after a fix was applied. The framework could reward schema and validator developers for separating concerns such that they can be independently validated.Overall, we’d suggest validators that can communicate fixes declaratively in terms of something akin to
SdfChangeList
could address several of the above usages. Fixes might be categorizable in three ways. The purely declarative and site declarative fixes would allow for varying levels of introspection and dependency analysis that a validation framework could leverage.Thanks for the consideration!
The text was updated successfully, but these errors were encountered: