From 7d711083ec48cccfc85366782ef7c6d99f9f1742 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:38:17 +0100 Subject: [PATCH 01/25] .gitignore: Removed *.html rule The Sphinx templates are HTML files and should be included. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 79e1c6765..2b7c267b0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ include/ *.pyc *.pyo *.swp -*.html *.class *.orig *~ From ebe0c34a02ffa0ce507bb691ba03ea07989d9e2e Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:08:36 +0100 Subject: [PATCH 02/25] doc: Imported Flask Sphinx Styles from https://github.com/mitsuhiko/flask-sphinx-themes --- doc/en/_themes/.gitignore | 3 + doc/en/_themes/LICENSE | 37 ++ doc/en/_themes/README | 31 + doc/en/_themes/flask/layout.html | 24 + doc/en/_themes/flask/relations.html | 19 + doc/en/_themes/flask/static/flasky.css_t | 577 ++++++++++++++++++ doc/en/_themes/flask/theme.conf | 9 + doc/en/_themes/flask_small/layout.html | 22 + .../_themes/flask_small/static/flasky.css_t | 287 +++++++++ doc/en/_themes/flask_small/theme.conf | 10 + doc/en/_themes/flask_theme_support.py | 86 +++ 11 files changed, 1105 insertions(+) create mode 100644 doc/en/_themes/.gitignore create mode 100644 doc/en/_themes/LICENSE create mode 100644 doc/en/_themes/README create mode 100644 doc/en/_themes/flask/layout.html create mode 100644 doc/en/_themes/flask/relations.html create mode 100644 doc/en/_themes/flask/static/flasky.css_t create mode 100644 doc/en/_themes/flask/theme.conf create mode 100644 doc/en/_themes/flask_small/layout.html create mode 100644 doc/en/_themes/flask_small/static/flasky.css_t create mode 100644 doc/en/_themes/flask_small/theme.conf create mode 100644 doc/en/_themes/flask_theme_support.py diff --git a/doc/en/_themes/.gitignore b/doc/en/_themes/.gitignore new file mode 100644 index 000000000..66b6e4c2f --- /dev/null +++ b/doc/en/_themes/.gitignore @@ -0,0 +1,3 @@ +*.pyc +*.pyo +.DS_Store diff --git a/doc/en/_themes/LICENSE b/doc/en/_themes/LICENSE new file mode 100644 index 000000000..8daab7ee6 --- /dev/null +++ b/doc/en/_themes/LICENSE @@ -0,0 +1,37 @@ +Copyright (c) 2010 by Armin Ronacher. + +Some rights reserved. + +Redistribution and use in source and binary forms of the theme, with or +without modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +* The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +We kindly ask you to only use these themes in an unmodified manner just +for Flask and Flask-related products, not for unrelated projects. If you +like the visual style and want to use it for your own projects, please +consider making some larger changes to the themes (such as changing +font faces, sizes, colors or margins). + +THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/doc/en/_themes/README b/doc/en/_themes/README new file mode 100644 index 000000000..b3292bdff --- /dev/null +++ b/doc/en/_themes/README @@ -0,0 +1,31 @@ +Flask Sphinx Styles +=================== + +This repository contains sphinx styles for Flask and Flask related +projects. To use this style in your Sphinx documentation, follow +this guide: + +1. put this folder as _themes into your docs folder. Alternatively + you can also use git submodules to check out the contents there. +2. add this to your conf.py: + + sys.path.append(os.path.abspath('_themes')) + html_theme_path = ['_themes'] + html_theme = 'flask' + +The following themes exist: + +- 'flask' - the standard flask documentation theme for large + projects +- 'flask_small' - small one-page theme. Intended to be used by + very small addon libraries for flask. + +The following options exist for the flask_small theme: + + [options] + index_logo = '' filename of a picture in _static + to be used as replacement for the + h1 in the index.rst file. + index_logo_height = 120px height of the index logo + github_fork = '' repository name on github for the + "fork me" badge diff --git a/doc/en/_themes/flask/layout.html b/doc/en/_themes/flask/layout.html new file mode 100644 index 000000000..19c43fbbe --- /dev/null +++ b/doc/en/_themes/flask/layout.html @@ -0,0 +1,24 @@ +{%- extends "basic/layout.html" %} +{%- block extrahead %} + {{ super() }} + {% if theme_touch_icon %} + + {% endif %} + +{% endblock %} +{%- block relbar2 %}{% endblock %} +{% block header %} + {{ super() }} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{%- block footer %} + + {% if pagename == 'index' %} +
+ {% endif %} +{%- endblock %} diff --git a/doc/en/_themes/flask/relations.html b/doc/en/_themes/flask/relations.html new file mode 100644 index 000000000..3bbcde85b --- /dev/null +++ b/doc/en/_themes/flask/relations.html @@ -0,0 +1,19 @@ +

Related Topics

+ diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t new file mode 100644 index 000000000..5906e751b --- /dev/null +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -0,0 +1,577 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + +{% set page_width = '940px' %} +{% set sidebar_width = '220px' %} + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + background-color: white; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + width: {{ page_width }}; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 {{ sidebar_width }}; +} + +div.sphinxsidebar { + width: {{ sidebar_width }}; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + width: {{ page_width }}; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +div.related { + display: none; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebar { + font-size: 14px; + line-height: 1.5; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0 0 20px 0; + margin: 0; + text-align: center; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: 'Garamond', 'Georgia', serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: 'Georgia', serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +{% if theme_index_logo %} +div.indexwrapper h1 { + text-indent: -999999px; + background: url({{ theme_index_logo }}) no-repeat center center; + height: {{ theme_index_logo_height }}; +} +{% endif %} +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #ddd; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition tt.xref, div.admonition a tt { + border-bottom: 1px solid #fafafa; +} + +dd div.admonition { + margin-left: -60px; + padding-left: 60px; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; + background: #fdfdfd; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td.label { + width: 0px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #eee; + padding: 7px 30px; + margin: 15px -30px; + line-height: 1.3em; +} + +dl pre, blockquote pre, li pre { + margin-left: -60px; + padding-left: 60px; +} + +dl dl pre { + margin-left: -90px; + padding-left: 90px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid white; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: white; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: white; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: white; + } + + div.sphinxsidebar a { + color: #aaa; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.related { + display: block; + margin: 0; + padding: 10px 0 20px 0; + } + + div.related ul, + div.related ul li { + margin: 0; + padding: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* scrollbars */ + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-button:start:decrement, +::-webkit-scrollbar-button:end:increment { + display: block; + height: 10px; +} + +::-webkit-scrollbar-button:vertical:increment { + background-color: #fff; +} + +::-webkit-scrollbar-track-piece { + background-color: #eee; + -webkit-border-radius: 3px; +} + +::-webkit-scrollbar-thumb:vertical { + height: 50px; + background-color: #ccc; + -webkit-border-radius: 3px; +} + +::-webkit-scrollbar-thumb:horizontal { + width: 50px; + background-color: #ccc; + -webkit-border-radius: 3px; +} + +/* misc. */ + +.revsys-inline { + display: none!important; +} \ No newline at end of file diff --git a/doc/en/_themes/flask/theme.conf b/doc/en/_themes/flask/theme.conf new file mode 100644 index 000000000..18c720f80 --- /dev/null +++ b/doc/en/_themes/flask/theme.conf @@ -0,0 +1,9 @@ +[theme] +inherit = basic +stylesheet = flasky.css +pygments_style = flask_theme_support.FlaskyStyle + +[options] +index_logo = '' +index_logo_height = 120px +touch_icon = diff --git a/doc/en/_themes/flask_small/layout.html b/doc/en/_themes/flask_small/layout.html new file mode 100644 index 000000000..aa1716aaf --- /dev/null +++ b/doc/en/_themes/flask_small/layout.html @@ -0,0 +1,22 @@ +{% extends "basic/layout.html" %} +{% block header %} + {{ super() }} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{% block footer %} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{# do not display relbars #} +{% block relbar1 %}{% endblock %} +{% block relbar2 %} + {% if theme_github_fork %} + Fork me on GitHub + {% endif %} +{% endblock %} +{% block sidebar1 %}{% endblock %} +{% block sidebar2 %}{% endblock %} diff --git a/doc/en/_themes/flask_small/static/flasky.css_t b/doc/en/_themes/flask_small/static/flasky.css_t new file mode 100644 index 000000000..fe2141c56 --- /dev/null +++ b/doc/en/_themes/flask_small/static/flasky.css_t @@ -0,0 +1,287 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- flasky theme based on nature theme. + * + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + color: #000; + background: white; + margin: 0; + padding: 0; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 40px auto 0 auto; + width: 700px; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 30px 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + text-align: right; + color: #888; + padding: 10px; + font-size: 14px; + width: 650px; + margin: 0 auto 40px auto; +} + +div.footer a { + color: #888; + text-decoration: underline; +} + +div.related { + line-height: 32px; + color: #888; +} + +div.related ul { + padding: 0 0 0 10px; +} + +div.related a { + color: #444; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body { + padding-bottom: 40px; /* saved for footer */ +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +{% if theme_index_logo %} +div.indexwrapper h1 { + text-indent: -999999px; + background: url({{ theme_index_logo }}) no-repeat center center; + height: {{ theme_index_logo_height }}; +} +{% endif %} + +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: white; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight{ + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.85em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td { + padding: 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +pre { + padding: 0; + margin: 15px -30px; + padding: 8px; + line-height: 1.3em; + padding: 7px 30px; + background: #eee; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; +} + +dl pre { + margin-left: -60px; + padding-left: 60px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; +} + +a:hover tt { + background: #EEE; +} diff --git a/doc/en/_themes/flask_small/theme.conf b/doc/en/_themes/flask_small/theme.conf new file mode 100644 index 000000000..542b46251 --- /dev/null +++ b/doc/en/_themes/flask_small/theme.conf @@ -0,0 +1,10 @@ +[theme] +inherit = basic +stylesheet = flasky.css +nosidebar = true +pygments_style = flask_theme_support.FlaskyStyle + +[options] +index_logo = '' +index_logo_height = 120px +github_fork = '' diff --git a/doc/en/_themes/flask_theme_support.py b/doc/en/_themes/flask_theme_support.py new file mode 100644 index 000000000..33f47449c --- /dev/null +++ b/doc/en/_themes/flask_theme_support.py @@ -0,0 +1,86 @@ +# flasky extensions. flasky pygments style based on tango style +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Number, Operator, Generic, Whitespace, Punctuation, Other, Literal + + +class FlaskyStyle(Style): + background_color = "#f8f8f8" + default_style = "" + + styles = { + # No corresponding class for the following: + #Text: "", # class: '' + Whitespace: "underline #f8f8f8", # class: 'w' + Error: "#a40000 border:#ef2929", # class: 'err' + Other: "#000000", # class 'x' + + Comment: "italic #8f5902", # class: 'c' + Comment.Preproc: "noitalic", # class: 'cp' + + Keyword: "bold #004461", # class: 'k' + Keyword.Constant: "bold #004461", # class: 'kc' + Keyword.Declaration: "bold #004461", # class: 'kd' + Keyword.Namespace: "bold #004461", # class: 'kn' + Keyword.Pseudo: "bold #004461", # class: 'kp' + Keyword.Reserved: "bold #004461", # class: 'kr' + Keyword.Type: "bold #004461", # class: 'kt' + + Operator: "#582800", # class: 'o' + Operator.Word: "bold #004461", # class: 'ow' - like keywords + + Punctuation: "bold #000000", # class: 'p' + + # because special names such as Name.Class, Name.Function, etc. + # are not recognized as such later in the parsing, we choose them + # to look the same as ordinary variables. + Name: "#000000", # class: 'n' + Name.Attribute: "#c4a000", # class: 'na' - to be revised + Name.Builtin: "#004461", # class: 'nb' + Name.Builtin.Pseudo: "#3465a4", # class: 'bp' + Name.Class: "#000000", # class: 'nc' - to be revised + Name.Constant: "#000000", # class: 'no' - to be revised + Name.Decorator: "#888", # class: 'nd' - to be revised + Name.Entity: "#ce5c00", # class: 'ni' + Name.Exception: "bold #cc0000", # class: 'ne' + Name.Function: "#000000", # class: 'nf' + Name.Property: "#000000", # class: 'py' + Name.Label: "#f57900", # class: 'nl' + Name.Namespace: "#000000", # class: 'nn' - to be revised + Name.Other: "#000000", # class: 'nx' + Name.Tag: "bold #004461", # class: 'nt' - like a keyword + Name.Variable: "#000000", # class: 'nv' - to be revised + Name.Variable.Class: "#000000", # class: 'vc' - to be revised + Name.Variable.Global: "#000000", # class: 'vg' - to be revised + Name.Variable.Instance: "#000000", # class: 'vi' - to be revised + + Number: "#990000", # class: 'm' + + Literal: "#000000", # class: 'l' + Literal.Date: "#000000", # class: 'ld' + + String: "#4e9a06", # class: 's' + String.Backtick: "#4e9a06", # class: 'sb' + String.Char: "#4e9a06", # class: 'sc' + String.Doc: "italic #8f5902", # class: 'sd' - like a comment + String.Double: "#4e9a06", # class: 's2' + String.Escape: "#4e9a06", # class: 'se' + String.Heredoc: "#4e9a06", # class: 'sh' + String.Interpol: "#4e9a06", # class: 'si' + String.Other: "#4e9a06", # class: 'sx' + String.Regex: "#4e9a06", # class: 'sr' + String.Single: "#4e9a06", # class: 's1' + String.Symbol: "#4e9a06", # class: 'ss' + + Generic: "#000000", # class: 'g' + Generic.Deleted: "#a40000", # class: 'gd' + Generic.Emph: "italic #000000", # class: 'ge' + Generic.Error: "#ef2929", # class: 'gr' + Generic.Heading: "bold #000080", # class: 'gh' + Generic.Inserted: "#00A000", # class: 'gi' + Generic.Output: "#888", # class: 'go' + Generic.Prompt: "#745334", # class: 'gp' + Generic.Strong: "bold #000000", # class: 'gs' + Generic.Subheading: "bold #800080", # class: 'gu' + Generic.Traceback: "bold #a40000", # class: 'gt' + } From e14e966da953bf6b73f71264b034069382e3da6f Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:08:56 +0100 Subject: [PATCH 03/25] doc: Activate "Flask" theme --- doc/en/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/en/conf.py b/doc/en/conf.py index 43e7fc79e..12daac69c 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -105,9 +105,12 @@ pygments_style = 'sphinx' # -- Options for HTML output --------------------------------------------------- +sys.path.append(os.path.abspath('_themes')) +html_theme_path = ['_themes'] + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinxdoc' +html_theme = 'flask' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From b4842b20f678055ee75d958e4402fe29af86ded6 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:37:32 +0100 Subject: [PATCH 04/25] doc: Added proper sidebar to index page --- doc/en/_templates/sidebarintro.html | 19 +++++++++++++++++++ doc/en/conf.py | 14 ++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 doc/en/_templates/sidebarintro.html diff --git a/doc/en/_templates/sidebarintro.html b/doc/en/_templates/sidebarintro.html new file mode 100644 index 000000000..05ee615f2 --- /dev/null +++ b/doc/en/_templates/sidebarintro.html @@ -0,0 +1,19 @@ +

About pytest

+

+ pytest is a mature full-featured Python testing tool that helps + you write better programs. +

+

Other Formats

+

+ You can download the documentation in other formats as well: +

+ +

Useful Links

+ diff --git a/doc/en/conf.py b/doc/en/conf.py index 12daac69c..a82043626 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -153,6 +153,20 @@ html_static_path = ['_static'] #html_sidebars = {} #html_sidebars = {'index': 'indexsidebar.html'} +html_sidebars = { + 'index': [ + 'sidebarintro.html', + 'sourcelink.html', + 'searchbox.html' + ], + '**': [ + 'localtoc.html', + 'relations.html', + 'sourcelink.html', + 'searchbox.html' + ] +} + # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} From 82f017edebf2ab1f59231a3097183188ebba4ce2 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:43:20 +0100 Subject: [PATCH 05/25] doc: Removed unused themes --- doc/en/_static/sphinxdoc.css | 339 ------------------ doc/en/_themes/flask_small/layout.html | 22 -- .../_themes/flask_small/static/flasky.css_t | 287 --------------- doc/en/_themes/flask_small/theme.conf | 10 - 4 files changed, 658 deletions(-) delete mode 100644 doc/en/_static/sphinxdoc.css delete mode 100644 doc/en/_themes/flask_small/layout.html delete mode 100644 doc/en/_themes/flask_small/static/flasky.css_t delete mode 100644 doc/en/_themes/flask_small/theme.conf diff --git a/doc/en/_static/sphinxdoc.css b/doc/en/_static/sphinxdoc.css deleted file mode 100644 index ab8ab5dce..000000000 --- a/doc/en/_static/sphinxdoc.css +++ /dev/null @@ -1,339 +0,0 @@ -/* - * sphinxdoc.css_t - * ~~~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; - font-size: 1.1em; - letter-spacing: -0.01em; - line-height: 150%; - text-align: center; - background-color: #BFD1D4; - color: black; - padding: 0; - border: 1px solid #aaa; - - margin: 0px 80px 0px 80px; - min-width: 740px; -} - -div.document { - background-color: white; - text-align: left; - background-image: url(contents.png); - background-repeat: repeat-x; -} - -div.bodywrapper { - margin: 0 240px 0 0; - border-right: 1px solid #ccc; -} - -div.body { - margin: 0; - padding: 0.5em 20px 20px 20px; -} - -div.related { - font-size: 0.8em; -} - -div.related ul { - background-image: url(navigation.png); - height: 2em; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -div.related ul li { - margin: 0; - padding: 0; - height: 2em; - float: left; -} - -div.related ul li.right { - float: right; - margin-right: 5px; -} - -div.related ul li a { - margin: 0; - padding: 0 5px 0 5px; - line-height: 1.75em; - color: #EE9816; -} - -div.related ul li a:hover { - color: #3CA8E7; -} - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - margin: 0; - padding: 0.5em 15px 15px 0; - width: 210px; - float: right; - font-size: 1em; - text-align: left; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1em 0 0.5em 0; - font-size: 1em; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border: 1px solid #86989B; - background-color: #AFC1C4; -} - -div.sphinxsidebar h3 a { - color: white; -} - -div.sphinxsidebar ul { - padding-left: 1.5em; - margin-top: 7px; - padding: 0; - line-height: 130%; -} - -div.sphinxsidebar ul ul { - margin-left: 20px; -} - -div.footer { - background-color: #E3EFF1; - color: #86989B; - padding: 3px 8px 3px 0; - clear: both; - font-size: 0.8em; - text-align: right; -} - -div.footer a { - color: #86989B; - text-decoration: underline; -} - -/* -- body styles ----------------------------------------------------------- */ - -p { - margin: 0.8em 0 0.5em 0; -} - -a { - color: #CA7900; - text-decoration: none; -} - -a:hover { - color: #2491CF; -} - -div.body a { - text-decoration: underline; -} - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - color: #11557C; -} - -h2 { - margin: 1.3em 0 0.2em 0; - font-size: 1.35em; - padding: 0; -} - -h3 { - margin: 1em 0 -0.3em 0; - font-size: 1.2em; -} - -div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { - color: black!important; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa!important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - -a.headerlink { - color: #c60f0f!important; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none!important; -} - -a.headerlink:hover { - background-color: #ccc; - color: white!important; -} - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -tt { - background-color: #f2f2f2; - border-bottom: 1px solid #ddd; - color: #333; -} - -tt.descname, tt.descclassname, tt.xref { - border: 0; -} - -hr { - border: 1px solid #abc; - margin: 2em; -} - -a tt { - border: 0; - color: #CA7900; -} - -a tt:hover { - color: #2491CF; -} - -pre { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid #ccc; - background-color: #f8f8f8; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: #f8f8f8; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid #ccc; -} - -div.topic { - background-color: #f8f8f8; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - -div.admonition, div.warning { - font-size: 0.9em; - margin: 1em 0 1em 0; - border: 1px solid #86989B; - background-color: #f7f7f7; - padding: 0; -} - -div.admonition p, div.warning p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} - -div.admonition pre, div.warning pre { - margin: 0.4em 1em 0.4em 1em; -} - -div.admonition p.admonition-title, -div.warning p.admonition-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border-bottom: 1px solid #86989B; - font-weight: bold; - background-color: #AFC1C4; -} - -div.warning { - border: 1px solid #940000; -} - -div.warning p.admonition-title { - background-color: #CF0000; - border-bottom-color: #940000; -} - -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #ccc; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} diff --git a/doc/en/_themes/flask_small/layout.html b/doc/en/_themes/flask_small/layout.html deleted file mode 100644 index aa1716aaf..000000000 --- a/doc/en/_themes/flask_small/layout.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "basic/layout.html" %} -{% block header %} - {{ super() }} - {% if pagename == 'index' %} -
- {% endif %} -{% endblock %} -{% block footer %} - {% if pagename == 'index' %} -
- {% endif %} -{% endblock %} -{# do not display relbars #} -{% block relbar1 %}{% endblock %} -{% block relbar2 %} - {% if theme_github_fork %} - Fork me on GitHub - {% endif %} -{% endblock %} -{% block sidebar1 %}{% endblock %} -{% block sidebar2 %}{% endblock %} diff --git a/doc/en/_themes/flask_small/static/flasky.css_t b/doc/en/_themes/flask_small/static/flasky.css_t deleted file mode 100644 index fe2141c56..000000000 --- a/doc/en/_themes/flask_small/static/flasky.css_t +++ /dev/null @@ -1,287 +0,0 @@ -/* - * flasky.css_t - * ~~~~~~~~~~~~ - * - * Sphinx stylesheet -- flasky theme based on nature theme. - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Georgia', serif; - font-size: 17px; - color: #000; - background: white; - margin: 0; - padding: 0; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 40px auto 0 auto; - width: 700px; -} - -hr { - border: 1px solid #B1B4B6; -} - -div.body { - background-color: #ffffff; - color: #3E4349; - padding: 0 30px 30px 30px; -} - -img.floatingflask { - padding: 0 0 10px 10px; - float: right; -} - -div.footer { - text-align: right; - color: #888; - padding: 10px; - font-size: 14px; - width: 650px; - margin: 0 auto 40px auto; -} - -div.footer a { - color: #888; - text-decoration: underline; -} - -div.related { - line-height: 32px; - color: #888; -} - -div.related ul { - padding: 0 0 0 10px; -} - -div.related a { - color: #444; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #004B6B; - text-decoration: underline; -} - -a:hover { - color: #6D4100; - text-decoration: underline; -} - -div.body { - padding-bottom: 40px; /* saved for footer */ -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - margin: 30px 0px 10px 0px; - padding: 0; -} - -{% if theme_index_logo %} -div.indexwrapper h1 { - text-indent: -999999px; - background: url({{ theme_index_logo }}) no-repeat center center; - height: {{ theme_index_logo_height }}; -} -{% endif %} - -div.body h2 { font-size: 180%; } -div.body h3 { font-size: 150%; } -div.body h4 { font-size: 130%; } -div.body h5 { font-size: 100%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: white; - padding: 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - color: #444; - background: #eaeaea; -} - -div.body p, div.body dd, div.body li { - line-height: 1.4em; -} - -div.admonition { - background: #fafafa; - margin: 20px -30px; - padding: 10px 30px; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - font-size: 24px; - margin: 0 0 10px 0; - padding: 0; - line-height: 1; -} - -div.admonition p.last { - margin-bottom: 0; -} - -div.highlight{ - background-color: white; -} - -dt:target, .highlight { - background: #FAF3E8; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre, tt { - font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.85em; -} - -img.screenshot { -} - -tt.descname, tt.descclassname { - font-size: 0.95em; -} - -tt.descname { - padding-right: 0.08em; -} - -img.screenshot { - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils { - border: 1px solid #888; - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils td, table.docutils th { - border: 1px solid #888; - padding: 0.25em 0.7em; -} - -table.field-list, table.footnote { - border: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -table.footnote { - margin: 15px 0; - width: 100%; - border: 1px solid #eee; -} - -table.field-list th { - padding: 0 0.8em 0 0; -} - -table.field-list td { - padding: 0; -} - -table.footnote td { - padding: 0.5em; -} - -dl { - margin: 0; - padding: 0; -} - -dl dd { - margin-left: 30px; -} - -pre { - padding: 0; - margin: 15px -30px; - padding: 8px; - line-height: 1.3em; - padding: 7px 30px; - background: #eee; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; -} - -dl pre { - margin-left: -60px; - padding-left: 60px; -} - -tt { - background-color: #ecf0f3; - color: #222; - /* padding: 1px 2px; */ -} - -tt.xref, a tt { - background-color: #FBFBFB; -} - -a:hover tt { - background: #EEE; -} diff --git a/doc/en/_themes/flask_small/theme.conf b/doc/en/_themes/flask_small/theme.conf deleted file mode 100644 index 542b46251..000000000 --- a/doc/en/_themes/flask_small/theme.conf +++ /dev/null @@ -1,10 +0,0 @@ -[theme] -inherit = basic -stylesheet = flasky.css -nosidebar = true -pygments_style = flask_theme_support.FlaskyStyle - -[options] -index_logo = '' -index_logo_height = 120px -github_fork = '' From 25a45f6bf7993b7aa9debe5f6c3eb7a1530d7b23 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:43:35 +0100 Subject: [PATCH 06/25] doc: Moved links section to its own file --- doc/en/_templates/links.html | 7 +++++++ doc/en/_templates/sidebarintro.html | 7 ------- doc/en/conf.py | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 doc/en/_templates/links.html diff --git a/doc/en/_templates/links.html b/doc/en/_templates/links.html new file mode 100644 index 000000000..19e451fe0 --- /dev/null +++ b/doc/en/_templates/links.html @@ -0,0 +1,7 @@ +

Useful Links

+ diff --git a/doc/en/_templates/sidebarintro.html b/doc/en/_templates/sidebarintro.html index 05ee615f2..167dc27d1 100644 --- a/doc/en/_templates/sidebarintro.html +++ b/doc/en/_templates/sidebarintro.html @@ -10,10 +10,3 @@ -

Useful Links

- diff --git a/doc/en/conf.py b/doc/en/conf.py index a82043626..3e5f2e482 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -156,6 +156,7 @@ html_static_path = ['_static'] html_sidebars = { 'index': [ 'sidebarintro.html', + 'links.html', 'sourcelink.html', 'searchbox.html' ], From 555999397be38cc90fe16eb9821dcb3768963fc3 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:49:44 +0100 Subject: [PATCH 07/25] doc: Moved searchbox into searchbox.html file --- doc/en/_templates/localtoc.html | 13 ------------- doc/en/_templates/searchbox.html | 11 +++++++++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/en/_templates/localtoc.html b/doc/en/_templates/localtoc.html index 25d56cad0..83af3aa88 100644 --- a/doc/en/_templates/localtoc.html +++ b/doc/en/_templates/localtoc.html @@ -1,16 +1,3 @@ - -{%- if pagename != "search" %} - - -{%- endif %} -

quicklinks

diff --git a/doc/en/_templates/searchbox.html b/doc/en/_templates/searchbox.html index e69de29bb..4fd92f369 100644 --- a/doc/en/_templates/searchbox.html +++ b/doc/en/_templates/searchbox.html @@ -0,0 +1,11 @@ +{%- if pagename != "search" %} + + +{%- endif %} From 041a12fdf2dc96832827654c52f2f9592962d92f Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:55:09 +0100 Subject: [PATCH 08/25] doc: Moved PDF documentation link into links.html --- doc/en/_templates/links.html | 1 + doc/en/_templates/sidebarintro.html | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/en/_templates/links.html b/doc/en/_templates/links.html index 19e451fe0..1ccebf300 100644 --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -4,4 +4,5 @@
  • pytest @ PyPI
  • pytest @ Bitbucket
  • Issue Tracker
  • +
  • PDF Documentation diff --git a/doc/en/_templates/sidebarintro.html b/doc/en/_templates/sidebarintro.html index 167dc27d1..ae860c172 100644 --- a/doc/en/_templates/sidebarintro.html +++ b/doc/en/_templates/sidebarintro.html @@ -3,10 +3,3 @@ pytest is a mature full-featured Python testing tool that helps you write better programs.

    -

    Other Formats

    -

    - You can download the documentation in other formats as well: -

    - From 33f1df2369f8092b7f20862429928dcbbb39d034 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:56:13 +0100 Subject: [PATCH 09/25] doc: Removed overwritten searchbox template The original one works quite well... --- doc/en/_templates/searchbox.html | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 doc/en/_templates/searchbox.html diff --git a/doc/en/_templates/searchbox.html b/doc/en/_templates/searchbox.html deleted file mode 100644 index 4fd92f369..000000000 --- a/doc/en/_templates/searchbox.html +++ /dev/null @@ -1,11 +0,0 @@ -{%- if pagename != "search" %} - - -{%- endif %} From 542b87fed3917a5d10778ae4bc9055e539e3538e Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 18:58:16 +0100 Subject: [PATCH 10/25] doc: Added "Useful Links" section to all sidebars --- doc/en/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/en/conf.py b/doc/en/conf.py index 3e5f2e482..a817a01b9 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -163,6 +163,7 @@ html_sidebars = { '**': [ 'localtoc.html', 'relations.html', + 'links.html', 'sourcelink.html', 'searchbox.html' ] From 0f6bb3b3ef5f1009cb87529fb7b356a51f4089c1 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:03:25 +0100 Subject: [PATCH 11/25] doc: Adjusted sidebar link --- doc/en/_templates/links.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/_templates/links.html b/doc/en/_templates/links.html index 1ccebf300..d739b1504 100644 --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -1,6 +1,6 @@

    Useful Links

      -
    • The pytest Website
    • +
    • The pytest Website
    • pytest @ PyPI
    • pytest @ Bitbucket
    • Issue Tracker
    • From d1faccb061240251d39d48a9253b401cb4784296 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:08:26 +0100 Subject: [PATCH 12/25] CHANGELOG: Removed trailing whitespace --- CHANGELOG | 120 +++++++++++++++++++++++++++--------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1b6db9259..1ed8466a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,28 +1,28 @@ 2.5.0 ----------------------------------- -- dropped python2.5 from automated release testing of pytest itself - which means it's probably going to break soon (but still works +- dropped python2.5 from automated release testing of pytest itself + which means it's probably going to break soon (but still works with this release we believe). - simplified and fixed implementation for calling finalizers when - parametrized fixtures or function arguments are involved. finalization + parametrized fixtures or function arguments are involved. finalization is now performed lazily at setup time instead of in the "teardown phase". - While this might sound odd at first, it helps to ensure that we are + While this might sound odd at first, it helps to ensure that we are correctly handling setup/teardown even in complex code. User-level code should not be affected unless it's implementing the pytest_runtest_teardown hook and expecting certain fixture instances are torn down within (very unlikely and would have been unreliable anyway). -- PR90: add --color=yes|no|auto option to force terminal coloring +- PR90: add --color=yes|no|auto option to force terminal coloring mode ("auto" is default). Thanks Marc Abramowitz. - fix issue319 - correctly show unicode in assertion errors. Many thanks to Floris Bruynooghe for the complete PR. Also means we depend on py>=1.4.19 now. -- fix issue396 - correctly sort and finalize class-scoped parametrized - tests independently from number of methods on the class. +- fix issue396 - correctly sort and finalize class-scoped parametrized + tests independently from number of methods on the class. - refix issue323 in a better way -- parametrization should now never cause Runtime Recursion errors because the underlying algorithm @@ -31,18 +31,18 @@ to problems for more than >966 non-function scoped parameters). - fix issue290 - there is preliminary support now for parametrizing - with repeated same values (sometimes useful to to test if calling + with repeated same values (sometimes useful to to test if calling a second time works as with the first time). - close issue240 - document precisely how pytest module importing - works, discuss the two common test directory layouts, and how it + works, discuss the two common test directory layouts, and how it interacts with PEP420-namespace packages. - fix issue246 fix finalizer order to be LIFO on independent fixtures - depending on a parametrized higher-than-function scoped fixture. + depending on a parametrized higher-than-function scoped fixture. (was quite some effort so please bear with the complexity of this sentence :) Thanks Ralph Schmitt for the precise failure example. - + - fix issue244 by implementing special index for parameters to only use indices for paramentrized test ids @@ -60,9 +60,9 @@ filtering with simple strings that are not valid python expressions. Examples: "-k 1.3" matches all tests parametrized with 1.3. "-k None" filters all tests that have "None" in their name - and conversely "-k 'not None'". + and conversely "-k 'not None'". Previously these examples would raise syntax errors. - + - fix issue384 by removing the trial support code since the unittest compat enhancements allow trial to handle it on its own @@ -70,7 +70,7 @@ - don't hide an ImportError when importing a plugin produces one. fixes issue375. -- fix issue275 - allow usefixtures and autouse fixtures +- fix issue275 - allow usefixtures and autouse fixtures for running doctest text files. - fix issue380 by making --resultlog only rely on longrepr instead @@ -96,20 +96,20 @@ (it already did neutralize pytest.mark.xfail markers) - refine pytest / pkg_resources interactions: The AssertionRewritingHook - PEP302 compliant loader now registers itself with setuptools/pkg_resources + PEP302 compliant loader now registers itself with setuptools/pkg_resources properly so that the pkg_resources.resource_stream method works properly. Fixes issue366. Thanks for the investigations and full PR to Jason R. Coombs. - pytestconfig fixture is now session-scoped as it is the same object during the - whole test run. Fixes issue370. + whole test run. Fixes issue370. - avoid one surprising case of marker malfunction/confusion:: - + @pytest.mark.some(lambda arg: ...) def test_function(): - would not work correctly because pytest assumes @pytest.mark.some - gets a function to be decorated already. We now at least detect if this + would not work correctly because pytest assumes @pytest.mark.some + gets a function to be decorated already. We now at least detect if this arg is an lambda and thus the example will work. Thanks Alex Gaynor for bringing it up. @@ -120,11 +120,11 @@ although it's not needed by pytest itself atm. Also fix caching. Fixes issue376. -- fix issue221 - handle importing of namespace-package with no +- fix issue221 - handle importing of namespace-package with no __init__.py properly. - refactor internal FixtureRequest handling to avoid monkeypatching. - One of the positive user-facing effects is that the "request" object + One of the positive user-facing effects is that the "request" object can now be used in closures. - fixed version comparison in pytest.importskip(modname, minverstring) @@ -160,9 +160,9 @@ Changes between 2.4.1 and 2.4.2 - remove attempt to "dup" stdout at startup as it's icky. the normal capturing should catch enough possibilities - of tests messing up standard FDs. + of tests messing up standard FDs. -- add pluginmanager.do_configure(config) as a link to +- add pluginmanager.do_configure(config) as a link to config.do_configure() for plugin-compatibility Changes between 2.4.0 and 2.4.1 @@ -172,7 +172,7 @@ Changes between 2.4.0 and 2.4.1 "type" keyword should also be converted to the respective types. thanks Floris Bruynooghe, @dnozay. (fixes issue360 and issue362) -- fix dotted filename completion when using argcomplete +- fix dotted filename completion when using argcomplete thanks Anthon van der Neuth. (fixes issue361) - fix regression when a 1-tuple ("arg",) is used for specifying @@ -228,12 +228,12 @@ new features: - make "import pdb ; pdb.set_trace()" work natively wrt capturing (no "-s" needed anymore), making ``pytest.set_trace()`` a mere shortcut. -- fix issue181: --pdb now also works on collect errors (and - on internal errors) . This was implemented by a slight internal - refactoring and the introduction of a new hook +- fix issue181: --pdb now also works on collect errors (and + on internal errors) . This was implemented by a slight internal + refactoring and the introduction of a new hook ``pytest_exception_interact`` hook (see next item). -- fix issue341: introduce new experimental hook for IDEs/terminals to +- fix issue341: introduce new experimental hook for IDEs/terminals to intercept debugging: ``pytest_exception_interact(node, call, report)``. - new monkeypatch.setattr() variant to provide a shorter @@ -251,7 +251,7 @@ new features: phase of a node. - simplify pytest.mark.parametrize() signature: allow to pass a - CSV-separated string to specify argnames. For example: + CSV-separated string to specify argnames. For example: ``pytest.mark.parametrize("input,expected", [(1,2), (2,3)])`` works as well as the previous: ``pytest.mark.parametrize(("input", "expected"), ...)``. @@ -276,10 +276,10 @@ new features: Bug fixes: -- fix issue358 - capturing options are now parsed more properly +- fix issue358 - capturing options are now parsed more properly by using a new parser.parse_known_args method. -- pytest now uses argparse instead of optparse (thanks Anthon) which +- pytest now uses argparse instead of optparse (thanks Anthon) which means that "argparse" is added as a dependency if installing into python2.6 environments or below. @@ -320,7 +320,7 @@ Bug fixes: - fix issue323 - sorting of many module-scoped arg parametrizations - make sessionfinish hooks execute with the same cwd-context as at - session start (helps fix plugin behaviour which write output files + session start (helps fix plugin behaviour which write output files with relative path such as pytest-cov) - fix issue316 - properly reference collection hooks in docs @@ -328,7 +328,7 @@ Bug fixes: - fix issue 306 - cleanup of -k/-m options to only match markers/test names/keywords respectively. Thanks Wouter van Ackooy. -- improved doctest counting for doctests in python modules -- +- improved doctest counting for doctests in python modules -- files without any doctest items will not show up anymore and doctest examples are counted as separate test items. thanks Danilo Bellini. @@ -338,7 +338,7 @@ Bug fixes: mode. Thanks Jason R. Coombs. - fix junitxml generation when test output contains control characters, - addressing issue267, thanks Jaap Broekhuizen + addressing issue267, thanks Jaap Broekhuizen - fix issue338: honor --tb style for setup/teardown errors as well. Thanks Maho. @@ -347,7 +347,7 @@ Bug fixes: - better parametrize error messages, thanks Brianna Laugher - pytest_terminal_summary(terminalreporter) hooks can now use - ".section(title)" and ".line(msg)" methods to print extra + ".section(title)" and ".line(msg)" methods to print extra information at the end of a test run. Changes between 2.3.4 and 2.3.5 @@ -401,7 +401,7 @@ Changes between 2.3.4 and 2.3.5 - fix bug where using capsys with pytest.set_trace() in a test function would break when looking at capsys.readouterr() -- allow to specify prefixes starting with "_" when +- allow to specify prefixes starting with "_" when customizing python_functions test discovery. (thanks Graham Horler) - improve PYTEST_DEBUG tracing output by puting @@ -418,7 +418,7 @@ Changes between 2.3.4 and 2.3.5 Changes between 2.3.3 and 2.3.4 ----------------------------------- -- yielded test functions will now have autouse-fixtures active but +- yielded test functions will now have autouse-fixtures active but cannot accept fixtures as funcargs - it's anyway recommended to rather use the post-2.0 parametrize features instead of yield, see: http://pytest.org/latest/example/parametrize.html @@ -433,7 +433,7 @@ Changes between 2.3.3 and 2.3.4 can write: -k "name1 or name2" etc. This is a slight incompatibility if you used special syntax like "TestClass.test_method" which you now need to write as -k "TestClass and test_method" to match a certain - method in a certain test class. + method in a certain test class. Changes between 2.3.2 and 2.3.3 ----------------------------------- @@ -470,7 +470,7 @@ Changes between 2.3.2 and 2.3.3 Changes between 2.3.1 and 2.3.2 ----------------------------------- -- fix issue208 and fix issue29 use new py version to avoid long pauses +- fix issue208 and fix issue29 use new py version to avoid long pauses when printing tracebacks in long modules - fix issue205 - conftests in subdirs customizing @@ -554,7 +554,7 @@ Changes between 2.2.4 and 2.3.0 - pluginmanager.register(...) now raises ValueError if the plugin has been already registered or the name is taken -- fix issue159: improve http://pytest.org/latest/faq.html +- fix issue159: improve http://pytest.org/latest/faq.html especially with respect to the "magic" history, also mention pytest-django, trial and unittest integration. @@ -585,7 +585,7 @@ Changes between 2.2.4 and 2.3.0 you can use startdir.bestrelpath(yourpath) to show nice relative path - - allow plugins to implement both pytest_report_header and + - allow plugins to implement both pytest_report_header and pytest_sessionstart (sessionstart is invoked first). - don't show deselected reason line if there is none @@ -619,7 +619,7 @@ Changes between 2.2.1 and 2.2.2 - fix issue101: wrong args to unittest.TestCase test function now produce better output -- fix issue102: report more useful errors and hints for when a +- fix issue102: report more useful errors and hints for when a test directory was renamed and some pyc/__pycache__ remain - fix issue106: allow parametrize to be applied multiple times e.g. from module, class and at function level. @@ -638,7 +638,7 @@ Changes between 2.2.0 and 2.2.1 ---------------------------------------- - fix issue99 (in pytest and py) internallerrors with resultlog now - produce better output - fixed by normalizing pytest_internalerror + produce better output - fixed by normalizing pytest_internalerror input arguments. - fix issue97 / traceback issues (in pytest and py) improve traceback output in conjunction with jinja2 and cython which hack tracebacks @@ -646,7 +646,7 @@ Changes between 2.2.0 and 2.2.1 the final test in a test node will now run its teardown directly instead of waiting for the end of the session. Thanks Dave Hunt for the good reporting and feedback. The pytest_runtest_protocol as well - as the pytest_runtest_teardown hooks now have "nextitem" available + as the pytest_runtest_teardown hooks now have "nextitem" available which will be None indicating the end of the test run. - fix collection crash due to unknown-source collected items, thanks to Ralf Schmitt (fixed by depending on a more recent pylib) @@ -656,15 +656,15 @@ Changes between 2.1.3 and 2.2.0 - fix issue90: introduce eager tearing down of test items so that teardown function are called earlier. -- add an all-powerful metafunc.parametrize function which allows to +- add an all-powerful metafunc.parametrize function which allows to parametrize test function arguments in multiple steps and therefore - from indepdenent plugins and palces. + from indepdenent plugins and palces. - add a @pytest.mark.parametrize helper which allows to easily call a test function with different argument values -- Add examples to the "parametrize" example page, including a quick port +- Add examples to the "parametrize" example page, including a quick port of Test scenarios and the new parametrize function and decorator. - introduce registration for "pytest.mark.*" helpers via ini-files - or through plugin hooks. Also introduce a "--strict" option which + or through plugin hooks. Also introduce a "--strict" option which will treat unregistered markers as errors allowing to avoid typos and maintain a well described set of markers for your test suite. See exaples at http://pytest.org/latest/mark.html @@ -673,12 +673,12 @@ Changes between 2.1.3 and 2.2.0 (this is a stricter and more predictable version of '-k' in that "-m" only matches complete markers and has more obvious rules for and/or semantics. -- new feature to help optimizing the speed of your tests: - --durations=N option for displaying N slowest test calls +- new feature to help optimizing the speed of your tests: + --durations=N option for displaying N slowest test calls and setup/teardown methods. - fix issue87: --pastebin now works with python3 - fix issue89: --pdb with unexpected exceptions in doctest work more sensibly -- fix and cleanup pytest's own test suite to not leak FDs +- fix and cleanup pytest's own test suite to not leak FDs - fix issue83: link to generated funcarg list - fix issue74: pyarg module names are now checked against imp.find_module false positives - fix compatibility with twisted/trial-11.1.0 use cases @@ -770,17 +770,17 @@ Changes between 2.0.1 and 2.0.2 Also you can now access module globals from xfail/skipif expressions so that this for example works now:: - + import pytest import mymodule @pytest.mark.skipif("mymodule.__version__[0] == "1") def test_function(): pass - This will not run the test function if the module's version string + This will not run the test function if the module's version string does not start with a "1". Note that specifying a string instead - of a boolean expressions allows py.test to report meaningful information - when summarizing a test run as to what conditions lead to skipping + of a boolean expressions allows py.test to report meaningful information + when summarizing a test run as to what conditions lead to skipping (or xfail-ing) tests. - fix issue28 - setup_method and pytest_generate_tests work together @@ -803,7 +803,7 @@ Changes between 2.0.1 and 2.0.2 - fixed typos in the docs (thanks Victor Garcia, Brianna Laugher) and particular thanks to Laura Creighton who also revieved parts of the documentation. -- fix slighly wrong output of verbose progress reporting for classes +- fix slighly wrong output of verbose progress reporting for classes (thanks Amaury) - more precise (avoiding of) deprecation warnings for node.Class|Function accesses @@ -819,7 +819,7 @@ Changes between 2.0.0 and 2.0.1 - allow to omit "()" in test ids to allow for uniform test ids as produced by Alfredo's nice pytest.vim plugin. - fix issue12 - show plugin versions with "--version" and - "--traceconfig" and also document how to add extra information + "--traceconfig" and also document how to add extra information to reporting test header - fix issue17 (import-* reporting issue on python3) by requiring py>1.4.0 (1.4.1 is going to include it) @@ -849,13 +849,13 @@ Changes between 2.0.0 and 2.0.1 - fix issue14: no logging errors at process exit - refinements to "collecting" output on non-ttys - refine internal plugin registration and --traceconfig output -- introduce a mechanism to prevent/unregister plugins from the +- introduce a mechanism to prevent/unregister plugins from the command line, see http://pytest.org/plugins.html#cmdunregister - activate resultlog plugin by default - fix regression wrt yielded tests which due to the - collection-before-running semantics were not + collection-before-running semantics were not setup as with pytest 1.3.4. Note, however, that - the recommended and much cleaner way to do test + the recommended and much cleaner way to do test parametraization remains the "pytest_generate_tests" mechanism, see the docs. From 6f54a6be1e0dd5603faf41f7945c269d656256b3 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:10:24 +0100 Subject: [PATCH 13/25] CHANGELOG: Simplified section headings --- CHANGELOG | 86 +++++++++++++++++++++++++++---------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1ed8466a0..0c5616923 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2.5.0 +v2.5.0 ----------------------------------- - dropped python2.5 from automated release testing of pytest itself @@ -134,7 +134,7 @@ - fix verbose reporting for @mock'd test functions -Changes between 2.4.1 and 2.4.2 +v2.4.2 ----------------------------------- - on Windows require colorama and a newer py lib so that py.io.TerminalWriter() @@ -165,7 +165,7 @@ Changes between 2.4.1 and 2.4.2 - add pluginmanager.do_configure(config) as a link to config.do_configure() for plugin-compatibility -Changes between 2.4.0 and 2.4.1 +v2.4.1 ----------------------------------- - When using parser.addoption() unicode arguments to the @@ -181,7 +181,7 @@ Changes between 2.4.0 and 2.4.1 - merge doc typo fixes, thanks Andy Dirnberger -Changes between 2.3.5 and 2.4 +v2.4 ----------------------------------- known incompatibilities: @@ -350,7 +350,7 @@ Bug fixes: ".section(title)" and ".line(msg)" methods to print extra information at the end of a test run. -Changes between 2.3.4 and 2.3.5 +v2.3.5 ----------------------------------- - fix issue169: respect --tb=style with setup/teardown errors as well. @@ -415,7 +415,7 @@ Changes between 2.3.4 and 2.3.5 - fix issue266 - accept unicode in MarkEvaluator expressions -Changes between 2.3.3 and 2.3.4 +v2.3.4 ----------------------------------- - yielded test functions will now have autouse-fixtures active but @@ -435,7 +435,7 @@ Changes between 2.3.3 and 2.3.4 need to write as -k "TestClass and test_method" to match a certain method in a certain test class. -Changes between 2.3.2 and 2.3.3 +v2.3.3 ----------------------------------- - fix issue214 - parse modules that contain special objects like e. g. @@ -467,7 +467,7 @@ Changes between 2.3.2 and 2.3.3 - fix issue127 - improve documentation for pytest_addoption() and add a ``config.getoption(name)`` helper function for consistency. -Changes between 2.3.1 and 2.3.2 +v2.3.2 ----------------------------------- - fix issue208 and fix issue29 use new py version to avoid long pauses @@ -500,7 +500,7 @@ Changes between 2.3.1 and 2.3.2 - add tox.ini to pytest distribution so that ignore-dirs and others config bits are properly distributed for maintainers who run pytest-own tests -Changes between 2.3.0 and 2.3.1 +v2.3.1 ----------------------------------- - fix issue202 - fix regression: using "self" from fixture functions now @@ -513,7 +513,7 @@ Changes between 2.3.0 and 2.3.1 - link to web pages from --markers output which provides help for pytest.mark.* usage. -Changes between 2.2.4 and 2.3.0 +v2.3.0 ----------------------------------- - fix issue202 - better automatic names for parametrized test functions @@ -592,7 +592,7 @@ Changes between 2.2.4 and 2.3.0 - py.test -vv will show all of assert comparisations instead of truncating -Changes between 2.2.3 and 2.2.4 +v2.2.4 ----------------------------------- - fix error message for rewritten assertions involving the % operator @@ -609,12 +609,12 @@ Changes between 2.2.3 and 2.2.4 - fix issue #144: better mangle test ids to junitxml classnames - upgrade distribute_setup.py to 0.6.27 -Changes between 2.2.2 and 2.2.3 +v2.2.3 ---------------------------------------- - fix uploaded package to only include neccesary files -Changes between 2.2.1 and 2.2.2 +v2.2.2 ---------------------------------------- - fix issue101: wrong args to unittest.TestCase test function now @@ -634,7 +634,7 @@ Changes between 2.2.1 and 2.2.2 - allow adding of attributes to test reports such that it also works with distributed testing (no upgrade of pytest-xdist needed) -Changes between 2.2.0 and 2.2.1 +v2.2.1 ---------------------------------------- - fix issue99 (in pytest and py) internallerrors with resultlog now @@ -651,7 +651,7 @@ Changes between 2.2.0 and 2.2.1 - fix collection crash due to unknown-source collected items, thanks to Ralf Schmitt (fixed by depending on a more recent pylib) -Changes between 2.1.3 and 2.2.0 +v2.2.0 ---------------------------------------- - fix issue90: introduce eager tearing down of test items so that @@ -686,7 +686,7 @@ Changes between 2.1.3 and 2.2.0 - simplify junitxml output code by relying on py.xml - add support for skip properties on unittest classes and functions -Changes between 2.1.2 and 2.1.3 +v2.1.3 ---------------------------------------- - fix issue79: assertion rewriting failed on some comparisons in boolops @@ -695,7 +695,7 @@ Changes between 2.1.2 and 2.1.3 - fix issue75 / skipping test failure on jython - fix issue77 / Allow assertrepr_compare hook to apply to a subset of tests -Changes between 2.1.1 and 2.1.2 +v2.1.2 ---------------------------------------- - fix assertion rewriting on files with windows newlines on some Python versions @@ -705,7 +705,7 @@ Changes between 2.1.1 and 2.1.2 - fix issue66: use different assertion rewriting caches when the -O option is passed - don't try assertion rewriting on Jython, use reinterp -Changes between 2.1.0 and 2.1.1 +v2.1.1 ---------------------------------------------- - fix issue64 / pytest.set_trace now works within pytest_generate_tests hooks @@ -718,7 +718,7 @@ Changes between 2.1.0 and 2.1.1 - fix issue61: assertion rewriting on boolean operations with 3 or more operands - you can now build a man page with "cd doc ; make man" -Changes between 2.0.3 and 2.1.0.DEV +v2.1.0 ---------------------------------------------- - fix issue53 call nosestyle setup functions with correct ordering @@ -738,7 +738,7 @@ Changes between 2.0.3 and 2.1.0.DEV - report KeyboardInterrupt even if interrupted during session startup - fix issue 35 - provide PDF doc version and download link from index page -Changes between 2.0.2 and 2.0.3 +v2.0.3 ---------------------------------------------- - fix issue38: nicer tracebacks on calls to hooks, particularly early @@ -758,7 +758,7 @@ Changes between 2.0.2 and 2.0.3 - fix issue37: avoid invalid characters in junitxml's output -Changes between 2.0.1 and 2.0.2 +v2.0.2 ---------------------------------------------- - tackle issue32 - speed up test runs of very quick test functions @@ -810,7 +810,7 @@ Changes between 2.0.1 and 2.0.2 - avoid std unittest assertion helper code in tracebacks (thanks Ronny) -Changes between 2.0.0 and 2.0.1 +v2.0.1 ---------------------------------------------- - refine and unify initial capturing so that it works nicely @@ -859,7 +859,7 @@ Changes between 2.0.0 and 2.0.1 parametraization remains the "pytest_generate_tests" mechanism, see the docs. -Changes between 1.3.4 and 2.0.0 +v2.0.0 ---------------------------------------------- - pytest-2.0 is now its own package and depends on pylib-2.0 @@ -904,7 +904,7 @@ Changes between 1.3.4 and 2.0.0 - add ability to use "class" level for cached_setup helper - fix strangeness: mark.* objects are now immutable, create new instances -Changes between 1.3.3 and 1.3.4 +v1.3.4 ---------------------------------------------- - fix issue111: improve install documentation for windows @@ -913,7 +913,7 @@ Changes between 1.3.3 and 1.3.4 - fix issue115: unify internal exception passthrough/catching/GeneratorExit - fix issue118: new --tb=native for presenting cpython-standard exceptions -Changes between 1.3.2 and 1.3.3 +v1.3.3 ---------------------------------------------- - fix issue113: assertion representation problem with triple-quoted strings @@ -928,7 +928,7 @@ Changes between 1.3.2 and 1.3.3 (thanks Armin Ronacher for reporting) - remove trailing whitespace in all py/text distribution files -Changes between 1.3.1 and 1.3.2 +v1.3.2 ---------------------------------------------- New features @@ -1003,7 +1003,7 @@ Bug fixes / Maintenance - fix homedir detection on Windows - ship distribute_setup.py version 0.6.13 -Changes between 1.3.0 and 1.3.1 +v1.3.1 --------------------------------------------- New features @@ -1075,7 +1075,7 @@ Fixes / Maintenance (and internally be more careful when presenting unexpected byte sequences) -Changes between 1.2.1 and 1.3.0 +v1.3.0 --------------------------------------------- - deprecate --report option in favour of a new shorter and easier to @@ -1140,7 +1140,7 @@ Changes between 1.2.1 and 1.3.0 - added links to the new capturelog and coverage plugins -Changes between 1.2.1 and 1.2.0 +v1.2.0 --------------------------------------------- - refined usage and options for "py.cleanup":: @@ -1179,7 +1179,7 @@ Changes between 1.2.1 and 1.2.0 - fix plugin links -Changes between 1.2 and 1.1.1 +v1.1.1 --------------------------------------------- - moved dist/looponfailing from py.test core into a new @@ -1263,7 +1263,7 @@ Changes between 1.2 and 1.1.1 - fix docs, fix internal bin/ script generation -Changes between 1.1.1 and 1.1.0 +v1.1.0 --------------------------------------------- - introduce automatic plugin registration via 'pytest11' @@ -1282,7 +1282,7 @@ Changes between 1.1.1 and 1.1.0 - try harder to have deprecation warnings for py.compat.* accesses report a correct location -Changes between 1.1.0 and 1.0.2 +v1.0.2 --------------------------------------------- * adjust and improve docs @@ -1367,7 +1367,7 @@ Changes between 1.1.0 and 1.0.2 * simplified internal localpath implementation -Changes between 1.0.1 and 1.0.2 +v1.0.2 ------------------------------------------- * fixing packaging issues, triggered by fedora redhat packaging, @@ -1375,7 +1375,7 @@ Changes between 1.0.1 and 1.0.2 * added a documentation link to the new django plugin. -Changes between 1.0.0 and 1.0.1 +v1.0.1 ------------------------------------------- * added a 'pytest_nose' plugin which handles nose.SkipTest, @@ -1409,13 +1409,13 @@ Changes between 1.0.0 and 1.0.1 * simplified multicall mechanism and plugin architecture, renamed some internal methods and argnames -Changes between 1.0.0b9 and 1.0.0 +v1.0.0 ------------------------------------------- * more terse reporting try to show filesystem path relatively to current dir * improve xfail output a bit -Changes between 1.0.0b8 and 1.0.0b9 +v1.0.0b9 ------------------------------------------- * cleanly handle and report final teardown of test setup @@ -1449,7 +1449,7 @@ Changes between 1.0.0b8 and 1.0.0b9 * item.repr_failure(excinfo) instead of item.repr_failure(excinfo, outerr) -Changes between 1.0.0b7 and 1.0.0b8 +v1.0.0b8 ------------------------------------------- * pytest_unittest-plugin is now enabled by default @@ -1478,7 +1478,7 @@ Changes between 1.0.0b7 and 1.0.0b8 * tweaked doctest output for docstrings in py modules, thanks Radomir. -Changes between 1.0.0b3 and 1.0.0b7 +v1.0.0b7 ------------------------------------------- * renamed py.test.xfail back to py.test.mark.xfail to avoid @@ -1503,7 +1503,7 @@ Changes between 1.0.0b3 and 1.0.0b7 * make __name__ == "__channelexec__" for remote_exec code -Changes between 1.0.0b1 and 1.0.0b3 +v1.0.0b3 ------------------------------------------- * plugin classes are removed: one now defines @@ -1520,7 +1520,7 @@ Changes between 1.0.0b1 and 1.0.0b3 well with function arguments. -Changes between 0.9.2 and 1.0.0b1 +v1.0.0b1 ------------------------------------------- * introduced new "funcarg" setup method, @@ -1544,7 +1544,7 @@ Changes between 0.9.2 and 1.0.0b1 XXX lots of things missing here XXX -Changes between 0.9.1 and 0.9.2 +v0.9.2 ------------------------------------------- * refined installation and metadata, created new setup.py, @@ -1577,10 +1577,10 @@ Changes between 0.9.1 and 0.9.2 * there now is a py.__version__ attribute -Changes between 0.9.0 and 0.9.1 +v0.9.1 ------------------------------------------- -This is a fairly complete list of changes between 0.9 and 0.9.1, which can +This is a fairly complete list of v0.9.1, which can serve as a reference for developers. * allowing + signs in py.path.svn urls [39106] From 00b00ff93175fce9b461a7965b43dd148648421b Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:22:37 +0100 Subject: [PATCH 14/25] doc: Adjusted TOC sidebar section --- doc/en/_templates/globaltoc.html | 17 +++++++++++++++++ doc/en/_templates/localtoc.html | 26 -------------------------- doc/en/conf.py | 3 ++- 3 files changed, 19 insertions(+), 27 deletions(-) create mode 100644 doc/en/_templates/globaltoc.html delete mode 100644 doc/en/_templates/localtoc.html diff --git a/doc/en/_templates/globaltoc.html b/doc/en/_templates/globaltoc.html new file mode 100644 index 000000000..f764729fd --- /dev/null +++ b/doc/en/_templates/globaltoc.html @@ -0,0 +1,17 @@ +

      {{ _('Table Of Contents') }}

      + + + +{%- if display_toc %} +
      + {{ toc }} +{%- endif %} diff --git a/doc/en/_templates/localtoc.html b/doc/en/_templates/localtoc.html deleted file mode 100644 index 83af3aa88..000000000 --- a/doc/en/_templates/localtoc.html +++ /dev/null @@ -1,26 +0,0 @@ -

      quicklinks

      -
      -
  • - -
    - home - - TOC/contents -
    - install - - changelog -
    - examples - - customize -
    - issues[bb] - - contact -
    - Talks/Posts -
    -
    -{% extends "basic/localtoc.html" %} - diff --git a/doc/en/conf.py b/doc/en/conf.py index a817a01b9..034b0f7a0 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -156,12 +156,13 @@ html_static_path = ['_static'] html_sidebars = { 'index': [ 'sidebarintro.html', + 'globaltoc.html', 'links.html', 'sourcelink.html', 'searchbox.html' ], '**': [ - 'localtoc.html', + 'globaltoc.html', 'relations.html', 'links.html', 'sourcelink.html', From b9b44bb87cb91ad0e99011ed62a80d47cea96201 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:29:28 +0100 Subject: [PATCH 15/25] doc: Moved font family attributes into variables --- doc/en/_themes/flask/static/flasky.css_t | 62 ++++++++++++------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index 5906e751b..fab9fac03 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -8,13 +8,15 @@ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} - +{% set base_font = '"Georgia", serif' %} +{% set header_font = '"Garamond", "Georgia", serif' %} + @import url("basic.css"); - + /* -- page layout ----------------------------------------------------------- */ - + body { - font-family: 'Georgia', serif; + font-family: {{ base_font }}; font-size: 17px; background-color: white; color: #000; @@ -43,7 +45,7 @@ div.sphinxsidebar { hr { border: 1px solid #B1B4B6; } - + div.body { background-color: #ffffff; color: #3E4349; @@ -54,7 +56,7 @@ img.floatingflask { padding: 0 0 10px 10px; float: right; } - + div.footer { width: {{ page_width }}; margin: 20px auto 30px auto; @@ -70,7 +72,7 @@ div.footer a { div.related { display: none; } - + div.sphinxsidebar a { color: #444; text-decoration: none; @@ -80,7 +82,7 @@ div.sphinxsidebar a { div.sphinxsidebar a:hover { border-bottom: 1px solid #999; } - + div.sphinxsidebar { font-size: 14px; line-height: 1.5; @@ -95,10 +97,10 @@ div.sphinxsidebarwrapper p.logo { margin: 0; text-align: center; } - + div.sphinxsidebar h3, div.sphinxsidebar h4 { - font-family: 'Garamond', 'Georgia', serif; + font-family: {{ header_font }}; color: #444; font-size: 24px; font-weight: normal; @@ -109,7 +111,7 @@ div.sphinxsidebar h4 { div.sphinxsidebar h4 { font-size: 20px; } - + div.sphinxsidebar h3 a { color: #444; } @@ -120,7 +122,7 @@ div.sphinxsidebar p.logo a:hover, div.sphinxsidebar h3 a:hover { border: none; } - + div.sphinxsidebar p { color: #555; margin: 10px 0; @@ -131,32 +133,32 @@ div.sphinxsidebar ul { padding: 0; color: #000; } - + div.sphinxsidebar input { border: 1px solid #ccc; - font-family: 'Georgia', serif; + font-family: {{ base_font }}; font-size: 1em; } - + /* -- body styles ----------------------------------------------------------- */ - + a { color: #004B6B; text-decoration: underline; } - + a:hover { color: #6D4100; text-decoration: underline; } - + div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - font-family: 'Garamond', 'Georgia', serif; + font-family: {{ header_font }}; font-weight: normal; margin: 30px 0px 10px 0px; padding: 0; @@ -175,18 +177,18 @@ div.body h3 { font-size: 150%; } div.body h4 { font-size: 130%; } div.body h5 { font-size: 100%; } div.body h6 { font-size: 100%; } - + a.headerlink { color: #ddd; padding: 0 4px; text-decoration: none; } - + a.headerlink:hover { color: #444; background: #eaeaea; } - + div.body p, div.body dd, div.body li { line-height: 1.4em; } @@ -209,7 +211,7 @@ dd div.admonition { } div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; + font-family: {{ header_font }}; font-weight: normal; font-size: 24px; margin: 0 0 10px 0; @@ -233,20 +235,20 @@ div.note { background-color: #eee; border: 1px solid #ccc; } - + div.seealso { background-color: #ffc; border: 1px solid #ff6; } - + div.topic { background-color: #eee; } - + p.admonition-title { display: inline; } - + p.admonition-title:after { content: ":"; } @@ -340,7 +342,7 @@ ul, ol { margin: 10px 0 10px 30px; padding: 0; } - + pre { background: #eee; padding: 7px 30px; @@ -357,7 +359,7 @@ dl dl pre { margin-left: -90px; padding-left: 90px; } - + tt { background-color: #ecf0f3; color: #222; @@ -574,4 +576,4 @@ a:hover tt { .revsys-inline { display: none!important; -} \ No newline at end of file +} From d5948325d46eec66fef893db79fb731857df1160 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:32:38 +0100 Subject: [PATCH 16/25] doc: Use different font combination --- doc/en/_themes/flask/layout.html | 1 + doc/en/_themes/flask/static/flasky.css_t | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/en/_themes/flask/layout.html b/doc/en/_themes/flask/layout.html index 19c43fbbe..55cb4ce14 100644 --- a/doc/en/_themes/flask/layout.html +++ b/doc/en/_themes/flask/layout.html @@ -5,6 +5,7 @@ {% endif %} + {% endblock %} {%- block relbar2 %}{% endblock %} {% block header %} diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index fab9fac03..fc673d9de 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -8,8 +8,8 @@ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} -{% set base_font = '"Georgia", serif' %} -{% set header_font = '"Garamond", "Georgia", serif' %} +{% set base_font = '"Gudea", sans-serif' %} +{% set header_font = '"Rancho", serif' %} @import url("basic.css"); From afba6ce907287f495fea05c01caa2b3d51b3cdbf Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:36:07 +0100 Subject: [PATCH 17/25] doc: Don't show not existing logo --- doc/en/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/en/conf.py b/doc/en/conf.py index 034b0f7a0..bde9de480 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -115,7 +115,9 @@ html_theme = 'flask' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = {} +html_theme_options = { + 'index_logo': None +} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] From e79b43eeb2c8d9cfa52120c1474945ecdf4eee49 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:41:29 +0100 Subject: [PATCH 18/25] doc: Moved link colors into variables --- doc/en/_themes/flask/static/flasky.css_t | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index fc673d9de..727c9b59a 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -10,6 +10,8 @@ {% set sidebar_width = '220px' %} {% set base_font = '"Gudea", sans-serif' %} {% set header_font = '"Rancho", serif' %} +{% set link_color = '#004B6B' %} +{% set link_hover_color = '#6D4100' %} @import url("basic.css"); @@ -43,7 +45,8 @@ div.sphinxsidebar { } hr { - border: 1px solid #B1B4B6; + border: 0; + border-top: 1px solid #B1B4B6; } div.body { @@ -143,12 +146,12 @@ div.sphinxsidebar input { /* -- body styles ----------------------------------------------------------- */ a { - color: #004B6B; + color: {{ link_color }}; text-decoration: underline; } a:hover { - color: #6D4100; + color: {{ link_hover_color }}; text-decoration: underline; } @@ -373,22 +376,22 @@ tt.xref, a tt { a.reference { text-decoration: none; - border-bottom: 1px dotted #004B6B; + border-bottom: 1px dotted {{ link_color }}; } a.reference:hover { - border-bottom: 1px solid #6D4100; + border-bottom: 1px solid {{ link_hover_color }}; } a.footnote-reference { text-decoration: none; font-size: 0.7em; vertical-align: top; - border-bottom: 1px dotted #004B6B; + border-bottom: 1px dotted {{ link_color }}; } a.footnote-reference:hover { - border-bottom: 1px solid #6D4100; + border-bottom: 1px solid {{ link_hover_color }}; } a:hover tt { From d6d7f3821fa9be60c0c02d2305497840aa2c72a6 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:48:13 +0100 Subject: [PATCH 19/25] doc: Use green color for links --- doc/en/_themes/flask/static/flasky.css_t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index 727c9b59a..025d9b15e 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -10,8 +10,8 @@ {% set sidebar_width = '220px' %} {% set base_font = '"Gudea", sans-serif' %} {% set header_font = '"Rancho", serif' %} -{% set link_color = '#004B6B' %} -{% set link_hover_color = '#6D4100' %} +{% set link_color = '#490' %} +{% set link_hover_color = '#9c0' %} @import url("basic.css"); From fd42133d892adf46c5e3003b9a4ebca77431e0be Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:48:36 +0100 Subject: [PATCH 20/25] doc: Don't use italic font for internal references --- doc/en/_themes/flask/static/flasky.css_t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index 025d9b15e..b494f8f19 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -155,6 +155,10 @@ a:hover { text-decoration: underline; } +a.reference.internal em { + font-style: normal; +} + div.body h1, div.body h2, div.body h3, From a986b3fb4a00136b850d94e6016a5319e4347b6a Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 12 Dec 2013 19:48:45 +0100 Subject: [PATCH 21/25] doc: Removed unused template --- doc/en/_templates/indexsidebar.html | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 doc/en/_templates/indexsidebar.html diff --git a/doc/en/_templates/indexsidebar.html b/doc/en/_templates/indexsidebar.html deleted file mode 100644 index 13d69cbd5..000000000 --- a/doc/en/_templates/indexsidebar.html +++ /dev/null @@ -1,22 +0,0 @@ -

    Download

    -{% if version.endswith('(hg)') %} -

    This documentation is for version {{ version }}, which is - not released yet.

    -

    You can use it from the - Bitbucket Repo or look for - released versions in the Python - Package Index.

    -{% else %} -

    {{ release }} release -[Changelog]

    -

    -pytest/PyPI -

    -
    easy_install pytest
    -
    pip install pytest
    -{% endif %} - -

    Questions? Suggestions?

    - -

    contact channels -

    From 54174c308f856521fed5bf15c8984c7eb5ed5348 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 14 Dec 2013 15:38:11 +0100 Subject: [PATCH 22/25] doc: Use native scrollbars on webkit --- doc/en/_themes/flask/static/flasky.css_t | 35 ------------------------ 1 file changed, 35 deletions(-) diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index b494f8f19..ffa258bfc 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -544,41 +544,6 @@ a:hover tt { } } - -/* scrollbars */ - -::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -::-webkit-scrollbar-button:start:decrement, -::-webkit-scrollbar-button:end:increment { - display: block; - height: 10px; -} - -::-webkit-scrollbar-button:vertical:increment { - background-color: #fff; -} - -::-webkit-scrollbar-track-piece { - background-color: #eee; - -webkit-border-radius: 3px; -} - -::-webkit-scrollbar-thumb:vertical { - height: 50px; - background-color: #ccc; - -webkit-border-radius: 3px; -} - -::-webkit-scrollbar-thumb:horizontal { - width: 50px; - background-color: #ccc; - -webkit-border-radius: 3px; -} - /* misc. */ .revsys-inline { From fe01d1b0df3c57331d32e091c9dbea4dbbc61878 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 14 Dec 2013 15:43:40 +0100 Subject: [PATCH 23/25] doc: Fixed small res sidebar font color --- doc/en/_themes/flask/static/flasky.css_t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/_themes/flask/static/flasky.css_t b/doc/en/_themes/flask/static/flasky.css_t index ffa258bfc..9c5fd9526 100644 --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -481,7 +481,7 @@ a:hover tt { } div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, - div.sphinxsidebar h3 a { + div.sphinxsidebar h3 a, div.sphinxsidebar ul { color: white; } From 28b107954858d668c755258bb0df5ece83fce9d8 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 14 Dec 2013 15:45:01 +0100 Subject: [PATCH 24/25] doc: Moved G+ button --- doc/en/_templates/layout.html | 8 -------- doc/en/_templates/links.html | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/en/_templates/layout.html b/doc/en/_templates/layout.html index 0bccab479..278c9d327 100644 --- a/doc/en/_templates/layout.html +++ b/doc/en/_templates/layout.html @@ -1,13 +1,5 @@ {% extends "!layout.html" %} -{% block relbaritems %} -{{ super() }} - - - - -{% endblock %} - {% block footer %} {{ super() }}