Skip to content

Commit 23d44d8

Browse files
committed
to store office matplotlib
1 parent 10f2ddc commit 23d44d8

File tree

4,386 files changed

+844030
-0
lines changed

Some content is hidden

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

4,386 files changed

+844030
-0
lines changed

.appveyor.yml

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# With infos from
2+
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
3+
# https://packaging.python.org/en/latest/appveyor/
4+
# https://github.com/rmcgibbo/python-appveyor-conda-example
5+
6+
# Backslashes in quotes need to be escaped: \ -> "\\"
7+
branches:
8+
except:
9+
- /auto-backport-.*/
10+
- /^v\d+\.\d+\.[\dx]+-doc$/
11+
12+
clone_depth: 50
13+
14+
environment:
15+
16+
global:
17+
PYTHONIOENCODING: UTF-8
18+
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
19+
--cov-report= --cov=lib -m "not network" --log-level=DEBUG
20+
21+
matrix:
22+
# theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,
23+
# one for 64bit because we construct envs anyway. But using one for the
24+
# right python version is hopefully making it fast due to package caching.
25+
- PYTHON_VERSION: "3.6"
26+
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
27+
TEST_ALL: "no"
28+
- PYTHON_VERSION: "3.7"
29+
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
30+
TEST_ALL: "no"
31+
32+
# We always use a 64-bit machine, but can build x86 distributions
33+
# with the PYTHON_ARCH variable
34+
platform:
35+
- x64
36+
37+
# all our python builds have to happen in tests_script...
38+
build: false
39+
40+
cache:
41+
- '%LOCALAPPDATA%\pip\Cache'
42+
- '%USERPROFILE%\.cache\matplotlib'
43+
44+
init:
45+
- echo %PYTHON_VERSION% %CONDA_INSTALL_LOCN%
46+
47+
install:
48+
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
49+
- set PYTHONUNBUFFERED=1
50+
# for msinttypes and newer stuff
51+
- conda config --set always_yes true
52+
- conda update --all
53+
- conda config --set show_channel_urls yes
54+
- conda config --prepend channels conda-forge
55+
# this is now the downloaded conda...
56+
- conda info -a
57+
58+
# For building, use a new environment which only includes the requirements for mpl
59+
# same things as the requirements in ci/conda_recipe/meta.yaml
60+
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
61+
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
62+
#
63+
- conda create -q -n test-environment python=%PYTHON_VERSION%
64+
msinttypes freetype=2.6 "libpng>=1.6.21,<1.7" zlib=1.2 tk=8.5
65+
pip setuptools numpy pandas sphinx tornado
66+
- activate test-environment
67+
- echo %PYTHON_VERSION% %TARGET_ARCH%
68+
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
69+
- pip install -q "pytest>=3.4" "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist
70+
71+
# Apply patch to `subprocess` on Python versions > 2 and < 3.6.3
72+
# https://github.com/matplotlib/matplotlib/issues/9176
73+
- python -c "import sys; sys.exit(not (3,) < sys.version_info < (3,6,3))" && (
74+
curl -sL https://github.com/python/cpython/pull/1224.patch |
75+
patch -fsup 1 -d %CONDA_PREFIX% ) || cmd /c "exit /b 0"
76+
77+
# Let the install prefer the static builds of the libs
78+
- set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
79+
- mkdir lib || cmd /c "exit /b 0"
80+
- copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
81+
- copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
82+
# These z.lib / png.lib are not static versions but files which end up as
83+
# dependencies to the dll file. This is fine for the conda build, but not here
84+
# and for the wheels
85+
- del %LIBRARY_LIB%\png.lib
86+
- del %LIBRARY_LIB%\z.lib
87+
- set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
88+
# enables the local freetype build
89+
- set MPLLOCALFREETYPE=1
90+
# Show the installed packages + versions
91+
- conda list
92+
93+
test_script:
94+
# Now build the thing..
95+
- pip install -ve .
96+
# these should show no z, png, or freetype dll...
97+
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
98+
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
99+
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
100+
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
101+
102+
# this are optional dependencies so that we don't skip so many tests...
103+
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
104+
# missing packages on conda-forge for avconv imagemagick
105+
# This install sometimes failed randomly :-(
106+
#- choco install imagemagick
107+
108+
# Test import of tkagg backend
109+
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
110+
# tests
111+
- echo The following args are passed to pytest %PYTEST_ARGS%
112+
- pytest %PYTEST_ARGS%
113+
114+
after_test:
115+
# After the tests were a success, build wheels with the static libs
116+
# Hide the output, the copied files really clutter the build log...
117+
- 'python setup.py bdist_wheel > NUL:'
118+
- dir dist\
119+
- echo finished...
120+
121+
artifacts:
122+
- path: dist\*
123+
name: packages
124+
125+
- path: result_images\*
126+
name: result_images
127+
type: zip
128+
129+
on_finish:
130+
- pip install codecov
131+
- codecov -e PYTHON_VERSION PLATFORM
132+
133+
on_failure:
134+
# Generate a html for visual tests
135+
- python tools/visualize_tests.py --no-browser
136+
- echo zipping images after a failure...
137+
- 7z a result_images.zip result_images\ | grep -v "Compressing"
138+
- appveyor PushArtifact result_images.zip
139+
140+
matrix:
141+
fast_finish: true

.circleci/config.yml

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# Circle CI configuration file
2+
# https://circleci.com/docs/
3+
4+
version: 2
5+
6+
7+
###########################################
8+
# Define some common steps as YAML anchors.
9+
#
10+
11+
apt-run: &apt-install
12+
name: Install apt packages
13+
command: |
14+
sudo apt-get -qq update
15+
sudo apt-get install -y \
16+
inkscape \
17+
libav-tools \
18+
dvipng \
19+
pgf \
20+
lmodern \
21+
cm-super \
22+
texlive-latex-base \
23+
texlive-latex-extra \
24+
texlive-fonts-recommended \
25+
texlive-latex-recommended \
26+
texlive-xetex \
27+
graphviz \
28+
libgeos-dev \
29+
otf-freefont
30+
31+
fonts-run: &fonts-install
32+
name: Install custom fonts
33+
# We manually install Humor-Sans using the package from Ubuntu 14.10.
34+
# Unfortunately humor sans is not available in the Ubuntu version used by
35+
# CircleCI but we can manually install the deb from a later version since
36+
# it is basically just a .ttf file.
37+
command: |
38+
mkdir -p ~/.local/share/fonts
39+
wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true
40+
if [ ! -f ~/.local/share/fonts/Humor-Sans.ttf ]; then
41+
wget https://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb
42+
mkdir tmp
43+
dpkg -x fonts-humor-sans_1.0-1_all.deb tmp
44+
cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.local/share/fonts
45+
rm -rf tmp
46+
else
47+
echo "Not downloading Humor-Sans; file already exists."
48+
fi
49+
fc-cache -f -v
50+
save_cache:
51+
key: fonts-1
52+
paths:
53+
- ~/.local/share/fonts/
54+
restore_cache:
55+
key: fonts-1
56+
57+
pip-run: &pip-install
58+
# Upgrade pip and setuptools and wheel to get as clean an install as possible
59+
name: Upgrade pip, setuptools, wheel
60+
command: |
61+
python -mpip install --upgrade --user pip
62+
python -mpip install --upgrade --user wheel
63+
python -mpip install --upgrade --user setuptools
64+
65+
deps-run: &deps-install
66+
name: Install Python dependencies
67+
command: |
68+
python -mpip install --user numpy${NUMPY_VERSION} codecov coverage
69+
python -mpip install --user -r requirements/doc/doc-requirements.txt
70+
71+
mpl-run: &mpl-install
72+
name: Install Matplotlib
73+
command: python -mpip install --user -ve .
74+
75+
doc-run: &doc-build
76+
name: Build documentation
77+
command: make html O=-T
78+
working_directory: doc
79+
80+
doc-bundle-run: &doc-bundle
81+
name: Bundle sphinx-gallery documentation artifacts
82+
command: tar cf doc/build/sphinx-gallery-files.tar.gz doc/api/_as_gen doc/gallery doc/tutorials
83+
when: always
84+
85+
86+
##########################################
87+
# Here is where the real jobs are defined.
88+
#
89+
90+
jobs:
91+
docs-python36:
92+
docker:
93+
- image: circleci/python:3.6
94+
steps:
95+
- checkout
96+
97+
- run: *apt-install
98+
- run: *fonts-install
99+
- run: *pip-install
100+
- run:
101+
<<: *deps-install
102+
environment:
103+
NUMPY_VERSION: "==1.11.0"
104+
- run: *mpl-install
105+
106+
- run: *doc-build
107+
108+
- run: *doc-bundle
109+
- store_artifacts:
110+
path: doc/build/sphinx-gallery-files.tar.gz
111+
112+
- store_artifacts:
113+
path: doc/build/html
114+
115+
- run:
116+
name: "Built documentation is available at:"
117+
command: echo "${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/doc/build/html/index.html"
118+
119+
docs-python37:
120+
docker:
121+
- image: circleci/python:3.7
122+
steps:
123+
- checkout
124+
125+
- run: *apt-install
126+
- run: *fonts-install
127+
- run: *pip-install
128+
129+
- run: *deps-install
130+
- run: *mpl-install
131+
132+
- run: *doc-build
133+
134+
- run: *doc-bundle
135+
- store_artifacts:
136+
path: doc/build/sphinx-gallery-files.tar.gz
137+
138+
- store_artifacts:
139+
path: doc/build/html
140+
141+
- run:
142+
name: "Built documentation is available at:"
143+
command: echo "${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/doc/build/html/index.html"
144+
145+
- add_ssh_keys:
146+
fingerprints:
147+
- "78:13:59:08:61:a9:e5:09:af:df:3a:d8:89:c2:84:c0"
148+
- deploy:
149+
name: "Deploy new docs"
150+
command: ./.circleci/deploy-docs.sh
151+
152+
#########################################
153+
# Defining workflows gets us parallelism.
154+
#
155+
156+
workflows:
157+
version: 2
158+
build:
159+
jobs:
160+
- docs-python36
161+
- docs-python37

.circleci/deploy-docs.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" -o "$CIRCLE_BRANCH" != "master" -o "$CIRCLE_PULL_REQUEST" != "" ]; then
6+
echo "Not uploading docs from non-master branch or non-Matplotlib org."
7+
exit
8+
fi
9+
10+
git clone [email protected]:matplotlib/devdocs.git
11+
12+
cd devdocs
13+
14+
git checkout --orphan gh-pages || true
15+
git reset --hard first_commit
16+
17+
git rm -rf .
18+
cp -R ../doc/build/html/. .
19+
touch .nojekyll
20+
21+
git config user.email "MatplotlibCircleBot@nomail"
22+
git config user.name "MatplotlibCircleBot"
23+
git config push.default simple
24+
25+
git add .
26+
git commit -m "Docs build of $CIRCLE_SHA1"
27+
28+
git push --set-upstream origin gh-pages --force

.coveragerc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = true
3+
source =
4+
matplotlib
5+
mpl_toolkits
6+
omit = matplotlib/_version.py
7+
8+
[report]
9+
exclude_lines =
10+
raise NotImplemented
11+
def __str__
12+
def __repr__
13+
if __name__ == .__main__.:

0 commit comments

Comments
 (0)