docs: Conversion of ImageOutput docs to tests for the copy image exam…#5197
Conversation
…ples Signed-off-by: Marta Feriani <marta.celeste.feriani@gmail.com>
lgritz
left a comment
There was a problem hiding this comment.
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.
|
Hello @lgritz, thank you for reviewing!
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. |
|
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! |
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
pythonandcppI have replaced the file{input,output}.jpgmentioned in the example with{input,output}.exrin 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.cppexample code was further modified to:clang-format(see original failing output here)ImageOutput.copy_imagepythonexample 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:
and if I used AI coding assistants, I have an
Assisted-by: TOOL / MODELline in the pull request description above.
behavior.
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.)
fixed any problems reported by the clang-format CI test.
corresponding Python bindings. If altering ImageBufAlgo functions, I also
exposed the new functionality as oiiotool options.