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

Skip to content

Commit ccaa573

Browse files
committed
correctly treat pan/zoom events of overlapping axes
0 parents  commit ccaa573

File tree

4,525 files changed

+831913
-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,525 files changed

+831913
-0
lines changed

.appveyor.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
skip_commits:
13+
message: /\[ci doc\]/
14+
files:
15+
- doc/
16+
- galleries/
17+
18+
clone_depth: 50
19+
20+
image: Visual Studio 2017
21+
22+
environment:
23+
24+
global:
25+
PYTHONFAULTHANDLER: 1
26+
PYTHONIOENCODING: UTF-8
27+
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
28+
--cov-report= --cov=lib --log-level=DEBUG
29+
30+
matrix:
31+
- PYTHON_VERSION: "3.9"
32+
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
33+
TEST_ALL: "no"
34+
- PYTHON_VERSION: "3.10"
35+
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
36+
TEST_ALL: "no"
37+
38+
# We always use a 64-bit machine, but can build x86 distributions
39+
# with the PYTHON_ARCH variable
40+
platform:
41+
- x64
42+
43+
# all our python builds have to happen in tests_script...
44+
build: false
45+
46+
cache:
47+
- '%LOCALAPPDATA%\pip\Cache'
48+
- '%USERPROFILE%\.cache\matplotlib'
49+
50+
init:
51+
- echo %PYTHON_VERSION% %CONDA_INSTALL_LOCN%
52+
53+
install:
54+
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
55+
- conda config --set always_yes true
56+
- conda config --set show_channel_urls yes
57+
- conda config --prepend channels conda-forge
58+
59+
# For building, use a new environment
60+
# Add python version to environment
61+
# `^ ` escapes spaces for indentation
62+
- echo ^ ^ - python=%PYTHON_VERSION% >> environment.yml
63+
- conda env create -f environment.yml
64+
- activate mpl-dev
65+
- conda install -c conda-forge pywin32
66+
- echo %PYTHON_VERSION% %TARGET_ARCH%
67+
# Show the installed packages + versions
68+
- conda list
69+
70+
test_script:
71+
# Now build the thing..
72+
- set LINK=/LIBPATH:%cd%\lib
73+
- pip install -v --no-build-isolation --config-settings=setup-args="--vsenv" --editable .[dev]
74+
# this should show no freetype dll...
75+
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
76+
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
77+
78+
# this are optional dependencies so that we don't skip so many tests...
79+
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex
80+
# missing packages on conda-forge for imagemagick
81+
# This install sometimes failed randomly :-(
82+
#- choco install imagemagick
83+
84+
# Test import of tkagg backend
85+
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
86+
# tests
87+
- echo The following args are passed to pytest %PYTEST_ARGS%
88+
- pytest %PYTEST_ARGS%
89+
90+
artifacts:
91+
- path: result_images\*
92+
name: result_images
93+
type: zip
94+
95+
on_finish:
96+
- conda install codecov
97+
- codecov -e PYTHON_VERSION PLATFORM
98+
99+
on_failure:
100+
# Generate a html for visual tests
101+
- python tools/visualize_tests.py --no-browser
102+
- echo zipping images after a failure...
103+
- 7z a result_images.zip result_images\ | grep -v "Compressing"
104+
- appveyor PushArtifact result_images.zip
105+
106+
matrix:
107+
fast_finish: true

.circleci/config.yml

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
# Circle CI configuration file
2+
# https://circleci.com/docs/
3+
4+
version: 2.1
5+
6+
7+
#######################################
8+
# Define some common steps as commands.
9+
#
10+
11+
commands:
12+
check-skip:
13+
steps:
14+
- run:
15+
name: Check-skip
16+
command: |
17+
export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
18+
echo "Got commit message:"
19+
echo "${git_log}"
20+
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$git_log" == *"[skip circle]"* ]] || [[ "$git_log" == *"[circle skip]"* ]]); then
21+
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
22+
circleci-agent step halt;
23+
fi
24+
25+
merge:
26+
steps:
27+
- run:
28+
name: Merge with upstream
29+
command: |
30+
if ! git remote -v | grep upstream; then
31+
git remote add upstream https://github.com/matplotlib/matplotlib.git
32+
fi
33+
git fetch upstream
34+
if [[ "$CIRCLE_BRANCH" != "main" ]] && \
35+
[[ "$CIRCLE_PR_NUMBER" != "" ]]; then
36+
echo "Merging ${CIRCLE_PR_NUMBER}"
37+
git pull --ff-only upstream "refs/pull/${CIRCLE_PR_NUMBER}/merge"
38+
fi
39+
40+
apt-install:
41+
steps:
42+
- run:
43+
name: Install apt packages
44+
command: |
45+
sudo apt-get -qq update
46+
sudo apt-get install -yy --no-install-recommends \
47+
cm-super \
48+
dvipng \
49+
ffmpeg \
50+
fonts-crosextra-carlito \
51+
fonts-freefont-otf \
52+
fonts-humor-sans \
53+
fonts-noto-cjk \
54+
fonts-wqy-zenhei \
55+
graphviz \
56+
inkscape \
57+
lmodern \
58+
ninja-build \
59+
optipng \
60+
texlive-fonts-recommended \
61+
texlive-latex-base \
62+
texlive-latex-extra \
63+
texlive-latex-recommended \
64+
texlive-pictures \
65+
texlive-xetex
66+
67+
fonts-install:
68+
steps:
69+
- restore_cache:
70+
key: fonts-2
71+
- run:
72+
name: Install custom fonts
73+
command: |
74+
mkdir -p ~/.local/share/fonts
75+
wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true
76+
fc-cache -f -v
77+
- save_cache:
78+
key: fonts-2
79+
paths:
80+
- ~/.local/share/fonts/
81+
82+
pip-install:
83+
description: Upgrade pip and setuptools and wheel to get as clean an install as possible
84+
steps:
85+
- run:
86+
name: Upgrade pip, setuptools, wheel
87+
command: |
88+
python -m pip install --upgrade --user pip
89+
python -m pip install --upgrade --user wheel
90+
python -m pip install --upgrade --user 'setuptools!=60.6.0'
91+
92+
doc-deps-install:
93+
parameters:
94+
numpy_version:
95+
type: string
96+
default: ""
97+
steps:
98+
- run:
99+
name: Install Python dependencies
100+
command: |
101+
python -m pip install --user meson-python pybind11
102+
python -m pip install --user \
103+
numpy<< parameters.numpy_version >> \
104+
-r requirements/doc/doc-requirements.txt
105+
python -m pip install --no-deps --user \
106+
git+https://github.com/matplotlib/mpl-sphinx-theme.git
107+
108+
mpl-install:
109+
steps:
110+
- run:
111+
name: Install Matplotlib
112+
command: |
113+
if [[ "$CIRCLE_BRANCH" == v*-doc ]]; then
114+
# The v*-doc branches must build against the specified release.
115+
version=${CIRCLE_BRANCH%-doc}
116+
version=${version#v}
117+
python -m pip install matplotlib==${version}
118+
else
119+
python -m pip install --user --verbose \
120+
--no-build-isolation --editable .[dev]
121+
fi
122+
- save_cache:
123+
key: build-deps-2
124+
paths:
125+
- subprojects/packagecache
126+
127+
doc-build:
128+
steps:
129+
- restore_cache:
130+
keys:
131+
- sphinx-env-v1-{{ .BuildNum }}-{{ .Environment.CIRCLE_JOB }}
132+
- sphinx-env-v1-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}-{{ .Environment.CIRCLE_JOB }}
133+
- run:
134+
name: Build documentation
135+
command: |
136+
# Set epoch to date of latest tag.
137+
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
138+
# Set release mode only when deploying to devdocs.
139+
if [ "$CIRCLE_PROJECT_USERNAME" = "matplotlib" ] && \
140+
[ "$CIRCLE_BRANCH" = "main" ] && \
141+
[ "$CIRCLE_PR_NUMBER" = "" ]; then
142+
export RELEASE_TAG='-t release'
143+
fi
144+
mkdir -p logs
145+
make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
146+
rm -r build/html/_sources
147+
working_directory: doc
148+
- save_cache:
149+
key: sphinx-env-v1-{{ .BuildNum }}-{{ .Environment.CIRCLE_JOB }}
150+
paths:
151+
- doc/build/doctrees
152+
153+
doc-show-errors-warnings:
154+
steps:
155+
- run:
156+
name: Extract possible build errors and warnings
157+
command: |
158+
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
159+
echo "No errors or warnings")
160+
# Save logs as an artifact, and convert from absolute paths to
161+
# repository-relative paths.
162+
sed "s~$PWD/~~" /tmp/sphinxerrorswarnings.log > \
163+
doc/logs/sphinx-errors-warnings.log
164+
when: always
165+
- store_artifacts:
166+
path: doc/logs/sphinx-errors-warnings.log
167+
168+
doc-show-deprecations:
169+
steps:
170+
- run:
171+
name: Extract possible deprecation warnings in examples and tutorials
172+
command: |
173+
(grep -rl DeprecationWarning doc/build/html/gallery ||
174+
echo "No deprecation warnings in gallery")
175+
(grep -rl DeprecationWarning doc/build/html/plot_types ||
176+
echo "No deprecation warnings in plot_types")
177+
(grep -rl DeprecationWarning doc/build/html/tutorials ||
178+
echo "No deprecation warnings in tutorials")
179+
# Save deprecations that are from this absolute directory, and
180+
# convert to repository-relative paths.
181+
(grep -Ero --no-filename "$PWD/.+DeprecationWarning.+$" \
182+
doc/build/html/{gallery,plot_types,tutorials} || echo) | \
183+
sed "s~$PWD/~~" > doc/logs/sphinx-deprecations.log
184+
when: always
185+
- store_artifacts:
186+
path: doc/logs/sphinx-deprecations.log
187+
188+
doc-bundle:
189+
steps:
190+
- run:
191+
name: Bundle sphinx-gallery documentation artifacts
192+
command: >
193+
tar cf doc/build/sphinx-gallery-files.tar.gz
194+
doc/api/_as_gen
195+
doc/gallery
196+
doc/plot_types
197+
doc/tutorials
198+
when: always
199+
- store_artifacts:
200+
path: doc/build/sphinx-gallery-files.tar.gz
201+
202+
203+
##########################################
204+
# Here is where the real jobs are defined.
205+
#
206+
207+
jobs:
208+
docs-python39:
209+
docker:
210+
- image: cimg/python:3.9
211+
resource_class: large
212+
steps:
213+
- checkout
214+
- check-skip
215+
- merge
216+
217+
- apt-install
218+
- fonts-install
219+
- pip-install
220+
221+
- doc-deps-install
222+
- mpl-install
223+
224+
- doc-build
225+
- doc-show-errors-warnings
226+
- doc-show-deprecations
227+
228+
- doc-bundle
229+
230+
- store_artifacts:
231+
path: doc/build/html
232+
- store_test_results:
233+
path: doc/build/test-results
234+
235+
- add_ssh_keys:
236+
fingerprints:
237+
- "be:c3:c1:d8:fb:a1:0e:37:71:72:d7:a3:40:13:8f:14"
238+
239+
- deploy:
240+
name: "Deploy new docs"
241+
command: ./.circleci/deploy-docs.sh
242+
243+
#########################################
244+
# Defining workflows gets us parallelism.
245+
#
246+
247+
workflows:
248+
version: 2
249+
build:
250+
jobs:
251+
# NOTE: If you rename this job, then you must update the `if` condition
252+
# and `circleci-jobs` option in `.github/workflows/circleci.yml`.
253+
- docs-python39

.circleci/deploy-docs.sh

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

0 commit comments

Comments
 (0)