Changeset 1013

Ignore:
Timestamp:
Jul 13, 2012 6:22:45 PM (10 years ago)
Message:

refs #8, add to the HOWTO part

Location:
specdomain/trunk/src/specdomain/doc
Files:
4 edited

Unmodified
Removed
• specdomain/trunk/src/specdomain/doc/howto-build.rst

 r1007 How to Build the Documentation from a Sphinx project ==================================================================== --tba-- :: build/html/index.html --tba-- Test ===== For our testing purposes, we'll document the *aalength.mac* macro file from the :ref:Install section. Edit the new file *index.rst* and add this line at line 14. Make sure it lines up at the left in column 1:: .. autospecmacro:: ../specdomain/doc/aalength.mac Build the HTML documentation:: make html View the documentation using a web browser such as *firefox*:: firefox _build/html/index.html & You should see a page that looks like this, if nothing went wrong. .. figure:: test1.png :alt: view of aalength.mac HTML documentation Documentation of the **aalength.mac** file.
• specdomain/trunk/src/specdomain/doc/howto-configure.rst

 r1007 files in a separate directory from the SPEC macros. Then again, maybe not. --tba-- .. index:: ! in-source configuration ===================================== :: .. sidebar:: Testing the installation sphinx-quickstart These instructions are written to help you test if you have installed *specdomain* correctly. They use an *in-source* configuration. .. TODO: Show a blow-by-blow of what this looks like. Make a new sandbox directory to try this out:: mkdir /tmp/sandbox cd /tmp/sandbox Create a Sphinx configuration in this directory by running sphinx-quickstart: .. code-block:: text :linenos: jemian@como-ubuntu64:/tmp/sandbox$sphinx-quickstart Welcome to the Sphinx 1.1.2 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Enter the root path for documentation. > Root path for the documentation [.]: You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. > Separate source and build directories (y/N) [n]: Inside the root directory, two more directories will be created; "_templates" for custom HTML templates and "_static" for custom stylesheets and other static files. You can enter another prefix (such as ".") to replace the underscore. > Name prefix for templates and static dir [_]: The project name will occur in several places in the built documentation. > Project name: sandbox > Author name(s): sandy Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. > Project version: test > Project release [test]: The file name suffix for source files. Commonly, this is either ".txt" or ".rst". Only files with this suffix are considered documents. > Source file suffix [.rst]: One document is special in that it is considered the top node of the "contents tree", that is, it is the root of the hierarchical structure of the documents. Normally, this is "index", but if your "index" document is a custom template, you can also set this to another filename. > Name of your master document (without suffix) [index]: Sphinx can also add configuration for epub output: > Do you want to use the epub builder (y/N) [n]: Please indicate if you want to use one of the following Sphinx extensions: > autodoc: automatically insert docstrings from modules (y/N) [n]: y > doctest: automatically test code snippets in doctest blocks (y/N) [n]: > intersphinx: link between Sphinx documentation of different projects (y/N) [n]: > todo: write "todo" entries that can be shown or hidden on build (y/N) [n]: > coverage: checks for documentation coverage (y/N) [n]: > pngmath: include math, rendered as PNG images (y/N) [n]: > mathjax: include math, rendered in the browser by MathJax (y/N) [n]: > ifconfig: conditional inclusion of content based on config values (y/N) [n]: > viewcode: include links to the source code of documented Python objects (y/N) [n]: y A Makefile and a Windows command file can be generated for you so that you only have to run e.g. make html' instead of invoking sphinx-build directly. > Create Makefile? (Y/n) [y]: > Create Windows command file? (Y/n) [y]: Creating file ./conf.py. Creating file ./index.rst. Creating file ./Makefile. Creating file ./make.bat. Finished: An initial directory structure has been created. You should now populate your master file ./index.rst and create other documentation source files. Use the Makefile to build the docs, like so: make builder where "builder" is one of the supported builders, e.g. html, latex or linkcheck. jemian@como-ubuntu64:/tmp/sandbox$ Configure: Changes to conf.py` ===================================== tba Edit the new file *conf.py* and add these two lines to the extensions list after line 28:: # this says \${PYTHONPATH)/sphinxcontrib/specdomain.py must be found extensions.append('sphinxcontrib.specdomain') If you wish, you can also change the *html_theme* from the *default* to *sphinxdoc* or *agogo* or one of the others. Check the Sphinx documentation for the choices.  To change the theme, look on line 97 (or thereabouts) and change:: html_theme = 'default' to:: html_theme = 'sphinxdoc'
• specdomain/trunk/src/specdomain/doc/howto-install.rst

 r1007 #. download from the subversion repository #. install into Python #. test the installation Requires Requires [#]_ * Python 2.7 or greater * Sphinx 1.1.3 or greater (may work with older versions) * Sphinx 1.1.1 or greater Download ========== -tba- Retrieve the support package from our subversion repository:: svn co https://subversion.xray.aps.anl.gov/bcdaext/specdomain/trunk/src/specdomain/ /tmp/specdomain .. Any tarballs available? .. _Install: Install ========== -tba- Continuing from the download above, use the setup tools to install the package somewhere on your PYTHONPATH (you may need admin rights to install into your Python). This command shows how to install into Python's *site-packages* directory:: cd /tmp/specdomain python setup.py install --------------- .. rubric:: Footnotes .. [#] The developer used Python 2.7.2 and Sphinx 1.1.2 while writing this support. Older versions may work but have not been tested.
• specdomain/trunk/src/specdomain/doc/todo.rst

 r1009 * support the :summary: role to explicitly declare a summary * cdef argument list not handled yet * Extract index of macros in each macro file (option to index all symbols in a macro file) * Option to index all symbols in a macro file * allow section headings inside macro declaration docstrings * create a role (or example using a ref) to refer to a macro file from the documentation * produce a custom module index with links and summary lines
Note: See TracChangeset for help on using the changeset viewer.