@@ -230,55 +230,26 @@ contribute to Matplotlib).
230
230
231
231
A brief overview of the workflows is as follows.
232
232
233
- .. tab-set ::
233
+ 1. `Create an account <https://github.com/join >`_ on GitHub if you do not
234
+ already have one.
234
235
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.
236
239
237
- 1. `Create an account <https://github.com/join >`_ on GitHub if you do
238
- not already have one.
240
+ .. tab-set ::
239
241
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
244
243
245
244
3. Clone this copy to your local disk::
246
245
247
246
git clone https://github.com/<YOUR GITHUB USERNAME>/matplotlib.git
248
247
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
-
269
248
.. tab-item :: Using GitHub Codespaces
270
249
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
-
279
250
3. Open codespaces on your fork by clicking on the green "Code" button
280
251
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
282
253
change branches later, so you can select the default ``main `` branch.
283
254
284
255
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.
287
258
288
259
conda activate mpl-dev
289
260
290
- 4. Install the local version of Matplotlib with::
261
+ 4. Install the local version of Matplotlib with::
291
262
292
- python -m pip install -e .
263
+ python -m pip install -e .
293
264
294
- (See :ref:`installing_for_devs` for detailed instructions.)
265
+ (See :ref:`installing_for_devs` for detailed instructions.)
295
266
296
- 5. Create a branch to hold your changes::
267
+ 5. Create a branch to hold your changes::
297
268
298
- git checkout -b my-feature origin/main
269
+ git checkout -b my-feature origin/main
299
270
300
- and start making changes. Never work in the ``main`` branch!
271
+ and start making changes. Never work in the ``main`` branch!
301
272
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::
307
278
308
- git add lib/matplotlib/collections.py
309
- git commit
279
+ git add lib/matplotlib/collections.py
280
+ git commit
310
281
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::
313
283
314
- git push -u origin my-feature
284
+ git push -u origin my-feature
315
285
316
286
Finally, go to the web page of your fork of the Matplotlib repo, and click
317
287
'Pull request' to send your changes to the maintainers for review.
318
288
319
289
For more detailed instructions on how to set up Matplotlib for development and
320
290
best practices for contribution, see :ref: `installing_for_devs `.
321
291
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."
322
316
323
317
.. _contributing_documentation :
324
318
0 commit comments