Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Link to a source code from OpenImageIO documentation #4406

Open
ssh4net opened this issue Sep 4, 2024 · 5 comments
Open

Comments

@ssh4net
Copy link
Contributor

ssh4net commented Sep 4, 2024

Too often, documentation is not enough to understand how some API functions are working.
For example, Colour-Science Python library usually provides a link to a source code where possible to check how it works under the hood. (for example https://colour.readthedocs.io/en/master/generated/colour.CHROMATIC_ADAPTATION_METHODS.html )

OpenImageIO can also win from a similar approach. Like in case when user wants to check if there is a additional optimisation in function code, or not all input parameters are documented.

@lgritz
Copy link
Collaborator

lgritz commented Sep 4, 2024

That's interesting. Does anybody have a good idea about how to achieve this in a fairly automatic way for our documentation system?

@wgergely
Copy link

wgergely commented Sep 5, 2024

If the docs are built with sphinx adding 'sphinx.ext.viewcode' to extensions in src/doc/conf.py should do the trick? Shall I make a pull request?

@lgritz
Copy link
Collaborator

lgritz commented Sep 5, 2024

Yes, please!

We build docs with Sphinx, using the Breathe plugin which takes Doxygen-generated XML that extracts API documentation from the C++ headers.

@aarondemolder
Copy link

Came across this and saw this didn't happen, so made a PR - hope that's alright 😄

@aarondemolder
Copy link

If the docs are built with sphinx adding 'sphinx.ext.viewcode' to extensions in src/doc/conf.py should do the trick? Shall I make a pull request?

Unfortunately it wasn't quite so simple and will need some more attention - I found some more discussion on similar here: breathe-doc/breathe#388

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

No branches or pull requests

4 participants