Skip to content

docs: Conversion of ImageOutput docs to tests for the copy image exam…#5197

Merged
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
demiaster:docs_imageoutput_copy
May 15, 2026
Merged

docs: Conversion of ImageOutput docs to tests for the copy image exam…#5197
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
demiaster:docs_imageoutput_copy

Conversation

@demiaster
Copy link
Copy Markdown
Contributor

Description

Convert C++ and Python example from the ImageOutput: Copying an entire image chapter into tests within the docs-examples-{cpp,python} test suites.
This was done following the steps outlined in Converting documentation examples to tests.



Notes

  • In both python and cpp I have replaced the file {input,output}.jpg mentioned in the example with {input,output}.exr in the test, so to reuse existing resource files (i.e. testsuite/common/grid-small.exr): do let me know if you prefer the tests also use a .jpg, in which case I'll add a new resource to that effect.
  • The cpp example code was further modified to:
    1. pass the requirements of clang-format (see original failing output here)
    2. successfully run ImageOutput.copy_image
  • The python example code was further modified to remove unnecessary whitespace before the brackets of function calls.

Finally, when following the conversion docs, I have not addressed point 5: again, let me know if you prefer to have a positive fixture to compare the test output against.

Tests

I have checked that, on my fork:

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.

…ples

Signed-off-by: Marta Feriani <marta.celeste.feriani@gmail.com>
Copy link
Copy Markdown
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for the contribution.

The formality and structure of your PR description makes me think you used an AI coding assistant to help with this work. That's fine, but if true, we would prefer that you disclose that with a line in your PR description that looks like:

Assisted-by:  TOOL-NAME / MODEL-NAME

Just edit the PR description and let me know when you've done that so I can merge. Or, if this is really all your own brain's work, just say so.

@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 May 15, 2026
@demiaster
Copy link
Copy Markdown
Contributor Author

Hello @lgritz, thank you for reviewing!

The formality and structure of your PR description makes me think you used an AI coding assistant to help with this work.

No AI used for this PR: the way the work is presented was an attempt on my part to ensure anyone coming in had the best possible context to conduct a review asynchronously 😄

Let me know if you want me to say as much in the PR description also, or whether the comment here is enough.

@lgritz
Copy link
Copy Markdown
Collaborator

lgritz commented May 15, 2026

No, it's not a problem at all. I just wanted to ensure that any assisted-by attribute, if needed, was added before I did the merge (after which I can't change it).

All looks good, I will merge. Thanks for this patch!

@lgritz lgritz merged commit de9eade into AcademySoftwareFoundation:main May 15, 2026
30 checks passed
@demiaster demiaster deleted the docs_imageoutput_copy branch May 15, 2026 09:26
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.

2 participants