Context
The tutorial/test infrastructure (#253) includes stub_generator.py which creates NetCDF files from YAML manifests. Currently, manifests must be hand-written.
Proposed CLI Commands
pycmor tutorial inspect
Reads real NetCDF files and generates a stub_manifest.yaml:
pycmor tutorial inspect /path/to/real/output/*.nc -o stub_manifest.yaml
pycmor tutorial generate-stubs
Reads a manifest and writes stub NetCDF files:
pycmor tutorial generate-stubs stub_manifest.yaml -o ./stub_data/
Scope
- ~50-80 lines for the inspect command (read dims/coords/attrs, dump YAML)
- CLI wiring via click/typer
- Tests for roundtrip: real files -> manifest -> stub files -> verify structure matches
Depends on