diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | MANIFEST.in | 1 | ||||
-rw-r--r-- | doc/Makefile | 29 | ||||
m--------- | doc/scipy-sphinx-theme | 0 | ||||
-rw-r--r-- | doc/source/_static/scipy.css | 189 | ||||
-rw-r--r-- | doc/source/_templates/indexsidebar.html | 1 | ||||
-rw-r--r-- | doc/source/_templates/layout.html | 5 | ||||
-rw-r--r-- | doc/source/conf.py | 83 | ||||
-rw-r--r-- | doc/source/release.rst | 16 | ||||
-rw-r--r-- | doc/source/scipyshiny_small.png | bin | 18991 -> 0 bytes |
10 files changed, 61 insertions, 266 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..94d7be00b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "doc/scipy-sphinx-theme"] + path = doc/scipy-sphinx-theme + url = https://github.com/scipy/scipy-sphinx-theme.git diff --git a/MANIFEST.in b/MANIFEST.in index 23e67069c..322094980 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -23,3 +23,4 @@ recursive-include doc/sphinxext * recursive-include doc/cython * recursive-include doc/pyrex * recursive-include doc/swig * +recursive-include doc/scipy-sphinx-theme * diff --git a/doc/Makefile b/doc/Makefile index 52dd1ef06..d8c1ab918 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ # Makefile for Sphinx documentation # -PYVER = +PYVER = 2.7 PYTHON = python$(PYVER) # You can set these variables from the command line. @@ -24,13 +24,13 @@ ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source help: @echo "Please use \`make <target>' where <target> is one of" @echo " html to make standalone HTML files" + @echo " html-scipyorg to make standalone HTML files with scipy.org theming" @echo " pickle to make pickle files (usable by e.g. sphinx-web)" @echo " htmlhelp to make HTML files and a HTML help project" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " changes to make an overview over all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " dist PYVER=... to make a distribution-ready tree" - @echo " upload USER=... to upload results to docs.scipy.org" @echo " gitwash-update GITWASH=path/to/gitwash update gitwash developer docs" clean: @@ -56,34 +56,21 @@ gitwash-update: # - Different versions of easy_install install to different directories (!) # + INSTALL_DIR = $(CURDIR)/build/inst-dist/ INSTALL_PPH = $(INSTALL_DIR)/lib/python$(PYVER)/site-packages:$(INSTALL_DIR)/local/lib/python$(PYVER)/site-packages:$(INSTALL_DIR)/lib/python$(PYVER)/dist-packages:$(INSTALL_DIR)/local/lib/python$(PYVER)/dist-packages DIST_VARS=SPHINXBUILD="LANG=C PYTHONPATH=$(INSTALL_PPH) python$(PYVER) `which sphinx-build`" PYTHON="PYTHONPATH=$(INSTALL_PPH) python$(PYVER)" SPHINXOPTS="$(SPHINXOPTS)" -UPLOAD_TARGET = $(USER)@docs.scipy.org:/home/docserver/www-root/doc/numpy/ - -upload: - @test -e build/dist || { echo "make dist is required first"; exit 1; } - @test output-is-fine -nt build/dist || { \ - echo "Review the output in build/dist, and do 'touch output-is-fine' before uploading."; exit 1; } - rsync -r -z --delete-after -p \ - $(if $(shell test -f build/dist/numpy-ref.pdf && echo "y"),, \ - --exclude '**-ref.pdf' --exclude '**-user.pdf') \ - $(if $(shell test -f build/dist/numpy-chm.zip && echo "y"),, \ - --exclude '**-chm.zip') \ - build/dist/ $(UPLOAD_TARGET) - dist: make $(DIST_VARS) real-dist -real-dist: dist-build html +real-dist: dist-build html html-scipyorg test -d build/latex || make latex make -C build/latex all-pdf -test -d build/htmlhelp || make htmlhelp-build -rm -rf build/dist - cp -r build/html build/dist - perl -pi -e 's#^\s*(<li><a href=".*?">NumPy.*?Manual.*?»</li>)#<li><a href="/">Numpy and Scipy Documentation</a> »</li>#;' build/dist/*.html build/dist/*/*.html build/dist/*/*/*.html + cp -r build/html-scipyorg build/dist cd build/html && zip -9r ../dist/numpy-html.zip . cp build/latex/numpy-*.pdf build/dist -zip build/dist/numpy-chm.zip build/htmlhelp/numpy.chm @@ -114,6 +101,12 @@ html: generate @echo @echo "Build finished. The HTML pages are in build/html." +html-scipyorg: + mkdir -p build/html build/doctrees + $(SPHINXBUILD) -t scipyorg -b html $(ALLSPHINXOPTS) build/html-scipyorg $(FILES) + @echo + @echo "Build finished. The HTML pages are in build/html." + pickle: generate mkdir -p build/pickle build/doctrees $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle $(FILES) diff --git a/doc/scipy-sphinx-theme b/doc/scipy-sphinx-theme new file mode 160000 +Subproject 65c59fe6a516e23db50ecb8ca160b9f9de12dc1 diff --git a/doc/source/_static/scipy.css b/doc/source/_static/scipy.css deleted file mode 100644 index 89984b67d..000000000 --- a/doc/source/_static/scipy.css +++ /dev/null @@ -1,189 +0,0 @@ -@import "default.css"; - -/** - * Spacing fixes - */ - -div.body p, div.body dd, div.body li { - line-height: 125%; -} - -ul.simple { - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} - -/* spacing around blockquoted fields in parameters/attributes/returns */ -td.field-body > blockquote { - margin-top: 0.1em; - margin-bottom: 0.5em; -} - -/* spacing around example code */ -div.highlight > pre { - padding: 2px 5px 2px 5px; -} - -/* spacing in see also definition lists */ -dl.last > dd { - margin-top: 1px; - margin-bottom: 5px; - margin-left: 30px; -} - -/* hide overflowing content in the sidebar */ -div.sphinxsidebarwrapper p.topless { - overflow: hidden; -} - -/** - * Hide dummy toctrees - */ - -ul { - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; -} -ul li { - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; -} -ul li a.reference { - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; -} - -/** - * Make high-level subsections easier to distinguish from top-level ones - */ -div.body h3 { - background-color: transparent; -} - -div.body h4 { - border: none; - background-color: transparent; -} - -/** - * Scipy colors - */ - -body { - background-color: rgb(100,135,220); -} - -div.document { - background-color: rgb(230,230,230); -} - -div.sphinxsidebar { - background-color: rgb(230,230,230); -} - -div.related { - background-color: rgb(100,135,220); -} - -div.sphinxsidebar h3 { - color: rgb(0,102,204); -} - -div.sphinxsidebar h3 a { - color: rgb(0,102,204); -} - -div.sphinxsidebar h4 { - color: rgb(0,82,194); -} - -div.sphinxsidebar p { - color: black; -} - -div.sphinxsidebar a { - color: #355f7c; -} - -div.sphinxsidebar ul.want-points { - list-style: disc; -} - -.field-list th { - color: rgb(0,102,204); - white-space: nowrap; -} - -/** - * Extra admonitions - */ - -div.tip { - background-color: #ffffe4; - border: 1px solid #ee6; -} - -div.plot-output { - clear-after: both; -} - -div.plot-output .figure { - float: left; - text-align: center; - margin-bottom: 0; - padding-bottom: 0; -} - -div.plot-output .caption { - margin-top: 2; - padding-top: 0; -} - -div.plot-output p.admonition-title { - display: none; -} - -div.plot-output:after { - content: ""; - display: block; - height: 0; - clear: both; -} - - -/* -div.admonition-example { - background-color: #e4ffe4; - border: 1px solid #ccc; -}*/ - - -/** - * Styling for field lists - */ - -table.field-list th { - border-left: 1px solid #aaa !important; - padding-left: 5px; -} - -table.field-list { - border-collapse: separate; - border-spacing: 10px; -} - -/** - * Styling for footnotes - */ - -table.footnote td, table.footnote th { - border: none; -} diff --git a/doc/source/_templates/indexsidebar.html b/doc/source/_templates/indexsidebar.html index 409743a03..9edb003af 100644 --- a/doc/source/_templates/indexsidebar.html +++ b/doc/source/_templates/indexsidebar.html @@ -1,5 +1,4 @@ <h3>Resources</h3> <ul> <li><a href="http://scipy.org/">Scipy.org website</a></li> - <li> </li> </ul> diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html index 27798878e..77da54a00 100644 --- a/doc/source/_templates/layout.html +++ b/doc/source/_templates/layout.html @@ -1,6 +1,9 @@ {% extends "!layout.html" %} + {% block rootrellink %} -<li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li> + {% if pagename != 'index' %} + <li class="active"><a href="{{ pathto('index') }}">{{ shorttitle|e }}</a></li> + {% endif %} {% endblock %} {% block sidebarsearch %} diff --git a/doc/source/conf.py b/doc/source/conf.py index 42e46c4f8..233f2e409 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -30,9 +30,6 @@ templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' -# The master toctree document. -#master_doc = 'index' - # General substitutions. project = 'NumPy' copyright = '2008-2009, The Scipy community' @@ -83,62 +80,50 @@ pygments_style = 'sphinx' # HTML output # ----------------------------------------------------------------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'scipy.css' - -# The name for this set of Sphinx documents. If None, it defaults to -# "<project> v<release> documentation". -html_title = "%s v%s Manual (DRAFT)" % (project, version) +themedir = os.path.join(os.pardir, 'scipy-sphinx-theme', '_theme') +if not os.path.isdir(themedir): + raise RuntimeError("Get the scipy-sphinx-theme first, " + "via git submodule init && git submodule update") + +html_theme = 'scipy' +html_theme_path = [themedir] + +if 'scipyorg' in tags: + # Build for the scipy.org website + html_theme_options = { + "edit_link": True, + "sidebar": "right", + "scipy_org_logo": True, + "rootlinks": [("http://scipy.org/", "Scipy.org"), + ("http://docs.scipy.org/", "Docs")] + } +else: + # Default build + html_theme_options = { + "edit_link": False, + "sidebar": "left", + "scipy_org_logo": False, + "rootlinks": [] + } + html_sidebars = {'index': 'indexsidebar.html'} -# The name of an image file (within the static path) to place at the top of -# the sidebar. -html_logo = 'scipyshiny_small.png' +html_additional_pages = { + 'index': 'indexcontent.html', +} -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". +html_title = "%s v%s Manual" % (project, version) html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. html_last_updated_fmt = '%b %d, %Y' -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'index': 'indexsidebar.html' -} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -html_additional_pages = { - 'index': 'indexcontent.html', -} - -# If false, no module index is generated. +html_use_modindex = True +html_copy_source = False html_domain_indices = False +html_file_suffix = '.html' -# If true, the reST sources are included in the HTML build as _sources/<name>. -#html_copy_source = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a <link> tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".html"). -#html_file_suffix = '.html' - -# Output file base name for HTML help builder. htmlhelp_basename = 'numpy' -# Pngmath should try to align formulas properly pngmath_use_preview = True +pngmath_dvipng_args = ['-gamma', '1.5', '-D', '96', '-bg', 'Transparent'] # ----------------------------------------------------------------------------- diff --git a/doc/source/release.rst b/doc/source/release.rst index 37c60b997..944607aa8 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -2,12 +2,12 @@ Release Notes ************* -.. include:: ../release/1.3.0-notes.rst -.. include:: ../release/1.4.0-notes.rst -.. include:: ../release/1.5.0-notes.rst -.. include:: ../release/1.6.0-notes.rst -.. include:: ../release/1.6.1-notes.rst -.. include:: ../release/1.6.2-notes.rst -.. include:: ../release/1.7.0-notes.rst -.. include:: ../release/1.7.1-notes.rst .. include:: ../release/1.8.0-notes.rst +.. include:: ../release/1.7.1-notes.rst +.. include:: ../release/1.7.0-notes.rst +.. include:: ../release/1.6.2-notes.rst +.. include:: ../release/1.6.1-notes.rst +.. include:: ../release/1.6.0-notes.rst +.. include:: ../release/1.5.0-notes.rst +.. include:: ../release/1.4.0-notes.rst +.. include:: ../release/1.3.0-notes.rst diff --git a/doc/source/scipyshiny_small.png b/doc/source/scipyshiny_small.png Binary files differdeleted file mode 100644 index 7ef81a9e8..000000000 --- a/doc/source/scipyshiny_small.png +++ /dev/null |