@@ -230,55 +230,26 @@ contribute to Matplotlib).
230230
231231A brief overview of the workflows is as follows.
232232
233- .. tab-set ::
233+ 1. `Create an account <https://github.com/join >`_ on GitHub if you do not
234+ already have one.
234235
235- .. tab-item :: Local development
236+ 2. Fork the `project repository <https://github.com/matplotlib/matplotlib >`_:
237+ click on the 'Fork' button near the top of the page. This creates a copy of
238+ the code under your account on the GitHub server.
236239
237- 1. `Create an account <https://github.com/join >`_ on GitHub if you do
238- not already have one.
240+ .. tab-set ::
239241
240- 2. Fork the
241- `project repository <https://github.com/matplotlib/matplotlib >`_:
242- click on the 'Fork' button near the top of the page. This creates a
243- copy of the code under your account on the GitHub server.
242+ .. tab-item :: Local development
244243
245244 3. Clone this copy to your local disk::
246245
247246 git clone https://github.com/<YOUR GITHUB USERNAME>/matplotlib.git
248247
249- 4. Enter the directory and install the local version of Matplotlib.
250- See :ref: `installing_for_devs ` for instructions
251-
252- 5. Create a branch to hold your changes::
253-
254- git checkout -b my-feature origin/main
255-
256- and start making changes. Never work in the ``main`` branch!
257-
258- 6. Work on this copy, on your computer, using Git to do the version
259- control. When you're done editing e.g.,
260- ``lib/matplotlib/collections.py ``, do::
261-
262- git add lib/matplotlib/collections.py
263- git commit
264-
265- to record your changes in Git, then push them to GitHub with::
266-
267- git push -u origin my-feature
268-
269248 .. tab-item :: Using GitHub Codespaces
270249
271- 1. `Create an account <https://github.com/join >`_ on GitHub if you do
272- not already have one.
273-
274- 2. Fork the
275- `project repository <https://github.com/matplotlib/matplotlib >`_:
276- click on the 'Fork' button near the top of the page. This creates a
277- copy of the code under your account on the GitHub server.
278-
279250 3. Open codespaces on your fork by clicking on the green "Code" button
280251 on the GitHub web interface and selecting the "Codespaces" tab. Next,
281- click on "Open codespaces on <your fork name>". You will be able to
252+ click on "Open codespaces on <your branch name>". You will be able to
282253 change branches later, so you can select the default ``main `` branch.
283254
284255 After the codespace is created, you will be taken to a new browser
@@ -287,38 +258,61 @@ A brief overview of the workflows is as follows.
287258
288259 conda activate mpl-dev
289260
290- 4. Install the local version of Matplotlib with::
261+ 4. Install the local version of Matplotlib with::
291262
292- python -m pip install -e .
263+ python -m pip install -e .
293264
294- (See :ref:`installing_for_devs` for detailed instructions.)
265+ (See :ref:`installing_for_devs` for detailed instructions.)
295266
296- 5. Create a branch to hold your changes::
267+ 5. Create a branch to hold your changes::
297268
298- git checkout -b my-feature origin/main
269+ git checkout -b my-feature origin/main
299270
300- and start making changes. Never work in the ``main`` branch!
271+ and start making changes. Never work in the ``main`` branch!
301272
302- 6. Work on this task using Git to do the version control. Codespaces
303- persist for some time (check the `documentation for details
304- <https://docs.github.com/codespaces/getting-started/the-codespace-lifecycle> `_)
305- and can be managed on https://github.com/codespaces. When you're done
306- editing e.g., ``lib/matplotlib/collections.py ``, do::
273+ 6. Work on this task using Git to do the version control. Codespaces persist for
274+ some time (check the `documentation for details
275+ <https://docs.github.com/codespaces/getting-started/the-codespace-lifecycle> `_)
276+ and can be managed on https://github.com/codespaces. When you're done editing
277+ e.g., ``lib/matplotlib/collections.py ``, do::
307278
308- git add lib/matplotlib/collections.py
309- git commit
279+ git add lib/matplotlib/collections.py
280+ git commit
310281
311- to record your changes in Git, then push them to your GitHub fork
312- with::
282+ to record your changes in Git, then push them to your GitHub fork with::
313283
314- git push -u origin my-feature
284+ git push -u origin my-feature
315285
316286Finally, go to the web page of your fork of the Matplotlib repo, and click
317287'Pull request' to send your changes to the maintainers for review.
318288
319289For more detailed instructions on how to set up Matplotlib for development and
320290best practices for contribution, see :ref: `installing_for_devs `.
321291
292+ .. note :: GitHub Codespaces workflows
293+
294+ * If you need to open a GUI window with Matplotlib output on Codespaces, our
295+ configuration includes a `light-weight Fluxbox-based desktop
296+ <https://github.com/devcontainers/features/tree/main/src/desktop-lite> `_.
297+ You can use it by connecting to this desktop via your web browser. To do
298+ this:
299+
300+ 1. Press ``F1 `` or ``Ctrl/Cmd+Shift+P `` and select
301+ ``Ports: Focus on Ports View `` in the VSCode session to bring it into
302+ focus. Open the ports view in your tool, select the ``noVNC `` port, and
303+ click the Globe icon.
304+ 2. In the browser that appears, click the Connect button and enter the desktop
305+ password (``vscode `` by default).
306+
307+ Check the `GitHub instructions
308+ <https://github.com/devcontainers/features/tree/main/src/desktop-lite#connecting-to-the-desktop> `_
309+ for more details on connecting to the desktop.
310+
311+ * If you also built the documentation pages, you can view them using
312+ Codespaces. Use the "Extensions" icon in the activity bar to install the
313+ "Live Server" extension. Locate the ``doc/build/html `` folder in the
314+ Explorer, right click the file you want to open and select "Open with Live
315+ Server."
322316
323317.. _contributing_documentation :
324318
0 commit comments