From 5584eabe400580075780b546e3b389c95dcf7f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20W=C3=B6rtwein?= Date: Sun, 12 Feb 2023 17:32:35 -0500 Subject: [PATCH 1/5] DOC: run typing checks --- doc/source/development/contributing_codebase.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index 63554447f295e..cb8908ed2d732 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -270,13 +270,17 @@ pandas uses `mypy `_ and `pyright =1.22.0) is required for type validation. +.. warning:: + + * It is essential that the version of ``mypy`` and ``numpy`` in the active environment is the same as specified in ``requirements-dev.txt``. .. _contributing.ci: From a2d50f042f8084be11bcb05fb52c554d0dec8021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20W=C3=B6rtwein?= Date: Mon, 13 Feb 2023 09:35:03 -0500 Subject: [PATCH 2/5] update wording a bit --- doc/source/development/contributing_codebase.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index cb8908ed2d732..e97838211eae9 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -276,11 +276,11 @@ pandas uses `mypy `_ and `pyright Date: Mon, 13 Feb 2023 16:06:18 -0500 Subject: [PATCH 3/5] reference python setup --- doc/source/development/contributing_codebase.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index e97838211eae9..18b421ae1d4c9 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -280,7 +280,7 @@ in your active python environment. .. warning:: - * It is essential that the versions of ``mypy`` and ``numpy`` in the active environment are the same as in ``requirements-dev.txt``. + * It is essential that the versions of ``mypy`` and ``numpy`` are the same as used on main. Please see :ref:`how to setup the python environment `. .. _contributing.ci: From 0852912339d8672b6365f8b6454b0214f463d69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20W=C3=B6rtwein?= Date: Wed, 15 Feb 2023 20:30:32 -0500 Subject: [PATCH 4/5] reference pandas CI --- doc/source/development/contributing_codebase.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index 18b421ae1d4c9..e46cf75b76dde 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -266,7 +266,7 @@ This module will ultimately house types for repeatedly used concepts like "path- Validating type hints ~~~~~~~~~~~~~~~~~~~~~ -pandas uses `mypy `_ and `pyright `_ to statically analyze the code base and type hints. After making any change you can ensure your type hints are correct by running +pandas uses `mypy `_ and `pyright `_ to statically analyze the code base and type hints. After making any change you can ensure your type hints are consistent by running .. code-block:: shell @@ -276,11 +276,11 @@ pandas uses `mypy `_ and `pyright `. + * Please be aware that the above commands will use the current python environment. If your python packages are older/newer than those installed by the pandas CI, the above commands might fail. This is often the case when the ``mypy`` or ``numpy`` versions do not match. Please see :ref:`how to setup the python environment ` or click on a recent CI report, then click on "Set up Conda" and "Environment info" to see which versions the pandas CI installs. .. _contributing.ci: From 2c28c57a614b16ba72b60a5511f898383c1de22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20W=C3=B6rtwein?= Date: Thu, 16 Feb 2023 21:43:23 -0500 Subject: [PATCH 5/5] include url to workflows --- doc/source/development/contributing_codebase.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index e46cf75b76dde..c6b2cd10519ae 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -280,7 +280,7 @@ in your python environment. .. warning:: - * Please be aware that the above commands will use the current python environment. If your python packages are older/newer than those installed by the pandas CI, the above commands might fail. This is often the case when the ``mypy`` or ``numpy`` versions do not match. Please see :ref:`how to setup the python environment ` or click on a recent CI report, then click on "Set up Conda" and "Environment info" to see which versions the pandas CI installs. + * Please be aware that the above commands will use the current python environment. If your python packages are older/newer than those installed by the pandas CI, the above commands might fail. This is often the case when the ``mypy`` or ``numpy`` versions do not match. Please see :ref:`how to setup the python environment ` or select a `recently succeeded workflow `_, select the "Docstring validation, typing, and other manual pre-commit hooks" job, then click on "Set up Conda" and "Environment info" to see which versions the pandas CI installs. .. _contributing.ci: