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

Skip missing .mtlx checks #85

Merged
merged 2 commits into from
May 15, 2024

Conversation

crydalch
Copy link
Contributor

Until usd-core includes UsdMtlX, skip any 'missing reference' checks related to .mtlx documents.

Discussion raised in #82, would unblock PR #80

Until usd-core includes UsdMtlX, skip any 'missing reference' checks related to .mtlx documents.
@crydalch
Copy link
Contributor Author

@meshula, @jcowles, @pablode what do you think about this tweak to our usdchecker script?

Copy link
Contributor

@meshula meshula left a comment

Choose a reason for hiding this comment

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

Yes, until use-core includes matx this issue will continue, the comment noting that the check should be reinstated in the future is the right move.

@pablode
Copy link
Contributor

pablode commented Mar 12, 2024

Doesn’t this ignore non-MissingReferenceChecker checks? (haven’t tested it yet)

@crydalch
Copy link
Contributor Author

Argh! You're right @pablode I didn't have a USD MissingReferenceCheck to test. Updated the commit to just skip .mtlx failedChecks. Thanks for catching that

@AlexSchwank
Copy link
Contributor

@pablode does this look good now?

@@ -120,6 +120,10 @@ def main():
warnings = checker.GetWarnings()
errors = checker.GetErrors()
failedChecks = checker.GetFailedChecks()

# Skip 'missing' .mtlx documents, until usd-core includes UsdMtlX
if failedChecks:
Copy link
Contributor

@pablode pablode Apr 18, 2024

Choose a reason for hiding this comment

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


# Skip 'missing' .mtlx documents, until usd-core includes UsdMtlX
if failedChecks:
failedChecks = [check for check in failedChecks if '.mtlx' not in check]
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I don't like the coarseness of this check as errors from other rules can get ignored. I would use a regex that additionally contains part of the error string, but it probably does not matter in practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestions. I'm not regex-savy enough to implement it that way; but since this is just a temporary measure until the USD package on PyPi includes UsdMtlX, are you okay if it's accepted as-is?

Copy link
Contributor

@pablode pablode Apr 19, 2024

Choose a reason for hiding this comment

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

Sure 👍

(on a second note: an additional substring check would be just as easy)

@jcowles
Copy link
Collaborator

jcowles commented May 15, 2024

Thanks for the review @pablode !

@jcowles jcowles merged commit 3f3cff9 into usd-wg:main May 15, 2024
@jcowles
Copy link
Collaborator

jcowles commented May 15, 2024

And thanks for the fix @crydalch !!

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.

5 participants