-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: don't make CL tutorial save new file all the time #17947
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
Conversation
f1cdbb6
to
a99cea0
Compare
This worked fine. Now the file won't be generated each time. OTOH, if we change CL we will have to remember to regenerate it. |
Can't you instead simply add the generated files to Advantages:
|
a99cea0
to
1e87790
Compare
For some reason the files don't regenerate in the same spot if I just remove them from the repo. Any idea what the new static link should be? |
i.e. the link |
6eae592
to
4c8cf9b
Compare
4c8cf9b
to
4ada98a
Compare
Thanks for suggestion @timhoffm - it was a struggle, but I finally got it to work... |
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.
The relative path ../../doc/_static/constrained_layout_1b.png
is not so nice, because the user cannot simply copy the example and run it anywhere. But it's good enough for now.
The elegant solution would be to just save constrained_layout_1b.png
wherever it's run, keep the original files in _static/constrained_layout
and add a post-processing step to the sphinx run that warns if the static and the generated images differ.
Well the sphinx folks said we should write a png "scraper" to copy the file over, and get it included in the written rst. If it is a useful feature elsewhere, I'm happy to implement it. It didn't seem that hard, and basically is what you suggest here... |
Working for now. If there is interest in writing a scrapper, that can always be done later. |
…le all the time
…947-on-v3.3.0-doc Backport PR #17947 on branch v3.3.0-doc (DOC: don't make CL tutorial save new file all the time)
PR Summary
Closes #12677:
Generates the files during build and copies them into
_static
instead of making them part of the repo. Use.gitignore
to ignore local copies (in case some one doesgit add doc/_static
)PR Checklist