Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0b93f55

Browse files
committed
Port requirements to PEP735
1 parent126515a commit0b93f55

16 files changed

+127
-140
lines changed

‎.github/workflows/cygwin.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
uses:actions/cache@5a3ec84eff668545956fd18022155c47e93e2684# v4.2.3
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,15 +174,13 @@ 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
179-
grep -v -F -e psutil requirements/testing/all.txt >requirements_test.txt
180-
python -m pip install meson-python pybind11
181179
export PATH="/usr/local/bin:$PATH"
182180
python -m pip install --no-build-isolation 'contourpy>=1.0.1'
183181
python -m pip install --upgrade cycler fonttools \
184182
packaging pyparsing python-dateutil setuptools-scm \
185-
-r requirements_test.txt sphinx ipython
183+
--group test sphinx ipython
186184
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
187185
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
188186
echo 'PyGObject is available' ||

‎.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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@e04ffabe3898a0af8d0fb1af00c188831c4b5893# v1.3.9

‎.github/workflows/tests.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ jobs:
5050
-name-suffix:"(Minimum Versions)"
5151
os:ubuntu-22.04
5252
python-version:'3.11'
53-
extra-requirements:'-c requirements/testing/minver.txt'
53+
extra-requirements:'--group test-minver'
5454
delete-font-cache:true
5555
-os:ubuntu-22.04
5656
python-version:'3.11'
5757
CFLAGS:"-fno-lto"# Ensure that disabling LTO works.
58-
extra-requirements:'-r requirements/testing/extra.txt'
58+
extra-requirements:'--group test-extra'
5959
-os:ubuntu-22.04-arm
6060
python-version:'3.12'
6161
-os:ubuntu-22.04
@@ -170,15 +170,15 @@ jobs:
170170
if:startsWith(runner.os, 'Linux')
171171
with:
172172
path:~/.cache/pip
173-
key:${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
173+
key:${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
174174
restore-keys:|
175175
${{ matrix.os }}-py${{ matrix.python-version }}-pip-
176176
-name:Cache pip
177177
uses:actions/cache@5a3ec84eff668545956fd18022155c47e93e2684# v4.2.3
178178
if:startsWith(runner.os, 'macOS')
179179
with:
180180
path:~/Library/Caches/pip
181-
key:${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
181+
key:${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
182182
restore-keys:|
183183
${{ matrix.os }}-py${{ matrix.python-version }}-pip-
184184
-name:Cache ccache
@@ -215,11 +215,7 @@ jobs:
215215
216216
# Install dependencies from PyPI.
217217
# Preinstall build requirements to enable no-build-isolation builds.
218-
python -m pip install --upgrade $PRE \
219-
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
220-
packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \
221-
'meson-python>=0.13.1' 'pybind11>=2.13.2' \
222-
-r requirements/testing/all.txt \
218+
python -m pip install --upgrade $PRE --group build --group test \
223219
${{ matrix.extra-requirements }}
224220
225221
# Install optional dependencies from PyPI.

‎azure-pipelines.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ stages:
7777
7878
-bash:|
7979
python -m pip install --upgrade pip
80-
python -m pip install --upgrade -r requirements/dev/build-requirements.txt
81-
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt
80+
python -m pip install --group build --group test --group test-extra
8281
displayName: 'Install dependencies with pip'
8382
8483
-bash:|

‎doc/devel/development_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ setup.
177177

178178
Install the Python dependencies with ::
179179

180-
pip install -r requirements/dev/dev-requirements.txt
180+
pip install --groupdev
181181

182182
Remember to activate the environment whenever you start working on Matplotlib!
183183

‎doc/devel/release_guide.rst

Lines 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 --groupdoc
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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -396,17 +396,11 @@ Documentation dependencies
396396
Python
397397
------
398398

399-
The additional Python packages required to build the
400-
:ref:`documentation<documenting-matplotlib>` are listed in
401-
:file:`doc-requirements.txt` and can be installed using ::
402-
403-
pip install -r requirements/doc/doc-requirements.txt
404-
405-
The content of:file:`doc-requirements.txt` is also shown below:
406-
407-
..include::../../requirements/doc/doc-requirements.txt
408-
:literal:
399+
The additional Python packages required to build the:ref:`documentation
400+
<documenting-matplotlib>` are listed in:file:`pyproject.toml` and can be
401+
installed using ::
409402

403+
pip install --group doc
410404

411405
.. _doc-dependencies-external:
412406

‎pyproject.toml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,114 @@ 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+
"ruff",
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; sys_platform != 'cygwin'",
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==9.0.1",
161+
"pyparsing==3.0.0",
162+
"pytest==7.0.0",
163+
"python-dateutil==2.7",
164+
# Test ipython/matplotlib-inline before backend mapping moved to mpl.
165+
# This should be tested for a reasonably long transition period,
166+
# but we will eventually remove the test when we no longer support
167+
# ipython/matplotlib-inline versions from before the transition.
168+
"ipython==7.29.0",
169+
"ipykernel==5.5.6",
170+
"matplotlib-inline<0.1.7",
171+
]
172+
173+
# Extra pip requirements for the GitHub Actions mypy build
174+
typing = [
175+
"mypy>=1.9",
176+
"typing-extensions>=4.6",
177+
# Extra stubs distributed separately from the main pypi package
178+
"pandas-stubs",
179+
"types-pillow",
180+
"types-python-dateutil",
181+
"types-psutil",
182+
"sphinx",
183+
{include-group ="build"},
184+
]
185+
78186
[tool.meson-python.args]
79187
install = ['--tags=data,python-runtime,runtime']
80188

‎requirements/dev/build-requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎requirements/dev/dev-requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎requirements/doc/doc-requirements.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎requirements/testing/all.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎requirements/testing/extra.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎requirements/testing/minver.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎requirements/testing/mypy.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎tox.ini

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp