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

Skip to content

Commit b356530

Browse files
author
shawnchen
committed
Merge branch 'colorbarGridPosition' of https://github.com/ShawnChen1996/matplotlib into colorbarGridPosition
2 parents a4e32ee + 7bf9180 commit b356530

327 files changed

Lines changed: 9362 additions & 8446 deletions

File tree

Some content is hidden

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

.circleci/config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@ commands:
8787
command: |
8888
# Set epoch to date of latest tag.
8989
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
90-
make html O=-T
90+
# Include analytics only when deploying to devdocs.
91+
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
92+
[ "$CIRCLE_BRANCH" != "master" ] || \
93+
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
94+
export ANALYTICS=False
95+
else
96+
export ANALYTICS=True
97+
fi
98+
make html O="-T -Ainclude_analytics=$ANALYTICS"
9199
rm -r build/html/_sources
92100
working_directory: doc
93101
- save_cache:

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ omit = matplotlib/_version.py
77

88
[report]
99
exclude_lines =
10+
pragma: no cover
1011
raise NotImplemented
1112
def __str__
1213
def __repr__

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ per-file-ignores =
5050

5151
lib/matplotlib/__init__.py: F401
5252
lib/matplotlib/_cm.py: E202, E203, E302
53+
lib/matplotlib/_mathtext.py: E221, E251
5354
lib/matplotlib/_mathtext_data.py: E203, E261
5455
lib/matplotlib/animation.py: F401
5556
lib/matplotlib/axes/__init__.py: F401, F403
@@ -162,6 +163,7 @@ per-file-ignores =
162163
examples/lines_bars_and_markers/fill.py: E402
163164
examples/lines_bars_and_markers/fill_between_demo.py: E402
164165
examples/lines_bars_and_markers/filled_step.py: E402
166+
examples/lines_bars_and_markers/stairs_demo.py: E402
165167
examples/lines_bars_and_markers/horizontal_barchart_distribution.py: E402
166168
examples/lines_bars_and_markers/joinstyle.py: E402
167169
examples/lines_bars_and_markers/scatter_hist.py: E402
@@ -249,6 +251,7 @@ per-file-ignores =
249251
examples/subplots_axes_and_figures/custom_figure_class.py: E402
250252
examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
251253
examples/subplots_axes_and_figures/demo_tight_layout.py: E402
254+
examples/subplots_axes_and_figures/figure_size_units.py: E402
252255
examples/subplots_axes_and_figures/secondary_axis.py: E402
253256
examples/subplots_axes_and_figures/two_scales.py: E402
254257
examples/subplots_axes_and_figures/zoom_inset_axes.py: E402

.github/CODE_OF_CONDUCT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Matplotlib follows the Python Software Foundation Code of Conduct in everything we do,
2+
see https://www.python.org/psf/conduct/.
3+
4+
Report violations to [email protected], which is checked by Hannah Aizenman (@story645) and Thomas Caswell (@tacaswell).
5+
6+
You can also use the NumFocus Code of Conduct [Reporting Form](https://numfocus.typeform.com/to/ynjGdT).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
## PR Checklist
44

5-
- [ ] Has Pytest style unit tests
6-
- [ ] Code is [Flake 8](http://flake8.pycqa.org/en/latest/) compliant
7-
- [ ] New features are documented, with examples if plot related
8-
- [ ] Documentation is sphinx and numpydoc compliant
9-
- [ ] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
10-
- [ ] Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way
5+
<!-- Please mark any checkboxes that do not apply to this PR as [N/A]. -->
6+
7+
- [ ] Has pytest style unit tests (and `pytest` passes).
8+
- [ ] Is [Flake 8](https://flake8.pycqa.org/en/latest/) compliant (run `flake8` on changed files to check).
9+
- [ ] New features are documented, with examples if plot related.
10+
- [ ] Documentation is sphinx and numpydoc compliant (the docs should [build](https://matplotlib.org/devel/documenting_mpl.html#building-the-docs) without error).
11+
- [ ] Conforms to Matplotlib style conventions (install `flake8-docstrings` and `pydocstyle<4` and run `flake8 --docstring-convention=all`).
12+
- [ ] New features have an entry in `doc/users/next_whats_new/` (follow instructions in README.rst there).
13+
- [ ] API changes documented in `doc/api/next_api_changes/` (follow instructions in README.rst there).
1114

1215
<!--
1316
Thank you so much for your PR! To help us review your contribution, please

.github/workflows/cibuildwheel.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
run: |
3131
python -m pip install cibuildwheel==1.5.5
3232
33+
- name: Copy setup.cfg to configure wheel
34+
run: |
35+
cp setup.cfg.template setup.cfg
36+
3337
- name: Build wheels for CPython
3438
run: |
3539
python -m cibuildwheel --output-dir dist
@@ -65,6 +69,10 @@ jobs:
6569
startsWith(github.ref, 'refs/heads/v3.3') ||
6670
startsWith(github.ref, 'refs/tags/v3.3') )
6771
72+
- name: Validate that LICENSE files are included in wheels
73+
run: |
74+
python ./ci/check_wheel_licenses.py
75+
6876
- uses: actions/upload-artifact@v2
6977
with:
7078
name: wheels

.travis.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,28 @@ install:
133133
# install was successful by trying to import the toolkit (sometimes, the
134134
# install appears to be successful but shared libraries cannot be loaded at
135135
# runtime, so an actual import is a better check).
136-
python -mpip install --upgrade pycairo cairocffi>=0.8
137-
python -mpip install --upgrade PyGObject &&
138-
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
139-
echo 'PyGObject is available' ||
140-
echo 'PyGObject is not available'
141-
python -mpip install --upgrade pyqt5 &&
142-
python -c 'import PyQt5.QtCore' &&
143-
echo 'PyQt5 is available' ||
144-
echo 'PyQt5 is not available'
145-
python -mpip install --upgrade pyside2 &&
146-
python -c 'import PySide2.QtCore' &&
147-
echo 'PySide2 is available' ||
148-
echo 'PySide2 is not available'
136+
137+
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12
138+
139+
# There are not functioning wheels available for OSX 10.12 (as of
140+
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+)
141+
# or pyside2 (the latest version (5.13.2) with 10.12 wheels has a
142+
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
143+
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
144+
python -mpip install --upgrade pycairo cairocffi>=0.8
145+
python -mpip install --upgrade PyGObject &&
146+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
147+
echo 'PyGObject is available' ||
148+
echo 'PyGObject is not available'
149+
python -mpip install --upgrade pyqt5 &&
150+
python -c 'import PyQt5.QtCore' &&
151+
echo 'PyQt5 is available' ||
152+
echo 'PyQt5 is not available'
153+
python -mpip install --upgrade pyside2 &&
154+
python -c 'import PySide2.QtCore' &&
155+
echo 'PySide2 is available' ||
156+
echo 'PySide2 is not available'
157+
fi
149158
python -mpip install --upgrade \
150159
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
151160
wxPython &&

ci/check_wheel_licenses.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env python3
2+
3+
"""
4+
Check that all .whl files in the dist folder have the correct LICENSE files
5+
included.
6+
7+
To run:
8+
$ cp setup.cfg.template setup.cfg
9+
$ python3 setup.py bdist_wheel
10+
$ ./ci/check_wheel_licenses.py
11+
"""
12+
13+
from pathlib import Path
14+
import sys
15+
import zipfile
16+
17+
EXIT_SUCCESS = 0
18+
EXIT_FAILURE = 1
19+
20+
project_dir = Path(__file__).parent.resolve().parent
21+
dist_dir = project_dir / 'dist'
22+
license_dir = project_dir / 'LICENSE'
23+
24+
license_file_names = [path.name for path in sorted(license_dir.glob('*'))]
25+
for wheel in dist_dir.glob('*.whl'):
26+
print(f'Checking LICENSE files in: {wheel}')
27+
with zipfile.ZipFile(wheel) as f:
28+
wheel_license_file_names = [Path(path).name
29+
for path in sorted(f.namelist())
30+
if '.dist-info/LICENSE' in path]
31+
if wheel_license_file_names != license_file_names:
32+
print(f'LICENSE file(s) missing:\n'
33+
f'{wheel_license_file_names} !=\n'
34+
f'{license_file_names}')
35+
sys.exit(EXIT_FAILURE)
36+
sys.exit(EXIT_SUCCESS)

0 commit comments

Comments
 (0)