Skip to content

Add MaterialX validation script and CI workflow#301

Open
portsmouth wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
portsmouth:add-mtlx-ci
Open

Add MaterialX validation script and CI workflow#301
portsmouth wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
portsmouth:add-mtlx-ci

Conversation

@portsmouth
Copy link
Copy Markdown
Contributor

Summary

  • Adds validation/validate_mtlx.py, a script that validates .mtlx files against the MaterialX standard libraries
  • Adds .github/workflows/validate-mtlx.yml, which runs the validator on reference/open_pbr_surface.mtlx and all examples/*.mtlx on every PR or push that touches .mtlx files

How it works

The validator uses pip install materialx (no build-from-source required), loads the standard libraries, and runs doc.validate(). It also performs an explicit nodename reference check on the standalone document — this catches dangling connections that the with-libraries validation misses when a file shares a name with a standard library file (as open_pbr_surface.mtlx does with libraries/bxdf/open_pbr_surface.mtlx).

Test plan

  • Workflow triggers on PRs that modify .mtlx files
  • reference/open_pbr_surface.mtlx passes
  • All examples/*.mtlx pass
  • A PR that introduces a broken nodename reference fails CI

🤖 Generated with Claude Code

Adds validation/validate_mtlx.py and a GitHub Actions workflow that
validates reference/open_pbr_surface.mtlx and all examples/*.mtlx on
every PR or push that touches .mtlx files.

The validator uses pip-installed MaterialX (materialx on PyPI) for zero
dependency setup. It also performs an explicit nodename reference check
on the standalone document to catch dangling connections that
with-libraries validation misses when a file shares a name with a
standard library file.
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