#27549 closed enhancement (fixed)

Clean up some more code blocks in Sage's documentation

Reported by: jhpalmieri Owned by:
Priority: major Milestone: sage-8.8
Component: documentation Keywords:
Cc: Merged in:
Authors: John Palmieri Reviewers: Simon Brandhorst, Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 95114ce (Commits) Commit: 95114cebba886ca8ee13e1fd6fa182983ce23281
Dependencies: #27528, #27512 Stopgaps:

Description

This is a follow-up to #27528: we should change things like

Here is how to run long doctests::

    $ make ptestlong

to

Here is how to run long doctests:

.. CODE-BLOCK:: shell-session

    $ make ptestlong

so that Sphinx highlights it correctly. Note that in addition to shell-session, there are many other language options. See the file pygments/lexers/_mapping.py for big list.

Change History (14)

comment:1 Changed 16 months ago by jhpalmieri

  • Branch set to u/jhpalmieri/code-blocks-in-docs

comment:2 Changed 16 months ago by jhpalmieri

  • Commit set to 1cacccc7df42c101f634eaa0d668165506eb30d4
  • Status changed from new to needs_review

I think this takes care of most (all?) of the code-blocks in src/doc. The reference manual remains.


New commits:

48b7acdtrac 27528: remove some patches for Sphinx and pygments.
b23b8cctrac 27528: use a custom Sphinx transform to handle <BLANKLINE>
687b338trac 27528: clean up some code-blocks in the reST documentation.
1cacccctrac 27549: clean up some code blocks in Sage's documentation.

comment:3 Changed 16 months ago by jhpalmieri

  • Dependencies set to #27528

comment:4 Changed 16 months ago by git

  • Commit changed from 1cacccc7df42c101f634eaa0d668165506eb30d4 to b7b13a9ba3347806954af6a72feb1cfb3e0051fd

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

278fa3bBump package versions
a323c09Fix a few CODE-BLOCK indentations
4cabfa7Fix _test_enough_doctests()
83436eaFix usage of IPythonConsoleLexer
b7b13a9trac 27549: clean up some code blocks in Sage's documentation.

comment:5 Changed 16 months ago by git

  • Commit changed from b7b13a9ba3347806954af6a72feb1cfb3e0051fd to 90dc135b79478a194914d6252c48667625f2cd95

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

1868426Fixed typos in thematic_tutorial
a23f1c2trac 27528: remove some patches for Sphinx and pygments.
33e4fb7trac 27528: use a custom Sphinx transform to handle <BLANKLINE>
c1d8e58trac 27528: clean up some code-blocks in the reST documentation.
b92eb02Bump package versions
f57615eFix a few CODE-BLOCK indentations
0c60af7Fix _test_enough_doctests()
2a45179Fix usage of IPythonConsoleLexer
90dc135trac 27549: clean up some code blocks in Sage's documentation.

comment:6 Changed 16 months ago by jhpalmieri

  • Dependencies changed from #27528 to #27528, #27512

Rebased to include #27512, which touches one of the same files.

comment:7 Changed 15 months ago by sbrandhorst

  • Reviewers set to Simon Brandhorst
  • Status changed from needs_review to needs_work

Merge conflict

comment:8 Changed 15 months ago by git

  • Commit changed from 90dc135b79478a194914d6252c48667625f2cd95 to cf39c2b4a19e9a7b45c9f70efaa1772ffa4ddb56

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

cf39c2btrac 27549: clean up some code blocks in Sage's documentation.

comment:9 Changed 15 months ago by jhpalmieri

  • Status changed from needs_work to needs_review

Rebased.

comment:10 Changed 15 months ago by tscrim

  • Reviewers changed from Simon Brandhorst to Simon Brandhorst, Travis Scrimshaw

Nitpicks:

installation/source.rst:

-.. highlight:: shell-session
+.. HIGHLIGHT:: shell-session

thematic_tutorials/cython_interface.rst:

-.. code-block:: shell-session
+.. CODE-BLOCK:: shell-session

Once changed, you can set a positive review on my behalf unless Simon has any additional comments.

Last edited 15 months ago by tscrim (previous) (diff)

comment:11 Changed 15 months ago by jhpalmieri

Thanks for the comments. To handle the second of these, I decided I also needed to change the half-dozen already present .. code-block lines to .. CODE-BLOCK.

comment:12 Changed 15 months ago by git

  • Commit changed from cf39c2b4a19e9a7b45c9f70efaa1772ffa4ddb56 to 95114cebba886ca8ee13e1fd6fa182983ce23281

Branch pushed to git repo; I updated commit sha1. New commits:

95114cetrac 27549: more consistent capitalization in reST directives.

comment:13 Changed 15 months ago by tscrim

  • Status changed from needs_review to positive_review

Thank you. LGTM.

Simon, if you disagree, feel free to revert.

comment:14 Changed 15 months ago by vbraun

  • Branch changed from u/jhpalmieri/code-blocks-in-docs to 95114cebba886ca8ee13e1fd6fa182983ce23281
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.