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

Skip to content

Commit 7adebb1

Browse files
Backport PR #23844: Further improve dev setup instructions (#23859)
Co-authored-by: Greg Lucas <[email protected]>
1 parent 664e6af commit 7adebb1

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

doc/devel/development_setup.rst

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,32 @@ Retrieve the latest version of the code
1515
Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
1616

1717
You can retrieve the latest sources with the command (see
18-
:ref:`set-up-fork` for more details)::
18+
:ref:`set-up-fork` for more details)
1919

20-
git clone https://github.com/matplotlib/matplotlib.git
20+
.. tab-set::
21+
22+
.. tab-item:: https
23+
24+
.. code-block:: bash
25+
26+
git clone https://github.com/matplotlib/matplotlib.git
27+
28+
.. tab-item:: ssh
29+
30+
.. code-block:: bash
31+
32+
git clone [email protected]:matplotlib/matplotlib.git
33+
34+
This requires you to setup an `SSH key`_ in advance, but saves you from
35+
typing your password at every connection.
36+
37+
.. _SSH key: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
2138

2239
This will place the sources in a directory :file:`matplotlib` below your
2340
current working directory. Change into this directory::
2441

2542
cd matplotlib
2643

27-
If you have the proper privileges, you can use ``git@`` instead of
28-
``https://``, which works through the ssh protocol and might be easier to use
29-
if you are using 2-factor authentication.
3044

3145
.. _dev-environment:
3246

@@ -87,12 +101,15 @@ true for ``*.py`` files. If you change the C-extension source (which might
87101
also happen if you change branches) you will have to re-run
88102
``python -m pip install -ve .``
89103

104+
Install additional development dependencies
105+
===========================================
106+
See :ref:`development-dependencies`.
107+
90108
Install pre-commit hooks (optional)
91109
===================================
92-
You can optionally install `pre-commit <https://pre-commit.com/>`_ hooks.
93-
These will automatically check flake8 and other style issues when you run
94-
``git commit``. The hooks are defined in the top level
95-
``.pre-commit-config.yaml`` file. To install the hooks ::
110+
`pre-commit <https://pre-commit.com/>`_ hooks automatically check flake8 and
111+
other style issues when you run ``git commit``. The hooks are defined in the
112+
top level ``.pre-commit-config.yaml`` file. To install the hooks ::
96113

97114
python -m pip install pre-commit
98115
pre-commit install
@@ -105,7 +122,3 @@ listed in ``.pre-commit-config.yaml``, against the full codebase with ::
105122
To run a particular hook manually, run ``pre-commit run`` with the hook id ::
106123

107124
pre-commit run <hook id> --all-files
108-
109-
Install additional development dependencies
110-
===========================================
111-
See :ref:`development-dependencies`.

0 commit comments

Comments
 (0)