Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: developer tips guide incomplete (for complete newbie) #9355

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

Closed
mattip opened this issue Oct 11, 2017 · 2 comments
Closed

DOC: developer tips guide incomplete (for complete newbie) #9355

mattip opened this issue Oct 11, 2017 · 2 comments

Comments

@mattip
Copy link
Contributor

mattip commented Oct 11, 2017

I am trying to run the matplotlib tests on Ubuntu 16.04 in a virtualenv. I am following the instructions on the developer's tips for testing page but am having problems getting started I will gladly submit a documentation pull request, but want to know if I am in the right direction.

It seems I need to pip install additional packages:

  • numpy
  • pyparsing
  • backports.functools_lru_cache
  • sphinx (for tests/tinypages, which does not have a skip if no sphinx)

Is pdflatex a recomendation?

There is no description of how to build matplotlib. I simply did python setup.py build_ext -i but then needed to run tests with PYTHONPATH=lib python -mpytest lib/matplotlib. IMO this should be described just after the section describing how to set setup.cfg

Once I did that, tests started running.

I have pdflatex installed, the test_backend_pgf::test_pdflatex image comparison test failed. I did verify that the build_ext command linked in the correct local libfreetype.a. Is the failure normal? If so I would also add that to the documentation, if not I would appreciate tips how to fix it. Maybe I am missing a font or two?

Matplotlib version

  • Operating system: Ubuntu 16.04
  • Matplotlib version: HEAD
  • Matplotlib backend (print(matplotlib.get_backend())): tkagg
  • Python version: 2.7.12
  • Jupyter version (if applicable): NA
  • Other libraries:

This is from a clean virtualenv, with only pytest, mock installed, and Ghostscript, Inkscape apt installed as per instructions.

@anntzer
Copy link
Contributor

anntzer commented Oct 11, 2017

A doc PR would be most welcome, of course!

  • I would make it clear that setting up a venv is the way to go. Alternatively, you should at least install (or pip install -e) matplotlib before running the tests, but I would guess most mpl devs also use mpl in a day to day basis for other tasks and may not want to run mpl master for these.
    The issue with setting PYTHONPATH is that due to the way namespace packages are implemented in pth files, globally installed toolkits will override toolkits available from PYTHONPATH.
    So it's either 1) run the tests off an installed mpl, or 2) set PYTHONPATH but do not have mpl installed in the same environment. In practice it seems simpler to document "install mpl in a venv with pip install -e .".

  • You probably need all non-Python dependencies documented at http://matplotlib.org/users/installing.html#dependencies.

  • test_pdflatex should effectively not rely on freetype (ghostscript is in charge of the font rendering). Can you post the failing images (tools/triage_tests.py may be helpful -- should be documented too)? Do they look like "small" rendering issues or a missing font?

Note that master docs are rendered at http://matplotlib.org/devdocs.

@anntzer
Copy link
Contributor

anntzer commented Oct 19, 2017

I think this is closed by #9378, but feel free to ask more questions (gitter may be a faster place to do so).

@anntzer anntzer closed this as completed Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants