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

Commit d7d1bba

Browse files
DOC: clarify no-build-isolation & mypy ignoring new functions (matplotlib#28282)
1 parent 7ee56ce commit d7d1bba

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

‎doc/conf.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ def _check_dependencies():
236236
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
237237
'tornado': ('https://www.tornadoweb.org/en/stable/', None),
238238
'xarray': ('https://docs.xarray.dev/en/stable/', None),
239-
'meson-python': ('https://meson-python.readthedocs.io/en/stable/', None)
239+
'meson-python': ('https://meson-python.readthedocs.io/en/stable/', None),
240+
'pip': ('https://pip.pypa.io/en/stable/', None),
240241
}
241242

242243

‎doc/devel/coding_guide.rst‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ We generally use `stub files
8989
the type information for ``colors.py``. A notable exception is ``pyplot.py``,
9090
which is type hinted inline.
9191

92-
Type hints are checked by the mypy :ref:`pre-commit hook <pre-commit-hooks>`,
93-
can often be verified by running ``tox -e stubtest``.
92+
Type hints can be validated by the `stubtest
93+
<https://mypy.readthedocs.io/en/stable/stubtest.html>`_ tool, which can be run
94+
locally using ``tox -e stubtest`` and is a part of the :ref:`automated-tests`
95+
suite. Type hints for existing functions are also checked by the mypy
96+
:ref:`pre-commit hook <pre-commit-hooks>`.
97+
9498

9599
New modules and files: installation
96100
===================================

‎doc/devel/development_setup.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,9 @@ listed in ``.pre-commit-config.yaml``, against the full codebase with ::
254254
To run a particular hook manually, run ``pre-commit run`` with the hook id ::
255255

256256
pre-commit run <hook id> --all-files
257+
258+
259+
Please note that the ``mypy`` pre-commit hook cannot check the :ref:`type-hints`
260+
for new functions; instead the stubs for new functions are checked using the
261+
``stubtest`` :ref:`CI check <automated-tests>` and can be checked locally using
262+
``tox -e stubtest``.

‎doc/install/dependencies.rst‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,13 @@ Build dependencies
222222
Python
223223
------
224224

225-
By default, ``pip`` will build packages using build isolation, meaning that these
226-
build dependencies are temporally installed by pip for the duration of the
227-
Matplotlib build process. However, build isolation is disabled when :ref:`installing Matplotlib for development <development-install>`;
228-
therefore we recommend using one of our :ref:`virtual environment configurations <dev-environment>` to
229-
create a development environment in which these packages are automatically installed.
230-
231-
If you are developing Matplotlib and unable to use our environment configurations,
232-
then you must manually install the following packages into your development environment:
225+
``pip`` normally builds packages using :external+pip:doc:`build isolation <reference/build-system/pyproject-toml>`,
226+
which means that ``pip`` installs the dependencies listed here for the
227+
duration of the build process. However, build isolation is disabled via the the
228+
:external+pip:ref:`--no-build-isolation <install_--no-build-isolation>` flag
229+
when :ref:`installing Matplotlib for development <development-install>`, which
230+
means that the dependencies must be explicitly installed, either by :ref:`creating a virtual environment <dev-environment>`
231+
(recommended) or by manually installing the following packages:
233232

234233
- `meson-python <https://meson-python.readthedocs.io/>`_ (>= 0.13.1).
235234
- `ninja <https://ninja-build.org/>`_ (>= 1.8.2). This may be available in your package

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /