Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f875002

Browse filesBrowse files
committed
Port requirements to PEP735
1 parent cc82d4f commit f875002
Copy full SHA for f875002

17 files changed

+132
-141
lines changed

‎.github/workflows/cygwin.yml

Copy file name to clipboardExpand all lines: .github/workflows/cygwin.yml
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
144144
with:
145145
path: C:\cygwin\home\runneradmin\.cache\pip
146-
key: Cygwin-py3.${{ matrix.python-minor-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
146+
key: Cygwin-py3.${{ matrix.python-minor-version }}-pip-${{ hashFiles('pyproject.toml') }}
147147
restore-keys: ${{ matrix.os }}-py3.${{ matrix.python-minor-version }}-pip-
148148

149149
- name: Cache ccache
@@ -174,10 +174,9 @@ jobs:
174174
- name: Install Python dependencies
175175
shell: bash.exe -eo pipefail -o igncr "{0}"
176176
run: |
177-
python -m pip install --upgrade pip setuptools wheel
177+
python -m pip install --group build
178178
python -m pip install kiwisolver 'numpy>=1.22,<1.26' pillow importlib_resources
179179
grep -v -F -e psutil requirements/testing/all.txt >requirements_test.txt
180-
python -m pip install meson-python pybind11
181180
export PATH="/usr/local/bin:$PATH"
182181
python -m pip install --no-build-isolation 'contourpy>=1.0.1'
183182
python -m pip install --upgrade cycler fonttools \

‎.github/workflows/reviewdog.yml

Copy file name to clipboardExpand all lines: .github/workflows/reviewdog.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version: '3.10'
2323

2424
- name: Install flake8
25-
run: pip3 install -r requirements/testing/flake8.txt
25+
run: pip3 install --group lint
2626

2727
- name: Set up reviewdog
2828
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.9
@@ -51,7 +51,7 @@ jobs:
5151
python-version: '3.10'
5252

5353
- name: Install mypy
54-
run: pip3 install -r requirements/testing/mypy.txt -r requirements/testing/all.txt
54+
run: pip3 install --group typing
5555

5656
- name: Set up reviewdog
5757
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.9

‎.github/workflows/tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tests.yml
+6-10Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name-suffix: "(Minimum Versions)"
5151
os: ubuntu-20.04
5252
python-version: '3.10'
53-
extra-requirements: '-c requirements/testing/minver.txt'
53+
extra-requirements: '--group test-minver'
5454
delete-font-cache: true
5555
# Oldest versions with Py3.10 wheels.
5656
pyqt5-ver: '==5.15.5 sip==6.3.0'
@@ -61,7 +61,7 @@ jobs:
6161
python-version: '3.10'
6262
# One CI run tests ipython/matplotlib-inline before backend mapping moved to mpl
6363
extra-requirements:
64-
-r requirements/testing/extra.txt
64+
--group test-extra
6565
"ipython==7.29.0"
6666
"ipykernel==5.5.6"
6767
"matplotlib-inline<0.1.7"
@@ -77,7 +77,7 @@ jobs:
7777
pyqt6-ver: '!=6.6.0'
7878
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
7979
pyside6-ver: '!=6.5.1'
80-
extra-requirements: '-r requirements/testing/extra.txt'
80+
extra-requirements: '--group test-extra'
8181
- os: ubuntu-22.04
8282
python-version: '3.12'
8383
# https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html
@@ -209,15 +209,15 @@ jobs:
209209
if: startsWith(runner.os, 'Linux')
210210
with:
211211
path: ~/.cache/pip
212-
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
212+
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
213213
restore-keys: |
214214
${{ matrix.os }}-py${{ matrix.python-version }}-pip-
215215
- name: Cache pip
216216
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
217217
if: startsWith(runner.os, 'macOS')
218218
with:
219219
path: ~/Library/Caches/pip
220-
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
220+
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
221221
restore-keys: |
222222
${{ matrix.os }}-py${{ matrix.python-version }}-pip-
223223
- name: Cache ccache
@@ -254,11 +254,7 @@ jobs:
254254
255255
# Install dependencies from PyPI.
256256
# Preinstall build requirements to enable no-build-isolation builds.
257-
python -m pip install --upgrade $PRE \
258-
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
259-
packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \
260-
'meson-python>=0.13.1' 'pybind11>=2.13.2' \
261-
-r requirements/testing/all.txt \
257+
python -m pip install --upgrade $PRE --group build --group test \
262258
${{ matrix.extra-requirements }}
263259
264260
# Install optional dependencies from PyPI.

‎azure-pipelines.yml

Copy file name to clipboardExpand all lines: azure-pipelines.yml
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ stages:
7171
7272
- bash: |
7373
python -m pip install --upgrade pip
74-
python -m pip install --upgrade -r requirements/dev/build-requirements.txt
75-
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt
74+
python -m pip install --group build --group test --group test-extra
7675
displayName: 'Install dependencies with pip'
7776
7877
- bash: |

‎doc/devel/development_setup.rst

Copy file name to clipboardExpand all lines: doc/devel/development_setup.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ setup.
137137

138138
Install the Python dependencies with ::
139139

140-
pip install -r requirements/dev/dev-requirements.txt
140+
pip install --group dev
141141

142142
Remember to activate the environment whenever you start working on Matplotlib!
143143

‎doc/devel/release_guide.rst

Copy file name to clipboardExpand all lines: doc/devel/release_guide.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ To build the documentation you must have the tagged version installed, but
420420
build the docs from the ``ver-doc`` branch. An easy way to arrange this is::
421421

422422
pip install matplotlib
423-
pip install -r requirements/doc/doc-requirements.txt
423+
pip install --group doc
424424
git checkout v3.7.0-doc
425425
git clean -xfd
426426
make -Cdoc O="-t release -j$(nproc)" html latexpdf LATEXMKOPTS="-silent -f"

‎doc/install/dependencies.rst

Copy file name to clipboardExpand all lines: doc/install/dependencies.rst
+4-10Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -390,17 +390,11 @@ Documentation dependencies
390390
Python
391391
------
392392

393-
The additional Python packages required to build the
394-
:ref:`documentation <documenting-matplotlib>` are listed in
395-
:file:`doc-requirements.txt` and can be installed using ::
396-
397-
pip install -r requirements/doc/doc-requirements.txt
398-
399-
The content of :file:`doc-requirements.txt` is also shown below:
400-
401-
.. include:: ../../requirements/doc/doc-requirements.txt
402-
:literal:
393+
The additional Python packages required to build the :ref:`documentation
394+
<documenting-matplotlib>` are listed in :file:`pyproject.toml` and can be
395+
installed using ::
403396

397+
pip install --group doc
404398

405399
.. _doc-dependencies-external:
406400

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
+112Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,118 @@ requires = [
7575
"setuptools_scm>=7",
7676
]
7777

78+
[dependency-groups]
79+
build = [
80+
"pybind11>=2.13.2,!=2.13.3",
81+
"meson-python",
82+
"setuptools-scm",
83+
]
84+
dev = [
85+
{include-group= "build"},
86+
{include-group = "doc"},
87+
{include-group = "test"},
88+
{include-group = "test-extra"},
89+
{include-group = "lint"},
90+
]
91+
# Requirements for building docs
92+
#
93+
# You will first need a matching Matplotlib installation
94+
# e.g (from the Matplotlib root directory)
95+
# pip install --no-build-isolation --editable .[dev]
96+
#
97+
# Install the documentation requirements with:
98+
# pip install -r requirements/doc/doc-requirements.txt
99+
#
100+
doc = [
101+
"sphinx>=5.1.0,!=6.1.2",
102+
"colorspacious",
103+
"ipython",
104+
"ipywidgets",
105+
"ipykernel",
106+
"numpydoc>=1.0",
107+
"packaging>=20",
108+
"pydata-sphinx-theme~=0.15.0",
109+
"mpl-sphinx-theme~=3.9.0",
110+
"pyyaml",
111+
"PyStemmer",
112+
"sphinxcontrib-svg2pdfconverter>=1.1.0",
113+
"sphinxcontrib-video>=0.2.1",
114+
"sphinx-copybutton",
115+
"sphinx-design",
116+
"sphinx-gallery[parallel]>=0.12.0",
117+
"sphinx-tags>=0.4.0",
118+
]
119+
120+
# pip requirements for all the CI builds
121+
test = [
122+
"black<24",
123+
"certifi",
124+
"coverage!=6.3",
125+
"psutil",
126+
"pytest!=4.6.0,!=5.4.0,!=8.1.0",
127+
"pytest-cov",
128+
"pytest-rerunfailures",
129+
"pytest-timeout",
130+
"pytest-xdist",
131+
"pytest-xvfb",
132+
"tornado",
133+
]
134+
135+
# Extra pip requirements for the Python 3.10+ builds
136+
test-extra = [
137+
"--prefer-binary",
138+
"ipykernel",
139+
# jupyter/nbconvert#1970 for the 7.3 series exclusions
140+
"nbconvert[execute]!=6.0.0,!=6.0.1,!=7.3.0,!=7.3.1",
141+
"nbformat!=5.0.0,!=5.0.1",
142+
"pandas!=0.25.0",
143+
"pikepdf",
144+
"pytz",
145+
"pywin32; sys.platform == 'win32'",
146+
"xarray",
147+
]
148+
149+
# Extra pip requirements for the minimum-version CI run
150+
test-minver = [
151+
"contourpy==1.0.1",
152+
"cycler==0.10",
153+
"fonttools==4.22.0",
154+
"importlib-resources==3.2.0",
155+
"kiwisolver==1.3.2",
156+
"meson-python==0.13.1",
157+
"meson==1.1.0",
158+
"numpy==1.23.0",
159+
"packaging==20.0",
160+
"pillow==8.3.2",
161+
"pyparsing==2.3.1",
162+
"pytest==7.0.0",
163+
"python-dateutil==2.7",
164+
]
165+
166+
# Extra pip requirements for the GitHub Actions flake8 build
167+
lint = [
168+
"flake8>=3.8",
169+
# versions less than 5.1.0 raise on some interp'd docstrings
170+
"pydocstyle>=5.1.0",
171+
# 1.4.0 adds docstring-convention=all
172+
"flake8-docstrings>=1.4.0",
173+
# fix bug where flake8 aborts checking on syntax error
174+
"flake8-force",
175+
]
176+
177+
# Extra pip requirements for the GitHub Actions mypy build
178+
typing = [
179+
"mypy>=1.9",
180+
"typing-extensions>=4.6",
181+
# Extra stubs distributed separately from the main pypi package
182+
"pandas-stubs",
183+
"types-pillow",
184+
"types-python-dateutil",
185+
"types-psutil",
186+
"sphinx",
187+
{include-group = "build"},
188+
]
189+
78190
[tool.meson-python.args]
79191
install = ['--tags=data,python-runtime,runtime']
80192

‎requirements/dev/build-requirements.txt

Copy file name to clipboardExpand all lines: requirements/dev/build-requirements.txt
-3Lines changed: 0 additions & 3 deletions
This file was deleted.

‎requirements/dev/dev-requirements.txt

Copy file name to clipboardExpand all lines: requirements/dev/dev-requirements.txt
-5Lines changed: 0 additions & 5 deletions
This file was deleted.

‎requirements/doc/doc-requirements.txt

Copy file name to clipboardExpand all lines: requirements/doc/doc-requirements.txt
-26Lines changed: 0 additions & 26 deletions
This file was deleted.

‎requirements/testing/all.txt

Copy file name to clipboardExpand all lines: requirements/testing/all.txt
-13Lines changed: 0 additions & 13 deletions
This file was deleted.

‎requirements/testing/extra.txt

Copy file name to clipboardExpand all lines: requirements/testing/extra.txt
-12Lines changed: 0 additions & 12 deletions
This file was deleted.

‎requirements/testing/flake8.txt

Copy file name to clipboardExpand all lines: requirements/testing/flake8.txt
-9Lines changed: 0 additions & 9 deletions
This file was deleted.

‎requirements/testing/minver.txt

Copy file name to clipboardExpand all lines: requirements/testing/minver.txt
-15Lines changed: 0 additions & 15 deletions
This file was deleted.

‎requirements/testing/mypy.txt

Copy file name to clipboardExpand all lines: requirements/testing/mypy.txt
-26Lines changed: 0 additions & 26 deletions
This file was deleted.

‎tox.ini

Copy file name to clipboardExpand all lines: tox.ini
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ changedir = {tox_root}
3333
commands =
3434
python tools/stubtest.py
3535
usedevelop = False
36-
deps =
37-
-r requirements/testing/mypy.txt
38-
-r requirements/testing/all.txt
36+
dependency_groups =
37+
test
38+
typing

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.