Skip to content

Commit 535ebee

Browse files
authored
Merge pull request #29705 from story645/dev-work
2 parents 52f659f + 7d59804 commit 535ebee

File tree

3 files changed

+50
-25
lines changed

3 files changed

+50
-25
lines changed

doc/_static/mpl.css

+4-3
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,16 @@ div.wide-table table th.stub {
195195
}
196196

197197
/* section-toc is a custom class that removes the page title from a toctree listing
198+
* and shifts the resulting list left
198199
* Example usage:
199200
*
200201
* .. rst-class:: section-toc
201202
* .. toctree::
202203
*
203204
*/
204-
.section-toc.toctree-wrapper .toctree-l1>a{
205+
.section-toc.toctree-wrapper .toctree-l1>a{
205206
display: none;
206207
}
207-
.section-toc.toctree-wrapper li>ul{
208-
padding-inline-start:0;
208+
.section-toc.toctree-wrapper .toctree-l1>ul{
209+
padding-left: 0;
209210
}

doc/devel/development_setup.rst

+44-20
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,31 @@ repository, you should first fork this repository by *clicking* the
3434
This creates a copy of the code under your account on the GitHub server. See `the GitHub
3535
documentation <https://docs.github.com/get-started/quickstart/fork-a-repo>`__ for more details.
3636

37-
Decide whether to work locally or in GitHub Codespaces
38-
======================================================
37+
Set up development environment
38+
==============================
3939

4040
You can either work locally on your machine, or online in
4141
`GitHub Codespaces <github-codespaces_>`_, a cloud-based in-browser development
42-
environment. If you are making a one-off, relatively simple change then
43-
working in GitHub Codespaces can be a good option because most of the setting
44-
up is done for you and you can skip the next few sections! If you are making
45-
extensive or frequent contributions to Matplotlib then it is probably worth
46-
taking the time to set up on your local machine: As well as having the
47-
convenience of your local familiar tools, you will not need to worry about
48-
Codespace's monthly usage limits.
42+
environment.
43+
44+
45+
:local: If you are making extensive or frequent contributions to Matplotlib then it
46+
is probably worth taking the time to set up on your local machine: As well as
47+
having the convenience of your local familiar tools, you will not need to worry
48+
about Codespace's monthly usage limits.
49+
50+
:codespaces: If you are making a one-off, relatively simple, change then working in
51+
GitHub Codespaces can be a good option because most of the setting
52+
up is done for you and you can skip the next few sections.
4953

5054
If you want to use Codespaces, skip to :ref:`development-codespaces`,
5155
otherwise, continue with the next section.
5256

53-
Retrieve the latest version of the code
54-
=======================================
57+
Create local environment
58+
------------------------
59+
60+
Get most recent code
61+
^^^^^^^^^^^^^^^^^^^^
5562

5663
Now that your fork of the repository lives under your GitHub username, you can
5764
retrieve the most recent version of the source code with one of the following
@@ -122,8 +129,9 @@ code, as described in :ref:`development-workflow`.
122129

123130
.. _dev-environment:
124131

125-
Create a dedicated python environment
126-
=====================================
132+
Create a dedicated environment
133+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134+
127135
You should set up a dedicated environment to decouple your Matplotlib
128136
development from other Python and Matplotlib installations on your system.
129137

@@ -142,11 +150,27 @@ setup.
142150

143151
python -m venv <file folder location>
144152

145-
and activate it with one of the following ::
153+
and activate it with one of the following :
154+
155+
.. tab-set::
156+
157+
.. tab-item:: Linux and macOS
158+
159+
.. code-block:: bash
160+
161+
source <file folder location>/bin/activate # Linux/macOS
162+
163+
.. tab-item:: Windows cmd.exe
164+
165+
.. code-block:: bat
166+
167+
<file folder location>\Scripts\activate.bat
168+
169+
.. tab-item:: Windows PowerShell
170+
171+
.. code-block:: ps1con
146172
147-
source <file folder location>/bin/activate # Linux/macOS
148-
<file folder location>\Scripts\activate.bat # Windows cmd.exe
149-
<file folder location>\Scripts\Activate.ps1 # Windows PowerShell
173+
<file folder location>\Scripts\Activate.ps1
150174
151175
On some systems, you may need to type ``python3`` instead of ``python``.
152176
For a discussion of the technical reasons, see `PEP-394 <https://peps.python.org/pep-0394>`_.
@@ -176,7 +200,7 @@ setup.
176200

177201

178202
Install external dependencies
179-
=============================
203+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180204

181205
Python dependencies were installed as part of :ref:`setting up the environment <dev-environment>`.
182206
Additionally, the following non-Python dependencies must also be installed locally:
@@ -192,8 +216,8 @@ need to be installed when working in codespaces.
192216

193217
.. _development-codespaces:
194218

195-
:octicon:`codespaces` Create a GitHub Codespace
196-
===============================================
219+
Create GitHub Codespace :octicon:`codespaces`
220+
---------------------------------------------
197221

198222
`GitHub Codespaces <github-codespaces_>`_ is a cloud-based
199223
in-browser development environment that comes with the appropriate setup to

doc/devel/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ and managing a development environment and workflow:
160160

161161
**Install**
162162
^^^
163-
163+
.. rst-class:: section-toc
164164
.. toctree::
165-
:maxdepth: 2
165+
:maxdepth: 4
166166

167167
development_setup
168168

0 commit comments

Comments
 (0)