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

Add :shows-source-link: option to Sphinx plot directive#24215

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:mainfromlpsinger:show-source-link-option
Nov 11, 2022

Conversation

lpsinger
Copy link
Contributor

@lpsingerlpsinger commentedOct 18, 2022
edited
Loading

The Sphinx plot directive (.. plot::) now supports a:show-source-link option to show or hide the link to the source for each plot. The default is set using theplot_html_show_source_link variable inconf.py (which itself defaults to True).

PR Summary

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@lpsingerlpsingerforce-pushed theshow-source-link-option branch 2 times, most recently from9c5a5dc to8fae504CompareOctober 18, 2022 19:50
@MikhailRyazanov
Copy link
Contributor

MikhailRyazanov commentedOct 18, 2022
edited
Loading

Just a remark that source links are currently broken forsinglehtml anddirhtml builders (as well as for building multiple targets, for example,htmlafterlatex), see issues#13858 and#24005 and the proposed solution in PR#24205. Not that this PR makes the problem worse, but it modifies the broken file-copying code and depends on its behavior in the tests.

@lpsinger
Copy link
ContributorAuthor

Any update on this?

@story645story645 added the Documentation: buildbuilding the docs labelNov 11, 2022
@story645story645 added this to thev3.7.0 milestoneNov 11, 2022
@lpsingerlpsinger requested review fromstory645 and removed request fortimhoffmNovember 11, 2022 15:31
Copy link
Member

@timhoffmtimhoffm left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was held up by#24215 (comment). But now realized that we're not hooking deeper into that functionality for execution. We only rely on it in tests. - Therefore, the worst that can happen is that our tests become broken and we have to come up with a better test, but the functionality on the user side is not affect.

This is good to go, modulo my comment on the test.

@lpsingerlpsingerforce-pushed theshow-source-link-option branch 2 times, most recently from0379f0d toa126736CompareNovember 11, 2022 17:52
@lpsingerlpsinger requested review fromtimhoffm and removed request forstory645November 11, 2022 17:53
@timhoffm
Copy link
Member

Precommit sees trailing whitespace

@lpsinger
Copy link
ContributorAuthor

I pushed one more little change to fix this error from the CI pipeline:

trim trailing whitespace.................................................Failed- hook id: trailing-whitespace- exit code: 1- files were modified by this hookFixing doc/users/next_whats_new/show_source_links_directive_option.rst

@lpsinger
Copy link
ContributorAuthor

Precommit sees trailing whitespace

That's fixed now. Should be ready to go.

@story645
Copy link
Member

@lpsinger do you want to squash/rebase or should I?

The Sphinx plot directive (`.. plot::`) now supports a`:show-source-link` option to show or hide the link to the sourcefor each plot. The default is set using the`plot_html_show_source_link` variable in `conf.py` (which itselfdefaults to True).
@lpsinger
Copy link
ContributorAuthor

@lpsinger do you want to squash/rebase or should I?

Done.

@timhoffmtimhoffm merged commit19d9340 intomatplotlib:mainNov 11, 2022
@timhoffm
Copy link
Member

Thanks@lpsinger

@lpsinger
Copy link
ContributorAuthor

Thank you!

@lpsingerlpsinger deleted the show-source-link-option branchNovember 11, 2022 22:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Documentation: buildbuilding the docs
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

4 participants
@lpsinger@MikhailRyazanov@timhoffm@story645

[8]ページ先頭

©2009-2025 Movatter.jp