Skip to content

docs(IO): convert ImageOutput example code into tests - #5483

Merged
lgritz merged 2 commits into
AcademySoftwareFoundation:mainfrom
dreamworksanimation:lzhang/issue_3992-docs-imageoutput
Sep 22, 2026
Merged

lgritz merged 2 commits into
AcademySoftwareFoundation:mainfrom
dreamworksanimation:lzhang/issue_3992-docs-imageoutput

Conversation

@laurenzhang-dwa

@laurenzhang-dwa laurenzhang-dwa commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3992

Description

  • Convert C++ and Python example from the Channel Names section of ImageOutput into testable code in testsuite/docs-examples-{cpp,python}/src/docs-examples-imageoutput.{cpp,py}
  • Updated out*.txt files to with printouts from tests
  • Replace hardcoded example in imageoutput.md with reference to testsuite code

Assisted-by: Copilot / Opus 4.8 for understanding codebase and build system in the context of DW Rez environment.

Tests

Confirmed locally:

  • Test passes
  • sphinx documentation generates correctly

Checklist:

  • I have read the guidelines on contributions and code review procedures.
  • I have read the Policy on AI Coding Assistants
    and if I used AI coding assistants, I have an Assisted-by: TOOL / MODEL
    line in the pull request description above.
  • I have updated the documentation if my PR adds features or changes
    behavior.
  • I am sure that this PR's changes are tested in the testsuite.
  • I have run and passed the testsuite in CI before submitting the
    PR, by pushing the changes to my fork and seeing that the automated CI
    passed there. (Exceptions: If most tests pass and you can't figure out why
    the remaining ones fail, it's ok to submit the PR and ask for help. Or if
    any failures seem entirely unrelated to your change; sometimes things break
    on the GitHub runners.)
  • My code follows the prevailing code style of this project and I
    fixed any problems reported by the clang-format CI test.
  • If I added or modified a public C++ API call, I have also amended the
    corresponding Python bindings. If altering ImageBufAlgo functions, I also
    exposed the new functionality as oiiotool options.

…suite test

Addresses [[AcademySoftwareFoundation#3992](https://github.com/dreamworksanimation/OpenImageIO/issues/3992)](https://github.com/dwanim/OpenImageIO/issues/3992).

- Convert C++ and Python example from the Channel Names section of ImageOutput into testable code in `testsuite/docs-examples-{cpp,python}/src/docs-examples-imageoutput.{cpp,py}`
- Replace hardcoded example in `imageoutput.md` with reference to testsuite code using literalinclude

Assisted-by: Copilot / Opus 4.8 for understanding codebase and build system in the context of DW Rez environment.

Signed-off-by: Lauren Zhang <Lauren.Zhang@dreamworks.com>
@lgritz

lgritz commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

There seem to be CI failures

@lgritz lgritz added build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. docs Documentation devdays26 Dev Days 2026 labels Sep 21, 2026
- Update `doc-examples-imageoutput.cpp`  based on clang-format output from CI
- Update `out*.txt` ref files for python doc example tests

Assisted-by: Copilot / Sonnet 5
Signed-off-by: Lauren Zhang <Lauren.Zhang@dreamworks.com>

@lgritz lgritz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@lgritz
lgritz merged commit 8004015 into AcademySoftwareFoundation:main Sep 22, 2026
32 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Sep 22, 2026
…ndation#5483)

Fixes AcademySoftwareFoundation#3992

- Convert C++ and Python example from the Channel Names section of
ImageOutput into testable code in
`testsuite/docs-examples-{cpp,python}/src/docs-examples-imageoutput.{cpp,py}`
- Updated `out*.txt` files to with printouts from tests
- Replace hardcoded example in `imageoutput.md` with reference to
testsuite code

Assisted-by: Copilot / Opus 4.8 for understanding codebase and build
system in the context of DW Rez environment.

Confirmed locally:
- Test passes
- sphinx documentation generates correctly

---------

Signed-off-by: Lauren Zhang <Lauren.Zhang@dreamworks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. devdays26 Dev Days 2026 docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert documentation examples into testsuite tests

2 participants