Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:masterfromjklymak:doc-fix-CL-savefile
Jul 29, 2020

Conversation

jklymak
Copy link
Member

@jklymakjklymak commentedJul 17, 2020
edited
Loading

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

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

@jklymak
Copy link
MemberAuthor

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.

@jklymakjklymak marked this pull request as ready for reviewJuly 17, 2020 04:07
@jklymakjklymak added this to the3.2-doc milestoneJul 17, 2020
@QuLogicQuLogic modified the milestones:3.2-doc,v3.3-docJul 17, 2020
@timhoffm
Copy link
Member

Can't you instead simply add the generated files to.gitignore? AFAIK this does not affect the already commited version.

Advantages:

  • It's simpler to update because the files are always generated. Otherwise you'd have to copy the code and run it somewhere.
  • One might even add a script to automatically check if the generated image is still matching the one in the repository.

@jklymak
Copy link
MemberAuthor

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?

@jklymak
Copy link
MemberAuthor

i.e. the link/_static/constrained_layout/CL02.png is invalid.

@jklymakjklymakforce-pushed thedoc-fix-CL-savefile branch 2 times, most recently from6eae592 to4c8cf9bCompareJuly 19, 2020 15:10
@jklymakjklymak requested a review fromtimhoffmJuly 19, 2020 17:11
@jklymak
Copy link
MemberAuthor

Thanks for suggestion@timhoffm - it was a struggle, but I finally got it to work...

Copy link
Member

@timhoffmtimhoffm left a 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 saveconstrained_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.

@jklymak
Copy link
MemberAuthor

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...

@timhoffm
Copy link
Member

Working for now. If there is interest in writing a scrapper, that can always be done later.

@timhoffmtimhoffm merged commit57e8fc3 intomatplotlib:masterJul 29, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJul 29, 2020
@jklymakjklymak deleted the doc-fix-CL-savefile branchJuly 29, 2020 13:41
jklymak added a commit that referenced this pull requestJul 29, 2020
…947-on-v3.3.0-docBackport PR#17947 on branch v3.3.0-doc (DOC: don't make CL tutorial save new file all the time)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.3-doc
Development

Successfully merging this pull request may close these issues.

DOC: CL tutorial now saves png each time...
4 participants
@jklymak@timhoffm@tacaswell@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp