Incidencia #40346

Sphinx!

Abrir Fecha: 2020-04-24 14:29 Última actualización: 2021-11-20 05:15

Informador:
Propietario:
Estado:
Open [Owner assigned]
Componente:
Prioridad:
3
Gravedad:
4
Resolución:
Ninguno
Fichero:
1

Details

Set up Sphinx and see if I can rebuild the sphinx docs.

Ticket History (3/11 Histories)

2020-04-24 14:29 Updated by: sforman
  • New Ticket "Sphinx!" created
2020-04-24 14:31 Updated by: sforman
  • Tipo Update from Bugs to Support Request
2020-04-25 06:59 Updated by: sforman
Comentario
sforman@bock:~/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs$ make html
Running Sphinx v1.7.3
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 25 source files that are out of date
updating environment: 25 added, 0 changed, 0 removed
reading sources... [100%] types                                                                                                                                                                                     
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Derivatives_of_Regular_Expressions.rst:540: WARNING: image file not readable: notebooks/attachment:omg.svg
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Developing.rst:611: WARNING: Title level inconsistent:

Here they are...
~~~~~~~~~~~~~~~~
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Developing.rst:624: WARNING: Title level inconsistent:

...and they do sum to 999.
~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Developing.rst:710: WARNING: Title level inconsistent:

Generalizing to Blocks of Terms
-------------------------------
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Ordered_Binary_Trees.rst:701: WARNING: Content block expected for the "parsed-literal" directive; none found.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:25: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Replacing.rst:117: WARNING: Inline emphasis start-string without end-string.
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Types.rst:1519: WARNING: Unknown target name: "divmod".
/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/notebooks/Types.rst:1947: WARNING: Unknown target name: "divmod".
WARNING: autodoc: failed to import module u'joy.utils.polytypes'; the following exception was raised:
No module named polytypes
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] types                                                                                                                                                                                      
generating indices... genindex py-modindex
highlighting module code... [100%] joy.utils.types                                                                                                                                                                  
writing additional pages... search
copying static files... WARNING: html_static_path entry u'/home/sforman/Desktop/ArchLayer/System/source/Thun/docs/sphinx_docs/_static' does not exist
done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 23 warnings.

The HTML pages are in _build/html.
2020-04-25 08:33 Updated by: sforman
Comentario

I think it would be good to nail down the problems when going from a Notebook to a Sphinx webpage. Some of the math symbols don't make it through ( a Yen symbol is one clue!)

I don't think I'm doing anything weird.

(*.ipynb)  ->  [nbconvert]  ->  (*.rst)  ->  [sphinx]  ->  (*.html)

The nbconvert tool can output HTML too but the Sphinx HTML is much much prettier.

2020-04-25 13:48 Updated by: sforman
Comentario

In re: omg.svg, the notebook stores it as an attachment:

...
  {
   "attachments": {
    "omg.svg": {
     "image/svg+xml": [
      "PD94bWwgdmVyc2lvbj0iMS4wIiB...
     ]
    }
   },
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## State Machine\n",
    "We can drive the regular expres...
    "\n",
    "    .111. & (.01 + 11*)'\n",
    "\n",
    "Says, \"Three or more 1's and not...
    "\n",
    "![omg.svg](attachment:omg.svg)\n",
    "\n",
    "\n",
    "Start at `a` and follow the transitio...
   ]
  },
...

When nbconvert converts it to ReST it looks like this:

...
Says, "Three or more 1's and not ending in 01 nor composed of all 1's."

.. figure:: attachment:omg.svg
   :alt: omg.svg

   omg.svg

Start at ``a`` and follow the transition arrows according to their
...

Leading sphinx to warn:

Thun/docs/sphinx_docs/notebooks/Derivatives_of_Regular_Expressions.rst:540: WARNING: image file not readable: notebooks/attachment:omg.svg

IIRC I was manually deleting the attachment: prefix in the ReST file and copying omg.svg to the Thun/docs/sphinx_docs/notebooks directory.

2020-05-13 09:01 Updated by: None
2021-11-20 05:04 Updated by: sforman
Comentario
Joypy/docs/sphinx_docs % gmake html
Running Sphinx v4.3.0
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 25 source files that are out of date
updating environment: [new config] 25 added, 0 changed, 0 removed
reading sources... [100%] types                                                                                                                                
/usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Derivatives_of_Regular_Expressions.rst:539: WARNING: image file not readable: notebooks/attachment:omg.svg
/usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Developing.rst:611: WARNING: Title level inconsistent:

Here they are...
~~~~~~~~~~~~~~~~
/usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Developing.rst:624: WARNING: Title level inconsistent:

...and they do sum to 999.
~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/sforman/src/Joypy/docs/sphinx_docs/notebooks/Developing.rst:710: WARNING: Title level inconsistent:

Generalizing to Blocks of Terms
-------------------------------
...

So we have a few things here already:

* WARNING: html_static_path entry '_static' does not exist

* WARNING: image file not readable: notebooks/attachment:omg.svg (as above)

* WARNING: Title level inconsistent: x 3

2021-11-20 05:15 Updated by: sforman
Comentario
.../Joypy/docs/sphinx_docs % mkdir _static

It's empty so git ignores it?

Attachment File List

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar