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

Skip to content

Commit e87d7b6

Browse files
authored
Merge branch 'matplotlib:main' into multivariate-norm
2 parents ffaa6b4 + 7025fb9 commit e87d7b6

19 files changed

Lines changed: 300 additions & 285 deletions

File tree

.appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ cache:
4545

4646
init:
4747
- ps:
48-
# Pinned due to https://github.com/mamba-org/mamba/issues/3467
4948
Invoke-Webrequest
50-
-URI https://github.com/mamba-org/micromamba-releases/releases/download/1.5.10-0/micromamba-win-64.tar.bz2
49+
-URI https://micro.mamba.pm/api/micromamba/win-64/latest
5150
-OutFile C:\projects\micromamba.tar.bz2
5251
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar.bz2 -aoa -oC:\projects\
5352
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar -ttar -aoa -oC:\projects\
5453
- 'set PATH=C:\projects\Library\bin;%PATH%'
5554
- micromamba shell init --shell cmd.exe
5655
- micromamba config set always_yes true
5756
- micromamba config prepend channels conda-forge
57+
- micromamba info
5858

5959
install:
6060
- micromamba env create -f environment.yml python=%PYTHON_VERSION% pywin32
@@ -91,7 +91,7 @@ artifacts:
9191

9292
on_finish:
9393
- micromamba install codecov
94-
- codecov -e PYTHON_VERSION PLATFORM -n "$PYTHON_VERSION Windows"
94+
- codecov -e PYTHON_VERSION PLATFORM -n "%PYTHON_VERSION% Windows"
9595

9696
on_failure:
9797
# Generate a html for visual tests

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ body:
1515
attributes:
1616
label: Code for reproduction
1717
description: >-
18-
If possible, please provide a minimum self-contained example.
18+
If possible, please provide a minimum self-contained example. If you
19+
have used generative AI as an aid see
20+
https://dev.matplotlib.org/devel/contributing.html#generative_ai.
1921
placeholder: Paste your code here. This field is automatically formatted as Python code.
2022
render: Python
2123
validations:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ out the development guide https://matplotlib.org/devdocs/devel/index.html
1313
Additionally, please summarize the changes in the title, for example "Raise ValueError on
1414
non-numeric input to set_xlim" and avoid non-descriptive titles such as "Addresses
1515
issue #8576".
16+
17+
If possible, please provide a minimum self-contained example. If you have used
18+
generative AI as an aid in preparing this PR, see
19+
https://dev.matplotlib.org/devel/contributing.html#generative_ai.
20+
1621
-->
1722

1823

.github/workflows/tests.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ jobs:
123123
allow-prereleases: true
124124

125125
- name: Set up Python ${{ matrix.python-version }}
126-
uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
126+
uses: Quansight-Labs/setup-python@b9ab292c751a42bcd2bb465b7fa202ea2c3f5796 # v5.3.1
127127
if: matrix.python-version == '3.13t'
128128
with:
129-
python-version: '3.13'
130-
nogil: true
129+
python-version: ${{ matrix.python-version }}
130+
allow-prereleases: true
131131

132132
- name: Install OS dependencies
133133
run: |
@@ -139,7 +139,6 @@ jobs:
139139
ccache \
140140
cm-super \
141141
dvipng \
142-
ffmpeg \
143142
fonts-freefont-otf \
144143
fonts-noto-cjk \
145144
fonts-wqy-zenhei \
@@ -174,10 +173,8 @@ jobs:
174173
texlive-luatex \
175174
texlive-pictures \
176175
texlive-xetex
177-
if [[ "${{ matrix.python-version }}" = '3.13t' ]]; then
178-
# TODO: Remove this once setup-python supports nogil distributions.
179-
sudo apt-get install -yy --no-install-recommends \
180-
python3.13-tk-nogil
176+
if [[ "${{ matrix.name-suffix }}" != '(Minimum Versions)' ]]; then
177+
sudo apt-get install -yy --no-install-recommends ffmpeg poppler-utils
181178
fi
182179
if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then
183180
sudo apt-get install -yy --no-install-recommends libopengl0
@@ -201,8 +198,8 @@ jobs:
201198
done
202199
# Workaround for https://github.com/actions/runner-images/issues/10984
203200
brew uninstall --ignore-dependencies --force [email protected]
204-
brew install ccache ghostscript gobject-introspection gtk4 ninja
205-
brew install --cask font-noto-sans-cjk inkscape
201+
brew install ccache ffmpeg ghostscript gobject-introspection gtk4 imagemagick ninja
202+
brew install --cask font-noto-sans-cjk font-noto-sans-cjk-sc inkscape
206203
;;
207204
esac
208205
@@ -242,15 +239,6 @@ jobs:
242239
4-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
243240
4-${{ runner.os }}-py${{ matrix.python-version }}-mpl-
244241
245-
- name: Install the nightly dependencies
246-
if: matrix.python-version == '3.13t'
247-
run: |
248-
python -m pip install pytz tzdata python-dateutil # Must be installed for Pandas.
249-
python -m pip install \
250-
--pre \
251-
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
252-
--upgrade --only-binary=:all: numpy pandas pillow contourpy
253-
254242
- name: Install Python dependencies
255243
run: |
256244
# Upgrade pip and setuptools and wheel to get as clean an install as

azure-pipelines.yml

Lines changed: 60 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ stages:
4949
- job: Pytest
5050
strategy:
5151
matrix:
52-
Linux_py310:
53-
vmImage: 'ubuntu-20.04' # keep one job pinned to the oldest image
54-
python.version: '3.10'
55-
Linux_py311:
56-
vmImage: 'ubuntu-latest'
57-
python.version: '3.11'
58-
macOS_py310:
59-
vmImage: 'macOS-latest'
60-
python.version: '3.10'
61-
macOS_py311:
62-
vmImage: 'macOS-latest'
63-
python.version: '3.11'
6452
Windows_py310:
6553
vmImage: 'windows-2019' # keep one job pinned to the oldest image
6654
python.version: '3.10'
@@ -78,63 +66,7 @@ stages:
7866
displayName: 'Use Python $(python.version)'
7967

8068
- bash: |
81-
set -e
82-
case "$AGENT_OS" in
83-
Linux)
84-
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
85-
sudo apt update
86-
sudo apt install --no-install-recommends \
87-
cm-super \
88-
dvipng \
89-
ffmpeg \
90-
fonts-freefont-otf \
91-
fonts-noto-cjk \
92-
fonts-wqy-zenhei \
93-
gdb \
94-
gir1.2-gtk-3.0 \
95-
graphviz \
96-
inkscape \
97-
language-pack-de \
98-
lcov \
99-
libcairo2 \
100-
libgirepository-1.0-1 \
101-
lmodern \
102-
ninja-build \
103-
poppler-utils \
104-
texlive-fonts-recommended \
105-
texlive-latex-base \
106-
texlive-latex-extra \
107-
texlive-latex-recommended \
108-
texlive-luatex \
109-
texlive-pictures \
110-
texlive-xetex
111-
;;
112-
Darwin)
113-
brew update
114-
# Periodically, Homebrew updates Python and fails to overwrite the
115-
# existing not-managed-by-Homebrew copy without explicitly being told
116-
# to do so. GitHub/Azure continues to avoid fixing their runner images:
117-
# https://github.com/actions/runner-images/issues/9966
118-
# so force an overwrite even if there are no Python updates.
119-
# We don't even care about Homebrew's Python because we use the one
120-
# from UsePythonVersion.
121-
for python_package in $(brew list | grep python@); do
122-
brew unlink ${python_package}
123-
brew link --overwrite ${python_package}
124-
done
125-
# Workaround for https://github.com/actions/runner-images/issues/10984
126-
brew uninstall --ignore-dependencies --force [email protected]
127-
brew install --cask xquartz
128-
brew install ccache ffmpeg imagemagick mplayer ninja pkg-config
129-
brew install --cask font-noto-sans-cjk-sc
130-
;;
131-
Windows_NT)
132-
choco install ninja
133-
;;
134-
*)
135-
exit 1
136-
;;
137-
esac
69+
choco install ninja
13870
displayName: 'Install dependencies'
13971
14072
- bash: |
@@ -144,23 +76,9 @@ stages:
14476
displayName: 'Install dependencies with pip'
14577
14678
- bash: |
147-
case "$AGENT_OS" in
148-
Linux)
149-
export CPPFLAGS='--coverage -fprofile-abs-path'
150-
;;
151-
Darwin)
152-
export CPPFLAGS='-fprofile-instr-generate=default.%m.profraw'
153-
export CPPFLAGS="$CPPFLAGS -fcoverage-mapping"
154-
;;
155-
Windows_NT)
156-
CONFIG='--config-settings=setup-args=--vsenv'
157-
CONFIG="$CONFIG --config-settings=setup-args=-Dcpp_link_args=-PROFILE"
158-
CONFIG="$CONFIG --config-settings=setup-args=-Dbuildtype=debug"
159-
;;
160-
*)
161-
exit 1
162-
;;
163-
esac
79+
CONFIG='--config-settings=setup-args=--vsenv'
80+
CONFIG="$CONFIG --config-settings=setup-args=-Dcpp_link_args=-PROFILE"
81+
CONFIG="$CONFIG --config-settings=setup-args=-Dbuildtype=debug"
16482
16583
python -m pip install \
16684
--no-build-isolation $CONFIG \
@@ -175,39 +93,38 @@ stages:
17593

17694
- bash: |
17795
set -e
178-
if [[ "$AGENT_OS" == 'Windows_NT' ]]; then
179-
SESSION_ID=$(python -c "import uuid; print(uuid.uuid4(), end='')")
180-
echo "Coverage session ID: ${SESSION_ID}"
181-
VS=$(ls -d /c/Program\ Files*/Microsoft\ Visual\ Studio/*/Enterprise)
182-
echo "Visual Studio: ${VS}"
183-
DIR="$VS/Common7/IDE/Extensions/Microsoft/CodeCoverage.Console"
184-
if [[ -d $DIR ]]; then
185-
# This is for MSVC 2022 (on windows-latest).
186-
TOOL="$DIR/Microsoft.CodeCoverage.Console.exe"
187-
for f in build/cp*/src/*.pyd; do
188-
echo $f
189-
echo "=============================="
190-
"$TOOL" instrument $f --session-id $SESSION_ID \
191-
--log-level Verbose --log-file instrument.log
192-
cat instrument.log
193-
rm instrument.log
194-
done
195-
echo "Starting $TOOL in server mode"
196-
"$TOOL" collect \
197-
--session-id $SESSION_ID --server-mode \
198-
--output-format cobertura --output extensions.xml \
199-
--log-level Verbose --log-file extensions.log &
200-
VS_VER=2022
201-
else
202-
DIR="$VS"/Team\ Tools/Dynamic\ Code\ Coverage\ Tools/amd64
203-
if [[ -d $DIR ]]; then
204-
# This is for MSVC 2019 (on windows-2019).
205-
VSINSTR="$VS"/Team\ Tools/Performance\ Tools/vsinstr.exe
206-
for f in build/cp*/src/*.pyd; do
207-
"$VSINSTR" $f -Verbose -Coverage
208-
done
209-
TOOL="$DIR/CodeCoverage.exe"
210-
cat > extensions.config << EOF
96+
SESSION_ID=$(python -c "import uuid; print(uuid.uuid4(), end='')")
97+
echo "Coverage session ID: ${SESSION_ID}"
98+
VS=$(ls -d /c/Program\ Files*/Microsoft\ Visual\ Studio/*/Enterprise)
99+
echo "Visual Studio: ${VS}"
100+
DIR="$VS/Common7/IDE/Extensions/Microsoft/CodeCoverage.Console"
101+
if [[ -d $DIR ]]; then
102+
# This is for MSVC 2022 (on windows-latest).
103+
TOOL="$DIR/Microsoft.CodeCoverage.Console.exe"
104+
for f in build/cp*/src/*.pyd; do
105+
echo $f
106+
echo "=============================="
107+
"$TOOL" instrument $f --session-id $SESSION_ID \
108+
--log-level Verbose --log-file instrument.log
109+
cat instrument.log
110+
rm instrument.log
111+
done
112+
echo "Starting $TOOL in server mode"
113+
"$TOOL" collect \
114+
--session-id $SESSION_ID --server-mode \
115+
--output-format cobertura --output extensions.xml \
116+
--log-level Verbose --log-file extensions.log &
117+
VS_VER=2022
118+
else
119+
DIR="$VS"/Team\ Tools/Dynamic\ Code\ Coverage\ Tools/amd64
120+
if [[ -d $DIR ]]; then
121+
# This is for MSVC 2019 (on windows-2019).
122+
VSINSTR="$VS"/Team\ Tools/Performance\ Tools/vsinstr.exe
123+
for f in build/cp*/src/*.pyd; do
124+
"$VSINSTR" $f -Verbose -Coverage
125+
done
126+
TOOL="$DIR/CodeCoverage.exe"
127+
cat > extensions.config << EOF
211128
<CodeCoverage>
212129
<CollectFromChildProcesses>true</CollectFromChildProcesses>
213130
<ModulePaths>
@@ -217,60 +134,38 @@ stages:
217134
</ModulePaths>
218135
</CodeCoverage>
219136
EOF
220-
echo "Starting $TOOL in server mode"
221-
"$TOOL" collect \
222-
-config:extensions.config -session:$SESSION_ID \
223-
-output:extensions.coverage -verbose &
224-
echo "Started $TOOL"
225-
VS_VER=2019
226-
fi
227-
fi
228-
echo "##vso[task.setvariable variable=VS_COVERAGE_TOOL]$TOOL"
137+
echo "Starting $TOOL in server mode"
138+
"$TOOL" collect \
139+
-config:extensions.config -session:$SESSION_ID \
140+
-output:extensions.coverage -verbose &
141+
echo "Started $TOOL"
142+
VS_VER=2019
143+
fi
229144
fi
145+
echo "##vso[task.setvariable variable=VS_COVERAGE_TOOL]$TOOL"
146+
230147
PYTHONFAULTHANDLER=1 pytest -rfEsXR -n 2 \
231148
--maxfail=50 --timeout=300 --durations=25 \
232149
--junitxml=junit/test-results.xml --cov-report=xml --cov=lib
233-
if [[ -n $SESSION_ID ]]; then
234-
if [[ $VS_VER == 2022 ]]; then
235-
"$TOOL" shutdown $SESSION_ID
236-
echo "Coverage collection log"
237-
echo "======================="
238-
cat extensions.log
239-
else
240-
"$TOOL" shutdown -session:$SESSION_ID
241-
fi
150+
151+
if [[ $VS_VER == 2022 ]]; then
152+
"$TOOL" shutdown $SESSION_ID
153+
echo "Coverage collection log"
154+
echo "======================="
155+
cat extensions.log
156+
else
157+
"$TOOL" shutdown -session:$SESSION_ID
242158
fi
243159
displayName: 'pytest'
244160
245161
- bash: |
246-
case "$AGENT_OS" in
247-
Linux)
248-
lcov --rc lcov_branch_coverage=1 --capture --directory . \
249-
--output-file coverage.info
250-
lcov --rc lcov_branch_coverage=1 --output-file coverage.info \
251-
--extract coverage.info $PWD/src/'*' $PWD/lib/'*'
252-
lcov --rc lcov_branch_coverage=1 --list coverage.info
253-
find . -name '*.gc*' -delete
254-
;;
255-
Darwin)
256-
xcrun llvm-profdata merge -sparse default.*.profraw \
257-
-o default.profdata
258-
xcrun llvm-cov export -format="lcov" build/*/src/*.so \
259-
-instr-profile default.profdata > info.lcov
260-
;;
261-
Windows_NT)
262-
if [[ -f extensions.coverage ]]; then
263-
# For MSVC 2019.
264-
"$VS_COVERAGE_TOOL" analyze -output:extensions.xml \
265-
-include_skipped_functions -include_skipped_modules \
266-
extensions.coverage
267-
rm extensions.coverage
268-
fi
269-
;;
270-
*)
271-
exit 1
272-
;;
273-
esac
162+
if [[ -f extensions.coverage ]]; then
163+
# For MSVC 2019.
164+
"$VS_COVERAGE_TOOL" analyze -output:extensions.xml \
165+
-include_skipped_functions -include_skipped_modules \
166+
extensions.coverage
167+
rm extensions.coverage
168+
fi
274169
displayName: 'Filter C coverage'
275170
condition: succeededOrFailed()
276171
- bash: |

0 commit comments

Comments
 (0)