Skip to content

Add CLI doctor and Maya workflows#50

Merged
Ahmed-Hindy merged 1 commit into
mainfrom
codex/cli-doctor-maya-parity
May 31, 2026
Merged

Add CLI doctor and Maya workflows#50
Ahmed-Hindy merged 1 commit into
mainfrom
codex/cli-doctor-maya-parity

Conversation

@Ahmed-Hindy

@Ahmed-Hindy Ahmed-Hindy commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bump the project to 2.0.0-beta and move version ownership into materials_processor._version.
  • Add Hatch dynamic versioning so package metadata reads from the package version module.
  • Add materials-processor --version and materials-processor doctor.
  • Add Maya CLI parity with materials-processor maya inspect, materials-processor maya export-usd, and the standalone materials-processor-maya script.
  • Add a shared USD CLI helper for DCC graph payloads and wire Maya USD MaterialX/OpenPBR export through it.
  • Update README with CLI quickstart, runtime validation examples, and current beta limitations.

Validation

  • uv --native-tls lock
  • uv --native-tls run ruff check
  • uv --native-tls run pytest
  • uv --native-tls build --wheel --out-dir C:\tmp\materials_processor_build_smoke
  • uv --native-tls run materials-processor --version
  • uv --native-tls run materials-processor doctor --validate --material-smoke --timeout 180
  • Real Maya CLI smoke on C:\tmp\materials_processor_maya_cli_smoke.ma:
    • materials-processor maya inspect ...
    • materials-processor maya export-usd ... --target materialx --target openpbr

Notes

  • Wheel filenames normalize 2.0.0-beta to 2.0.0b0, which is expected PEP 440 behavior. The CLI and package import report 2.0.0-beta.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive Maya command-line interface for exporting and inspecting material data to USD, MaterialX, and OpenPBR formats
    • Introduced doctor command to discover and validate installed DCC runtime environments (Blender, Maya, Houdini)
  • Documentation

    • Restructured README with expanded feature descriptions, detailed installation instructions, new CLI quickstart guide with practical command examples, explicit limitations documentation, and comprehensive roadmap

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR extends Materials Processor to 2.0.0-beta with a complete Maya CLI for scene inspection and USD export, introduces a doctor command for runtime discovery and validation (including Houdini), establishes dynamic versioning, extracts shared USD generation utilities, and provides comprehensive test coverage and documentation updates.

Changes

Materials Processor 2.0.0-beta: Maya CLI, Runtime Doctor, and USD Export Tooling

Layer / File(s) Summary
Dynamic versioning infrastructure
VERSION, src/materials_processor/_version.py, src/materials_processor/__init__.py, pyproject.toml
Package version is now sourced dynamically from _version.py (set to 2.0.0-beta) and resolved by Hatch at build time, replacing the hardcoded version in pyproject.toml.
CLI core: doctor command and parser wiring
src/materials_processor/cli.py
New doctor command discovers and validates installed DCC runtimes (Blender, Maya, Houdini) with optional validation and material smoke tests. Houdini runtime resolution handles explicit paths, environment variables, system lookup via shutil.which, and fallback Windows installer locations. Parser registration extends to maya (export/inspect) and doctor subcommands alongside existing blender command.
Maya CLI: extraction, export, and inspection
src/materials_processor/dcc/maya/cli.py, pyproject.toml
New Maya CLI module provides extract_maya_material_graphs (via embedded mayapy scripts), export_maya_scene_to_usd (with USD file building), and inspect_maya_scene (report generation) with configurable timeouts, runtime resolution, and policy enforcement (validation, missing texture handling). New materials-processor-maya script entry point is added to pyproject.toml.
USD export helpers: material file generation
src/materials_processor/dcc/usd_cli.py
Shared module reconstructs NodeInfo and MaterialGraph objects from JSON payloads, normalizes export targets (including all expansion and aliases), and build_usd_material_files creates USD stages, runs USDMaterialRecreator per target, saves .usda files, and collects material/shader statistics.
CLI and Maya CLI tests
tests/test_cli.py, tests/test_maya_cli.py, tests/test_public_imports.py
Maya CLI tests use mocked graph payloads to validate export/inspect behavior and error handling. CLI tests verify doctor command runtime reporting, Houdini path normalization, --version flag output, and parser structure. Public import tests confirm new modules are accessible.
Documentation: README refresh
README.md
README restructured with beta tool positioning, detailed Features (UI, multi-DCC ingestion, export targets, runtime validation), expanded Installation (Python dev, Windows), new CLI Quickstart with example commands, explicit Current Limitations, and updated Roadmap (completed milestones, upcoming Qt launcher and renderers).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Ahmed-Hindy/Materials-Processor#41: The new Maya CLI and doctor runtime validation build on the refactored Maya runtime resolution infrastructure and DCC-neutral graph adapter layout introduced in this earlier PR.

Poem

🐰 A rabbit hops through digital halls,
Building Maya CLIs and doctor calls;
USD stages bloom, runtimes align,
Version 2.0 beta—materials shine!
✨ From Houdini to Maya to USD so bright!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 32.20% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding a CLI doctor command and Maya workflows (inspect/export) to the Materials Processor tool.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cli-doctor-maya-parity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ahmed-Hindy Ahmed-Hindy self-assigned this May 31, 2026
@Ahmed-Hindy
Ahmed-Hindy marked this pull request as ready for review May 31, 2026 13:30
@Ahmed-Hindy Ahmed-Hindy changed the title [codex] Add CLI doctor and Maya workflows Add CLI doctor and Maya workflows May 31, 2026
@Ahmed-Hindy
Ahmed-Hindy merged commit 137c8b9 into main May 31, 2026
3 of 4 checks passed
@Ahmed-Hindy
Ahmed-Hindy deleted the codex/cli-doctor-maya-parity branch May 31, 2026 13:36
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