8000 Merge pull request #3 from matplotlib/master · matplotlib/matplotlib@45eadc1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45eadc1

Browse files
author
Isa Hassen
authored
Merge pull request #3 from matplotlib/master
update
2 parents 24b21ae + 1f173dd commit 45eadc1

File tree

150 files changed

+3687
-2394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+3687
-2394
lines changed

.coveragerc

Lines changed: 3 additions & 1 deletion

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[run]
2-
source=
2+
branch = true
3+
source =
34
matplotlib
45
mpl_toolkits
6+
omit = matplotlib/_version.py
57
68
[report]
79
exclude_lines =

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ matrix:
5656
env: MOCK=mock NUMPY=numpy==1.7.1
5757
- python: 3.4
5858
env: PYTHON_ARGS=-OO
59-
- python: 3.5
60-
env: PANDAS=pandas DELETE_FONT_CACHE=1
6159
- python: 3.5
6260
env: BUILD_DOCS=true
6361
- python: 3.5
@@ -154,7 +152,7 @@ script:
154152
# Workaround for pytest-xdist flaky collection order
155153
# https://github.com/pytest-dev/pytest/issues/920
156154
# https://github.com/pytest-dev/pytest/issues/1075
157-
export PYTHONHASHSEED=$(shuf -i 1-4294967295 -n 1)
155+
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
158156
echo PYTHONHASHSEED=$PYTHONHASHSEED
159157
160158
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8

INSTALL

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ install matplotlib using pip_::
6464
python -m pip install matplotlib
6565

6666
In case Python 2.7 or 3.4 are not installed for all users,
67-
the Microsoft Visual C++ 2008 (
68-
`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=15336>`__
67+
the Microsoft Visual C++ 2008
68+
(`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=15336>`__
6969
or
7070
`32 bit <https://www.microsoft.com/en-us/download/details.aspx?id=29>`__
71-
for Python 2.7) or Microsoft Visual C++ 2010 (
72-
`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=14632>`__
71+
for Python 2.7) or Microsoft Visual C++ 2010
72+
(`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=14632>`__
7373
or
7474
`32 bit <https://www.microsoft.com/en-us/download/details.aspx?id=5555>`__
7575
for Python 3.4) redistributable packages need to be installed.
@@ -106,14 +106,15 @@ or example code.
106106
If you want to try the many demos that come in the matplotlib source
107107
distribution, download the :file:`*.tar.gz` file and look in the
108108
:file:`examples` subdirectory.
109-
To run the test suite, copy the :file:`lib\\matplotlib\\tests` and
110-
:file:`lib\\mpl_toolkits\\tests` directories from the source
111-
distribution to :file:`sys.prefix\\Lib\\site-packages\\matplotlib` and
112-
:file:`sys.prefix\\Lib\\site-packages\\mpl_toolkits` respectively, and
113-
install `nose <https://pypi.python.org/pypi/nose>`_, `mock
114-
<https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
115-
ffmpeg, avconv, mencoder, ImageMagick, and `Inkscape
116-
<https://inkscape.org/>`_.
109+
To run the test suite:
110+
111+
* extract the :file:`lib\\matplotlib\\tests` or
112+
:file:`lib\\mpl_toolkits\\tests` directories from the source distribution;
113+
* install test dependencies: `pytest <https://pypi.python.org/pypi/pytest>`_,
114+
`mock <https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
115+
ffmpeg, avconv, mencoder, ImageMagick, and `Inkscape
116+
<https://inkscape.org/>`_;
117+
* run ``py.test path\\to\\tests\\directory``.
117118

118119

119120

@@ -133,13 +134,15 @@ latest git version :ref:`install-from-git`.
133134
The standard environment variables `CC`, `CXX`, `PKG_CONFIG` are respected.
134135
This means you can set them if your toolchain is prefixed. This may be used for
135136
cross compiling.
137+
::
136138

137139
export CC=x86_64-pc-linux-gnu-gcc
138140
export CXX=x86_64-pc-linux-gnu-g++
139141
export PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config
140142

141143
Once you have satisfied the requirements detailed below (mainly
142-
python, numpy, libpng and freetype), you can build matplotlib::
144+
python, numpy, libpng and freetype), you can build matplotlib.
145+
::
143146

144147
cd matplotlib
145148
python setup.py build
@@ -222,7 +225,7 @@ Required Dependencies
222225
Dependencies for python 2
223226
^^^^^^^^^^^^^^^^^^^^^^^^^
224227

225-
`functools32 <https://pypi.python.org/pypi/functools32>`_
228+
`backports.functools_lru_cache <https://pypi.python.org/pypi/backports.functools_lru_cache>`_
226229
Required for compatibility if running on Python 2.7.
227230

228231
`subprocess32 <https://pypi.python.org/pypi/subprocess32/>`_

README.rst

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
|Travis|_ |AppVeyor|_ |Codecov|_ |PyPi|_ |Gitter|_ |Depsy|_
2+
3+
4+
.. |Travis| image:: https://travis-ci.org/matplotlib/matplotlib.svg?branch=master
5+
.. _Travis: https://travis-ci.org/matplotlib/matplotlib
6+
7+
.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=master&svg=true
8+
.. _AppVeyor: https://ci.appveyor.com/project/matplotlib/matplotlib
9+
10+
.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=master&service=github
11+
.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=master
12+
13+
.. |PyPi| image:: https://badge.fury.io/py/matplotlib.svg
14+
.. _PyPi: https://badge.fury.io/py/matplotlib
15+
16+
.. |Gitter| image:: https://badges.gitter.im/Join%20Chat.svg
17+
:alt: Join the chat at https://gitter.im/matplotlib/matplotlib
18+
.. _Gitter: https://gitter.im/matplotlib/matplotlib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
19+
20+
.. |Depsy| image:: http://depsy.org/api/package/pypi/matplotlib/badge.svg
21+
.. _Depsy: http://depsy.org/package/python/matplotlib
22+
123
##########
224
matplotlib
325
##########
@@ -20,17 +42,16 @@ Testing
2042

2143
After installation, you can launch the test suite::
2244

23-
python tests.py
45+
py.test
2446

2547
Or from the Python interpreter::
2648

2749
import matplotlib
2850
matplotlib.test()
2951

3052
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
31-
more information. Note that the test suite requires nose and on Python 2.7 mock
32-
which are not installed by default. Please install with pip or your package
33-
manager of choice.
53+
more information. Note that the test suite requires pytest and, on Python 2.7,
54+
mock. Please install with pip or your package manager of choice.
3455

3556
Contact
3657
=======
@@ -44,9 +65,7 @@ matplotlib's communication channels include active mailing lists:
4465
The first is a good starting point for general questions and discussions.
4566

4667

47-
.. image:: https://badges.gitter.im/Join%20Chat.svg
48-
:alt: Join the chat at https://gitter.im/matplotlib/matplotlib
49-
:target: https://gitter.im/matplotlib/matplotlib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
68+
5069

5170
Contribute
5271
==========

README.win.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ conda install pyqt
2727
# this package is only available in the conda-forge channel
2828
conda install -c conda-forge msinttypes
2929
# for python 2.7
30-
conda install -c conda-forge functools32
30+
conda install -c conda-forge backports.functools_lru_cache
3131

3232
# copy the libs which have "wrong" names
3333
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ environment:
1414
CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"
1515
# Workaround for https://github.com/conda/conda-build/issues/636
1616
PYTHONIOENCODING: "UTF-8"
17-
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib
17+
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib -m "not network"
1818
USE_PYTEST: no
1919
PYTHONHASHSEED: 0 # Workaround for pytest-xdist flaky collection order
2020
4765 # https://github.com/pytest-dev/pytest/issues/920
@@ -94,7 +94,7 @@ install:
9494
mock sphinx
9595
- activate test-environment
9696
- cmd: echo %PYTHON_VERSION% %TARGET_ARCH%
97-
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q functools32
97+
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache
9898
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
9999
- conda install -q pytest "pytest-cov>=2.3.1" pytest-timeout pytest-xdist
100100

@@ -140,8 +140,8 @@ test_script:
140140
- if x%USE_PYTEST% == xno python tests.py %PYTEST_ARGS%
141141
# Generate a html for visual tests
142142
- python visual_tests.py
143-
- if x%USE_PYTEST% == xyes pip install codecov
144-
- if x%USE_PYTEST% == xyes codecov -e PYTHON_VERSION PLATFORM
143+
- pip install codecov
144+
- codecov -e PYTHON_VERSION PLATFORM
145145

146146
after_test:
147147
# After the tests were a success, build packages (wheels and conda)

build_alllocal.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:: # this package is only available in the conda-forge channel
88
:: conda install -c conda-forge msinttypes
99
:: if you build on py2.7:
10-
:: conda install -c conda-forge functools32
10+
:: conda install -c conda-forge backports.functools_lru_cache
1111

1212
set TARGET=bdist_wheel
1313
IF [%1]==[] (

ci/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ coverage:
2424
paths: '!lib/.*/tests/.*'
2525

2626
tests:
27-
target: 97.7%
27+
target: 97.9%
2828< 4765 div class="diff-text-inner"> paths: 'lib/.*/tests/.*'

ci/conda_recipe/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ requirements:
3030
- freetype 2.6*
3131
- msinttypes # [win]
3232
- cycler >=0.10
33-
- nose
33+
- pytest >=3.0.0
3434
- pyparsing
3535
- pytz
3636
# - py2cairo # [linux and py2k]
@@ -39,7 +39,7 @@ requirements:
3939
- zlib 1.2* # [win]
4040
- pyqt # [not osx]
4141
- tk 8.5* # [linux]
42-
- functools32 # [py2k]
42+
- backports.functools_lru_cache # [py2k]
4343

4444
run:
4545
- python
@@ -54,7 +54,7 @@ requirements:
5454
- libpng >=1.6.21,<1.7
5555
- pyqt # [not osx]
5656
- tk 8.5* # [linux and win]
57-
- functools32 # [py2k]
57+
- backports.functools_lru_cache # [py2k]
5858

5959
test:
6060
imports:

doc/_templates/layout.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ <h3>{{ _('Navigation') }}</h3>
8282
VERSION: '{{ release|e }}',
8383
COLLAPSE_INDEX: false,
8484
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
85-
HAS_SOURCE: {{ has_source|lower }}
85+
HAS_SOURCE: {{ has_source|lower }},
86+
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
8687
};
8788
</script>
8889
{%- for scriptfile in script_files %}

0 commit comments

Comments
 (0)
0