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

Fix Path/str-discrepancy in FontManager.addpath and improve documentation#22591

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
QuLogic merged 4 commits intomatplotlib:mainfromoscargus:fontmanageraddpathstr
Mar 21, 2022

Conversation

oscargus
Copy link
Member

@oscargusoscargus commentedMar 3, 2022
edited
Loading

PR Summary

Closes#22582
Closes#22586

Always convert input tostr first.

Also update the documentation a bit.

Cannot really see how this can be tested as I do not know of any ttf-font locations on the CI... Edit: I found a ttf-font in the test data, so at least it should be possible to test passing a Path without errors. Edit 2: Test added.

Also added a validation function forfont.stretch, so now rcParam-values can also be ints.

Kept it as four separate commits, but can of course merge to a single.

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

tacaswell reacted with thumbs up emoji
@oscargusoscargusforce-pushed thefontmanageraddpathstr branch fromf56ea70 toe22b3a6CompareMarch 3, 2022 18:14
@oscargusoscargus added this to thev3.6.0 milestoneMar 3, 2022
@oscargusoscargusforce-pushed thefontmanageraddpathstr branch 2 times, most recently from9939784 to22e3dafCompareMarch 3, 2022 18:25
@oscargusoscargus marked this pull request as draftMarch 4, 2022 08:05
@oscargusoscargusforce-pushed thefontmanageraddpathstr branch 2 times, most recently from6d5edf6 to63eba3bCompareMarch 4, 2022 19:19
@oscargusoscargus changed the titleFix Path/str-discrepancy in FontManager.addpathFix Path/str-discrepancy in FontManager.addpath and improve documentationMar 4, 2022
@oscargusoscargus marked this pull request as ready for reviewMarch 4, 2022 19:40
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.

This is good, only some stylistic comments.


- style: Either 'normal' (default), 'italic' or 'oblique'.
- style: Either 'normal', 'italic' or 'oblique'.
Copy link
Member

Choose a reason for hiding this comment

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

Optional: Highlight the properties using italics (or alternatively literal format)

Suggested change
-style:Either'normal','italic'or'oblique'.
-*style*:Either'normal','italic'or'oblique'.

This is also quite redundant with the setters. This is almost completely a data class. IMHO it would be reasonable to add properties and move all the documentation there, i.e. delete this list and the setter docstrings (setters may link to the property docs. But that's for a later time.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

That would make sense, but I think it is better to try to get the information from the setmethods at a later stage.

@oscargusoscargus marked this pull request as draftMarch 6, 2022 10:26
@oscargusoscargus marked this pull request as ready for reviewMarch 14, 2022 09:27
@oscargus
Copy link
MemberAuthor

oscargus commentedMar 14, 2022
edited
Loading

I changed based on the comments.

However, there is still the same issue as in#22556 (comment)

Edit: I screwed up when editing and did just amend to the last commit rather than updating the correct one, so one may want to squash.

@@ -1,7 +1,7 @@
"""
A module for finding, managing, and using fonts across platforms.

This module provides a single `FontManager` instance that can
This module provides a single `FontManager` instance, ``fontManager``, that can
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I did not manage to link tofontManager when the definition is infont_manager_api.rst.

@QuLogicQuLogic merged commite3c8195 intomatplotlib:mainMar 21, 2022
@twm
Copy link

twm commentedMar 22, 2022

Thank you all very much for the quick resolution!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer left review comments

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

[Doc]: FontManager docs should mention the singleton is namedfontManager [Bug]: FontManager.addfont doesn't accept pathlib.Path of TTF font
5 participants
@oscargus@twm@QuLogic@anntzer@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp