Skip to content
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

Add unique identifiers to UsdValidatorError #3241

Open
nvmkuruc opened this issue Aug 19, 2024 · 1 comment
Open

Add unique identifiers to UsdValidatorError #3241

nvmkuruc opened this issue Aug 19, 2024 · 1 comment

Comments

@nvmkuruc
Copy link
Collaborator

nvmkuruc commented Aug 19, 2024

Description of Issue

See the discussion here for more information.
https://forum.aousd.org/t/identifiers-for-validation-errors

As one validator may generate multiple distinct error kinds (for example, the usdGeom stage metadata checker validates both the upAxis and metersPerUnit field), the request is that errors get an identifier or name field that can uniquely group or categorize them for downstream post processing, filtering, and organization without relying on error prone matching of the error message string.

Steps to Reproduce

System Information (OS, Hardware)

Package Versions

Build Flags

@jesschimein
Copy link

Filed as internal issue #USD-9999

pixar-oss pushed a commit that referenced this issue Sep 9, 2024
- Often a validator may result in multiple errors of different types,
  but still being part of the same validator / validation testing task.
  This identification can help categorize and probably provide some
  filtering mechanism and client do not have to parse the error strings
  to distinguish various error types from the same validator /
    - ErrorIdentifier is constructed from the validator name which generated
      the error and the error name.
        - A Coding error is thrown if a client tries to call GetIdentifier
          on an UsdValidationError which isn't generated via a call to
          UsdValidator::Validate(), which is what sets the _validator on the
          error.
        - Also note if validator writer doesn't provide an error name for an
          error, Error Identifier will be same as the name of the validator
          which generated the error. validationt task.

- The Change here provides static tokens for all the validators
  currently in our codebase: usd, usdGeom and usdShade.

- Updates tests and python wrappings to take care of the newly added
  identifier

Additional things:
- Cleans many 80 column with violations
- Cleans many indentations to be uniform with surrounding code.

Fixes #3241

(Internal change: 2339935)
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

No branches or pull requests

2 participants