Skip to content
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

Cleanup texmanager. #10181

Merged
merged 1 commit into from Jan 8, 2018

Conversation

Projects
None yet
3 participants
@anntzer
Copy link
Contributor

commented Jan 6, 2018

  • remove check for "old" cache (the location changed in efa9ea6 (2005)).
  • postscriptd and pscnt are unused since c0d6110 (2006), deprecate them.
  • calling \usepackage more than once with the same package does nothing
    (as a repeated import in Python) so no need to remove calls to
    \usepackage{type1cm}.
  • replace DEBUG by _log.debug where appropriate; other cases (forcing
    file regeneration) can be handled by manually deleting the old file.

Various other minor cleanups.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer force-pushed the anntzer:cleanup-texmanager branch 2 times, most recently from bfd122c to 92b1bb4 Jan 6, 2018

@tacaswell

This comment has been minimized.

Copy link
Member

commented Jan 7, 2018

get_ps_bbox was last used in 310e707 (2009)

@tacaswell tacaswell added this to the v2.2 milestone Jan 7, 2018

@tacaswell

This comment has been minimized.

Copy link
Member

commented Jan 8, 2018

It looks like DEBUG used to also short-circuit the cache and force re-generation in all cases. I don't think that is a big deal, but just making sure it is noted.

break
else:
if DEBUG:
print('$s font is not compatible with usetex')
_log.debug('$s font is not compatible with usetex')

This comment has been minimized.

Copy link
@QuLogic

QuLogic Jan 8, 2018

Member

What is a $s font? Was this supposed to be a %s substitution?


def get_basefile(self, tex, fontsize, dpi=None):
"""
returns a filename based on a hash of the string, fontsize, and dpi
Returns a filename based on a hash of the string, fontsize, and dpi.

This comment has been minimized.

Copy link
@QuLogic

QuLogic Jan 8, 2018

Member

Since you're changing them all, the first line of the docstring should be imperative (Return, not Returns).

@anntzer anntzer force-pushed the anntzer:cleanup-texmanager branch from 92b1bb4 to 31d8937 Jan 8, 2018

Cleanup texmanager.
- remove check for "old" cache (the location changed in efa9ea6 (2005)).
- postscriptd and pscnt are unused since c0d6110 (2006), deprecate them.
- make_ps and make_ps_bbox are unused since 310e707 (2009), deprecate
  them.
- calling \usepackage more than once with the same package does nothing
  (as a repeated import in Python) so no need to remove calls to
  \usepackage{type1cm}.
- replace DEBUG by _log.debug where appropriate; other cases (forcing
  file regeneration) can be handled by manually deleting the old file.

Various other minor cleanups.

@anntzer anntzer force-pushed the anntzer:cleanup-texmanager branch from 31d8937 to 1d3a628 Jan 8, 2018

@anntzer

This comment has been minimized.

Copy link
Contributor Author

commented Jan 8, 2018

all comments are handled

@QuLogic QuLogic merged commit e219883 into matplotlib:master Jan 8, 2018

8 checks passed

ci/circleci: docs-python27 Your tests passed on CircleCI!
Details
ci/circleci: docs-python35 Your tests passed on CircleCI!
Details
codecov/patch 65.3% of diff hit (target 50%)
Details
codecov/project/library 63.43% (target 50%)
Details
codecov/project/tests 98.85% remains the same compared to 3c1f423
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details

@anntzer anntzer deleted the anntzer:cleanup-texmanager branch Jan 9, 2018

@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.