-
Notifications
You must be signed in to change notification settings - Fork 163
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
[INFRA] use macro to render examples in a "tree" like fashion #837
Conversation
I have updated all the examples that seemed relevant. I have left the old version below for an easier before / after comparison on the rendering: Let me know what you think. Once I get the green light on this on the "content", I will do some clean up and add some doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried ditching the relative imports?
That is, don't do from . import X
but from <explicit-package-name> import X
.
Apart from the fact that it might solve the issue here, explicit (absolute) imports are often more readable and transparent: https://stackoverflow.com/a/4209771/5201771
It'll have to be fixed in several places, also consider the fix I posted on mattermost for your tools/examplecode/__init__.py
file :-)
OK all of CI is green on this one. the PDF looks fine to me. let me know if I am missing something in terms of doc or something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! just some minor comments, this is great :)
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
this style of import is required for the building of the pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great to me. I think you just need to deal with the merge conflicts, but other than that I think it's good to go.
Thanks for the reminder @tsalo : I had totally forgotten to cross check this one. |
Thanks a lot @Remi-Gau this is great! |
fixes #807
This is a first attempt to see what it could look like to render examples differently from templates
Current issues:
Writing complex examples can get a bit annoying: almost tempted to have examples "encoded" in separate yaml files. Might be an overkill as most examples will remain fairly simple