Documentation theme is changed to ReadTheDocs theme. TOC and CSS were
adjusted to fit nicely into the theme.
Version parsing is now done automatically and we no longer need to
update libtaskotron version in docs' conf.py anymore.
jskladan | |
lbrabec | |
mkrizek | |
tflink |
libtaskotron |
Documentation theme is changed to ReadTheDocs theme. TOC and CSS were
adjusted to fit nicely into the theme.
Version parsing is now done automatically and we no longer need to
update libtaskotron version in docs' conf.py anymore.
please clean&build the docs and have a look whether you like the theme and whether there's something that should be adjusted. In my opinion the new look is better than the old one.
Here are the rendered docs:
https://kparal.fedorapeople.org/taskotron/D1198/html/
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
It looks like every other set of docs out there right now but maybe that's not a bad thing.
WFM
Path | Packages | |||
---|---|---|---|---|
M | docs/Makefile (2 lines) | |||
M | docs/directives_template/rst.j2 (17 lines) | |||
M | docs/generate_directive_docs.py (2 lines) | |||
A | M | docs/source/_static/custom.css (49 lines) | ||
D | M | docs/source/_static/sane_directives_params_table.css (29 lines) | ||
D | M | docs/source/_templates/layout.html (5 lines) | ||
M | docs/source/conf.py (13 lines) | |||
M | docs/source/index.rst (50 lines) | |||
D | M | docs/source/toc.rst (18 lines) | ||
M | libtaskotron.spec (2 lines) | |||
M | libtaskotron/check.py (13 lines) | |||
M | requirements.txt (1 line) | |||
M | setup.py (20 lines) | |||
A | M | utils/__init__.py (6 lines) | ||
A | M | utils/build.py (31 lines) |
Commit | Tree | Parents | Author | Summary | Date |
---|---|---|---|---|---|
ac931ec13a53 | 4f8f8c665eaf | aacb62e40f30 | Kamil Páral | fix running sphinx-build from virtualenv and use better approach to add… (Show More…) | May 18 2017, 12:57 PM |
aacb62e40f30 | 2c0eb2bb48f1 | ff5f27e7c061 | Kamil Páral | change documentation theme (Show More…) | May 18 2017, 10:55 AM |
1 | # Makefile for Sphinx documentation | 1 | # Makefile for Sphinx documentation | ||
---|---|---|---|---|---|
2 | # | 2 | # | ||
3 | 3 | | |||
4 | # You can set these variables from the command line. | 4 | # You can set these variables from the command line. | ||
5 | SPHINXOPTS = | 5 | SPHINXOPTS = | ||
6 | SPHINXBUILD = sphinx-build | 6 | SPHINXBUILD = python `which sphinx-build` | ||
7 | PAPER = | 7 | PAPER = | ||
8 | BUILDDIR = build | 8 | BUILDDIR = build | ||
9 | 9 | | |||
10 | # Build the docs for taskotron directives | 10 | # Build the docs for taskotron directives | ||
11 | DIRECTIVEDOCS = python generate_directive_docs.py -t rst --template-dir=directives_template/ --module-dir=../libtaskotron/directives -o ../docs/source/directives | 11 | DIRECTIVEDOCS = python generate_directive_docs.py -t rst --template-dir=directives_template/ --module-dir=../libtaskotron/directives -o ../docs/source/directives | ||
12 | 12 | | |||
13 | # Internal variables. | 13 | # Internal variables. | ||
14 | PAPEROPT_a4 = -D latex_paper_size=a4 | 14 | PAPEROPT_a4 = -D latex_paper_size=a4 | ||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |
Show All 23 Lines | |||||
24 | @{ description }@ | 24 | @{ description }@ | ||
25 | 25 | | |||
26 | {% if parameters -%} | 26 | {% if parameters -%} | ||
27 | Parameters | 27 | Parameters | ||
28 | ---------- | 28 | ---------- | ||
29 | 29 | | |||
30 | .. raw:: html | 30 | .. raw:: html | ||
31 | 31 | | |||
32 | <table class="rawhtml" border=1 cellpadding=4> | 32 | <table class="rawhtml directive" border=1 cellpadding=4> | ||
33 | <tr> | 33 | <tr> | ||
34 | <th class="head">parameter</th> | 34 | <th class="head">Parameter</th> | ||
35 | <th class="head">required</th> | 35 | <th class="head">Required</th> | ||
36 | <th class="head">description</th> | 36 | <th class="head">Description</th> | ||
37 | <th class="head">type</th> | 37 | <th class="head">Type</th> | ||
38 | <th class="head">default</th> | 38 | <th class="head">Default</th> | ||
39 | <th class="head">choices</th> | 39 | <th class="head">Choices</th> | ||
40 | </tr> | 40 | </tr> | ||
41 | {% for k in option_keys %} | 41 | {% for k in option_keys %} | ||
42 | {% set v = parameters[k] %} | 42 | {% set v = parameters[k] %} | ||
43 | <tr> | 43 | <tr> | ||
44 | <td class="bold">@{ k | html_ify | indent }@</td> | 44 | <td class="bold">@{ k | html_ify | indent }@</td> | ||
45 | <td>{% if v.get('required', False) %}yes{% else %}no{% endif %}</td> | 45 | <td>{% if v.get('required', False) %}yes{% else %}no{% endif %}</td> | ||
46 | <td>@{ v.description | html_ify | indent }@{% if v['version_added'] %} (added in Taskotron @{v['version_added']}@){% endif %}</td> | 46 | <td>@{ v.description | html_ify | indent }@{% if v['version_added'] %} (added in Taskotron @{v['version_added']}@){% endif %}</td> | ||
47 | <td>@{ v.type | html_ify | indent }@</td> | 47 | <td>@{ v.type | html_ify | indent }@</td> | ||
48 | <td>@{ v['default'] | html_ify | indent }@</td> | 48 | <td>@{ v['default'] | html_ify | indent }@</td> | ||
49 | <td><ul>{% for choice in v.get('choices',[]) -%}<li>@{ choice | html_ify | indent }@</li>{% endfor -%}</ul></td> | 49 | <td><ul>{% for choice in v.get('choices',[]) -%}<li>@{ choice | html_ify | indent }@</li>{% endfor -%}</ul></td> | ||
50 | </tr> | 50 | </tr> | ||
51 | {% endfor %} | 51 | {% endfor %} | ||
52 | </table> | 52 | </table> | ||
53 | <br/> | ||||
53 | {% endif %} | 54 | {% endif %} | ||
54 | 55 | | |||
55 | {% if returns -%} | 56 | {% if returns -%} | ||
56 | Return Values | 57 | Return Values | ||
57 | ------------- | 58 | ------------- | ||
58 | 59 | | |||
59 | @{ returns }@ | 60 | @{ returns }@ | ||
60 | {% endif %} | 61 | {% endif %} | ||
61 | 62 | | |||
62 | {% if raises -%} | 63 | {% if raises -%} | ||
63 | Exceptions | 64 | Exceptions | ||
64 | ---------- | 65 | ---------- | ||
65 | 66 | | |||
66 | @{ raises }@ | 67 | @{ raises }@ | ||
67 | {% endif %} | 68 | {% endif %} | ||
68 | 69 | | |||
69 | 70 | | |||
70 | {% if examples or plainexamples %} | 71 | {% if examples or plainexamples %} | ||
71 | Examples | 72 | Examples | ||
72 | -------- | 73 | -------- | ||
73 | 74 | | |||
74 | @{ plainexamples }@ | 75 | @{ plainexamples }@ | ||
75 | {% endif %} | 76 | {% endif %} | ||
76 | | ||||
77 | |
Show First 20 Lines • Show All 361 Lines • ▼ Show 20 Line(s) | 347 | for module in modules: | |||
---|---|---|---|---|---|
362 | if name.endswith('_directive'): | 362 | if name.endswith('_directive'): | ||
363 | name = name[:-(len('_directive'))] | 363 | name = name[:-(len('_directive'))] | ||
364 | filename = '%s_module' % result['module'] | 364 | filename = '%s_module' % result['module'] | ||
365 | entry = ''' | 365 | entry = ''' | ||
366 | %(directive)s | 366 | %(directive)s | ||
367 | %(desc)s''' % {'directive': ':doc:`%s <%s>`' % (name, filename), | 367 | %(desc)s''' % {'directive': ':doc:`%s <%s>`' % (name, filename), | ||
368 | 'desc': result['short_description']} | 368 | 'desc': result['short_description']} | ||
369 | 369 | | |||
370 | toc_list.append(' ' + filename) | 370 | toc_list.append(' %s <%s>' % (name, filename)) | ||
371 | links_list.append(entry) | 371 | links_list.append(entry) | ||
372 | 372 | | |||
373 | category_header = "%s Modules" % (category.title()) | 373 | category_header = "%s Modules" % (category.title()) | ||
374 | underscores = "`" * len(category_header) | 374 | underscores = "`" * len(category_header) | ||
375 | 375 | | |||
376 | category_file.write("""\ | 376 | category_file.write("""\ | ||
377 | .. _directives-modules: | 377 | .. _directives-modules: | ||
378 | 378 | | |||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |
1 | /****************************** | ||||
---|---|---|---|---|---|
2 | Override how params table look at directive module page | ||||
3 | ******************************/ | ||||
4 | | ||||
5 | table.directive { | ||||
6 | border-collapse: collapse; | ||||
7 | } | ||||
8 | | ||||
9 | table.directive tr { | ||||
10 | border: 1px solid black; | ||||
11 | } | ||||
12 | | ||||
13 | table.directive td, table.directive th { | ||||
14 | border: 1px dotted grey; | ||||
15 | padding: 5px; | ||||
16 | } | ||||
17 | | ||||
18 | table.directive td { | ||||
19 | vertical-align: top; | ||||
20 | } | ||||
21 | | ||||
22 | table.directive th.head { | ||||
23 | text-transform: capitalize; | ||||
24 | font-style: italic; | ||||
25 | font-weight: normal; | ||||
26 | } | ||||
27 | | ||||
28 | table.directive td.bold { | ||||
29 | font-weight: bold; | ||||
30 | } | ||||
31 | | ||||
32 | table.directive ul { | ||||
33 | padding: 0; | ||||
34 | padding-left: 1em; | ||||
35 | margin: 0; | ||||
36 | } | ||||
37 | | ||||
38 | table.directive p { | ||||
39 | margin: 0; padding: 0 | ||||
40 | } | ||||
41 | | ||||
42 | /****************************** | ||||
43 | Don't display the full class/method name in bold at API reference page, | ||||
44 | just the last part (the actual class/method name) | ||||
45 | ******************************/ | ||||
46 | | ||||
47 | .section dt > code.descclassname { | ||||
48 | font-weight: normal; | ||||
49 | } |
This file was completely deleted. Show File Contents |
This file was completely deleted. Show File Contents |
1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- | ||
---|---|---|---|---|---|
2 | # | 2 | # | ||
3 | # libtaskotron documentation build configuration file, created by | 3 | # libtaskotron documentation build configuration file, created by | ||
4 | # sphinx-quickstart on Thu Feb 6 13:52:28 2014. | 4 | # sphinx-quickstart on Thu Feb 6 13:52:28 2014. | ||
5 | # | 5 | # | ||
6 | # This file is execfile()d with the current directory set to its containing dir. | 6 | # This file is execfile()d with the current directory set to its containing dir. | ||
7 | # | 7 | # | ||
8 | # Note that not all possible configuration values are present in this | 8 | # Note that not all possible configuration values are present in this | ||
9 | # autogenerated file. | 9 | # autogenerated file. | ||
10 | # | 10 | # | ||
11 | # All configuration values have a default; values that are commented out | 11 | # All configuration values have a default; values that are commented out | ||
12 | # serve to show the default. | 12 | # serve to show the default. | ||
13 | 13 | | |||
14 | import sys, os | 14 | import sys, os | ||
15 | from utils import build | ||||
15 | 16 | | |||
16 | # If extensions (or modules to document with autodoc) are in another directory, | 17 | # If extensions (or modules to document with autodoc) are in another directory, | ||
17 | # add these directories to sys.path here. If the directory is relative to the | 18 | # add these directories to sys.path here. If the directory is relative to the | ||
18 | # documentation root, use os.path.abspath to make it absolute, like shown here. | 19 | # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
19 | sys.path.insert(0, os.path.abspath('../../')) | 20 | sys.path.insert(0, os.path.abspath('../../')) | ||
20 | 21 | | |||
21 | # -- General configuration ----------------------------------------------------- | 22 | # -- General configuration ----------------------------------------------------- | ||
22 | 23 | | |||
23 | # Include __init__ method documentation | 24 | # Include __init__ method documentation | ||
24 | autoclass_content = 'both' | 25 | autoclass_content = 'both' | ||
25 | 26 | | |||
26 | # If your documentation needs a minimal Sphinx version, state it here. | 27 | # If your documentation needs a minimal Sphinx version, state it here. | ||
27 | #needs_sphinx = '1.0' | 28 | #needs_sphinx = '1.0' | ||
28 | 29 | | |||
29 | # Add any Sphinx extension module names here, as strings. They can be extensions | 30 | # Add any Sphinx extension module names here, as strings. They can be extensions | ||
30 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | 31 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
31 | extensions = ['sphinx.ext.autodoc'] | 32 | extensions = ['sphinx.ext.autodoc'] | ||
32 | 33 | | |||
33 | # Add any paths that contain templates here, relative to this directory. | 34 | # Add any paths that contain templates here, relative to this directory. | ||
34 | templates_path = ['_templates'] | 35 | #templates_path = ['_templates'] | ||
35 | 36 | | |||
36 | # The suffix of source filenames. | 37 | # The suffix of source filenames. | ||
37 | source_suffix = '.rst' | 38 | source_suffix = '.rst' | ||
38 | 39 | | |||
39 | # The encoding of source files. | 40 | # The encoding of source files. | ||
40 | #source_encoding = 'utf-8-sig' | 41 | #source_encoding = 'utf-8-sig' | ||
41 | 42 | | |||
42 | # The master toctree document. | 43 | # The master toctree document. | ||
43 | master_doc = 'index' | 44 | master_doc = 'index' | ||
44 | 45 | | |||
45 | # General information about the project. | 46 | # General information about the project. | ||
46 | project = u'libtaskotron' | 47 | project = u'libtaskotron' | ||
47 | copyright = u'2017, Fedora QA Devel' | 48 | copyright = u'2017, Fedora QA Devel' | ||
48 | 49 | | |||
49 | # The version info for the project you're documenting, acts as replacement for | 50 | # The version info for the project you're documenting, acts as replacement for | ||
50 | # |version| and |release|, also used in various other places throughout the | 51 | # |version| and |release|, also used in various other places throughout the | ||
51 | # built documents. | 52 | # built documents. | ||
52 | # | 53 | # | ||
53 | # The short X.Y version. | 54 | # The short X.Y version. | ||
54 | version = '0.4' | 55 | version = build.find_version() | ||
55 | # The full version, including alpha/beta/rc tags. | 56 | # The full version, including alpha/beta/rc tags. | ||
56 | release = '0.4.20' | 57 | release = version | ||
57 | 58 | | |||
58 | # The language for content autogenerated by Sphinx. Refer to documentation | 59 | # The language for content autogenerated by Sphinx. Refer to documentation | ||
59 | # for a list of supported languages. | 60 | # for a list of supported languages. | ||
60 | #language = None | 61 | #language = None | ||
61 | 62 | | |||
62 | # There are two options for replacing |today|: either, you set today to some | 63 | # There are two options for replacing |today|: either, you set today to some | ||
63 | # non-false value, then it is used: | 64 | # non-false value, then it is used: | ||
64 | #today = '' | 65 | #today = '' | ||
Show All 24 Lines | |||||
89 | # A list of ignored prefixes for module index sorting. | 90 | # A list of ignored prefixes for module index sorting. | ||
90 | #modindex_common_prefix = [] | 91 | #modindex_common_prefix = [] | ||
91 | 92 | | |||
92 | 93 | | |||
93 | # -- Options for HTML output --------------------------------------------------- | 94 | # -- Options for HTML output --------------------------------------------------- | ||
94 | 95 | | |||
95 | # The theme to use for HTML and HTML Help pages. See the documentation for | 96 | # The theme to use for HTML and HTML Help pages. See the documentation for | ||
96 | # a list of builtin themes. | 97 | # a list of builtin themes. | ||
97 | html_theme = 'nature' | 98 | html_theme = 'sphinx_rtd_theme' | ||
98 | 99 | | |||
99 | # Theme options are theme-specific and customize the look and feel of a theme | 100 | # Theme options are theme-specific and customize the look and feel of a theme | ||
100 | # further. For a list of options available for each theme, see the | 101 | # further. For a list of options available for each theme, see the | ||
101 | # documentation. | 102 | # documentation. | ||
102 | #html_theme_options = {} | 103 | #html_theme_options = {} | ||
103 | 104 | | |||
104 | # Add any paths that contain custom themes here, relative to this directory. | 105 | # Add any paths that contain custom themes here, relative to this directory. | ||
105 | #html_theme_path = [] | 106 | #html_theme_path = [] | ||
Show All 14 Lines | |||||
120 | # pixels large. | 121 | # pixels large. | ||
121 | #html_favicon = None | 122 | #html_favicon = None | ||
122 | 123 | | |||
123 | # Add any paths that contain custom static files (such as style sheets) here, | 124 | # Add any paths that contain custom static files (such as style sheets) here, | ||
124 | # relative to this directory. They are copied after the builtin static files, | 125 | # relative to this directory. They are copied after the builtin static files, | ||
125 | # so a file named "default.css" will overwrite the builtin "default.css". | 126 | # so a file named "default.css" will overwrite the builtin "default.css". | ||
126 | html_static_path = ['_static'] | 127 | html_static_path = ['_static'] | ||
127 | 128 | | |||
129 | # add stylesheet: http://stackoverflow.com/a/37980230 | ||||
130 | def setup(app): | ||||
131 | app.add_stylesheet('custom.css') # may also be an URL | ||||
132 | | ||||
128 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | 133 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | ||
129 | # using the given strftime format. | 134 | # using the given strftime format. | ||
130 | #html_last_updated_fmt = '%b %d, %Y' | 135 | #html_last_updated_fmt = '%b %d, %Y' | ||
131 | 136 | | |||
132 | # If true, SmartyPants will be used to convert quotes and dashes to | 137 | # If true, SmartyPants will be used to convert quotes and dashes to | ||
133 | # typographically correct entities. | 138 | # typographically correct entities. | ||
134 | #html_use_smartypants = True | 139 | #html_use_smartypants = True | ||
135 | 140 | | |||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |
Show All 37 Lines | 37 | * Provisioning bare metal machines - only virtual machines can be automatically | |||
---|---|---|---|---|---|
38 | provisioned at the moment | 38 | provisioned at the moment | ||
39 | * Offline testing and rebooting - the SSH connection used to run the task on | 39 | * Offline testing and rebooting - the SSH connection used to run the task on | ||
40 | a remote machine must not be interrupted | 40 | a remote machine must not be interrupted | ||
41 | 41 | | |||
42 | 42 | | |||
43 | Documents | 43 | Documents | ||
44 | ========= | 44 | ========= | ||
45 | 45 | | |||
46 | Run tasks with libtaskotron | 46 | .. toctree:: | ||
47 | --------------------------- | 47 | :maxdepth: 1 | ||
48 | :hidden: | ||||
49 | | ||||
50 | self | ||||
51 | | ||||
52 | .. toctree:: | ||||
53 | :maxdepth: 1 | ||||
54 | :caption: Running tasks | ||||
55 | | ||||
56 | quickstart | ||||
57 | runningtasks | ||||
58 | | ||||
59 | .. toctree:: | ||||
60 | :maxdepth: 1 | ||||
61 | :caption: Writing tasks | ||||
48 | 62 | | |||
49 | * :doc:`quickstart` | 63 | writingtasks | ||
50 | * :doc:`runningtasks` | 64 | formula | ||
65 | directives/list_of_directives_modules | ||||
66 | resultyaml | ||||
67 | distgittasks | ||||
68 | docker | ||||
51 | 69 | | |||
52 | Write tasks for libtaskotron | 70 | .. toctree:: | ||
53 | ---------------------------- | 71 | :maxdepth: 1 | ||
72 | :caption: Advanced topics | ||||
54 | 73 | | |||
55 | * :doc:`writingtasks` | 74 | disposableclients | ||
56 | * :doc:`formula` | 75 | library | ||
57 | * :doc:`directives/list_of_directives_modules` | 76 | devguide | ||
58 | * :doc:`resultyaml` | | |||
59 | * :doc:`distgittasks` | | |||
60 | * :doc:`docker` | | |||
61 | | ||||
62 | Advanced topics | | |||
63 | --------------- | | |||
64 | | ||||
65 | * :doc:`disposableclients` | | |||
66 | * :doc:`library` | | |||
67 | * :doc:`devguide` | | |||
68 | 77 | | |||
69 | 78 | | |||
70 | .. _contact-us: | 79 | .. _contact-us: | ||
71 | 80 | | |||
72 | Contact us | 81 | Contact us | ||
73 | ========== | 82 | ========== | ||
74 | 83 | | |||
75 | Please direct questions and comments to either the `Fedora QA Devel List | 84 | Please direct questions and comments to either the `Fedora QA Devel List | ||
76 | <https://admin.fedoraproject.org/mailman/listinfo/qa-devel>`_ or the | 85 | <https://admin.fedoraproject.org/mailman/listinfo/qa-devel>`_ or the | ||
77 | *#fedora-qa* IRC channel on `Freenode <http://freenode.net/>`_. Bug reporting | 86 | *#fedora-qa* IRC channel on `Freenode <http://freenode.net/>`_. Bug reporting | ||
78 | is described in :ref:`taskotron-bugs`. | 87 | is described in :ref:`taskotron-bugs`. | ||
79 | 88 | | |||
80 | 89 | | |||
81 | Indices and tables | 90 | Indices and tables | ||
82 | ================== | 91 | ================== | ||
83 | 92 | | |||
84 | .. toctree:: | | |||
85 | :maxdepth: 1 | | |||
86 | :hidden: | | |||
87 | | ||||
88 | toc | | |||
89 | | ||||
90 | * :doc:`toc` | | |||
91 | * :ref:`genindex` | 93 | * :ref:`genindex` | ||
92 | * :ref:`modindex` | 94 | * :ref:`modindex` | ||
93 | * :ref:`search` | 95 | * :ref:`search` |
1 | Name: libtaskotron | 1 | Name: libtaskotron | ||
---|---|---|---|---|---|
2 | # NOTE: if you update version, *make sure* to also update `libtaskotron/__init__.py` | 2 | # NOTE: if you update version, *make sure* to also update `libtaskotron/__init__.py` | ||
3 | # and `docs/source/conf.py` | | |||
4 | Version: 0.4.20 | 3 | Version: 0.4.20 | ||
5 | Release: 1%{?dist} | 4 | Release: 1%{?dist} | ||
6 | Summary: Taskotron Support Library | 5 | Summary: Taskotron Support Library | ||
7 | 6 | | |||
8 | License: GPLv3 | 7 | License: GPLv3 | ||
9 | URL: https://pagure.io/taskotron/libtaskotron | 8 | URL: https://pagure.io/taskotron/libtaskotron | ||
10 | Source0: https://qa.fedoraproject.org/releases/%{name}/%{name}-%{version}.tar.gz | 9 | Source0: https://qa.fedoraproject.org/releases/%{name}/%{name}-%{version}.tar.gz | ||
11 | 10 | | |||
Show All 28 Lines | |||||
40 | BuildRequires: python-dingus >= 0.3.4 | 39 | BuildRequires: python-dingus >= 0.3.4 | ||
41 | BuildRequires: python-mock >= 2.0.0 | 40 | BuildRequires: python-mock >= 2.0.0 | ||
42 | BuildRequires: python-progressbar >= 2.3 | 41 | BuildRequires: python-progressbar >= 2.3 | ||
43 | BuildRequires: python2-pytest >= 2.7.3 | 42 | BuildRequires: python2-pytest >= 2.7.3 | ||
44 | BuildRequires: python-pytest-cov >= 2.2.1 | 43 | BuildRequires: python-pytest-cov >= 2.2.1 | ||
45 | BuildRequires: python-resultsdb_api >= 2.0.0 | 44 | BuildRequires: python-resultsdb_api >= 2.0.0 | ||
46 | BuildRequires: python-requests >= 2.7.0 | 45 | BuildRequires: python-requests >= 2.7.0 | ||
47 | BuildRequires: python-setuptools | 46 | BuildRequires: python-setuptools | ||
47 | BuildRequires: python2-sphinx_rtd_theme >= 0.1.9 | ||||
48 | BuildRequires: python-xunitparser >= 1.3.3 | 48 | BuildRequires: python-xunitparser >= 1.3.3 | ||
49 | BuildRequires: PyYAML >= 3.11 | 49 | BuildRequires: PyYAML >= 3.11 | ||
50 | 50 | | |||
51 | %description -n libtaskotron-core | 51 | %description -n libtaskotron-core | ||
52 | The minimal, core parts of libtaskotron that are needed to run tasks | 52 | The minimal, core parts of libtaskotron that are needed to run tasks | ||
53 | 53 | | |||
54 | %package -n libtaskotron-config | 54 | %package -n libtaskotron-config | ||
55 | Summary: Configuration files needed for using libtaskotron | 55 | Summary: Configuration files needed for using libtaskotron | ||
▲ Show 20 Lines • Show All 381 Lines • Show Last 20 Lines |
Show All 32 Lines | 22 | class CheckDetail(object): | |||
---|---|---|---|---|---|
33 | 33 | | |||
34 | :cvar tuple outcome_priority: a tuple of :attr:`outcome` keywords sorted by | 34 | :cvar tuple outcome_priority: a tuple of :attr:`outcome` keywords sorted by | ||
35 | priority from the least important to the most | 35 | priority from the least important to the most | ||
36 | important | 36 | important | ||
37 | :ivar str item: a description the item being tested; for example a build NVR | 37 | :ivar str item: a description the item being tested; for example a build NVR | ||
38 | (``vpnc-0.5-1.fc20``), update ID (``FEDORA-2014-3309``) or a | 38 | (``vpnc-0.5-1.fc20``), update ID (``FEDORA-2014-3309``) or a | ||
39 | repository name (``f20-updates``) | 39 | repository name (``f20-updates``) | ||
40 | :ivar str report_type: a definition of the type of the object being checked; | 40 | :ivar str report_type: a definition of the type of the object being checked; | ||
41 | for example 'a Koji build', 'a Bodhi update' or 'a | 41 | for example a Koji build or a Bodhi update, The | ||
42 | yum repository name'. The allowed values are | 42 | allowed values are attributes in :class:`ReportType`. | ||
43 | attributes in :class:`ReportType`. You don't have to | 43 | You don't have to fill this in (or you can provide a | ||
44 | fill this in (or you can provide a custom string | 44 | custom string value), but the reporting directives | ||
45 | value), but the reporting directives react only to | 45 | react only to the known types (you can always find it | ||
46 | the known types (you can always find it in ResultsDB, | 46 | in ResultsDB, though). | ||
47 | though). | | |||
48 | :ivar str outcome: a keyword specifying the final outcome of the check. | 47 | :ivar str outcome: a keyword specifying the final outcome of the check. | ||
49 | Available outcome keywords: | 48 | Available outcome keywords: | ||
50 | 49 | | |||
51 | * PASSED - everything went well | 50 | * PASSED - everything went well | ||
52 | * INFO - everything went well, but there is some | 51 | * INFO - everything went well, but there is some | ||
53 | important information that needs to be pointed out | 52 | important information that needs to be pointed out | ||
54 | * FAILED - the item in question fails the check | 53 | * FAILED - the item in question fails the check | ||
55 | * NEEDS_INSPECTION - the outcome can't be determined and | 54 | * NEEDS_INSPECTION - the outcome can't be determined and | ||
▲ Show 20 Lines • Show All 335 Lines • Show Last 20 Lines |
Show All 26 Lines | |||||
27 | # Test suite requirements | 27 | # Test suite requirements | ||
28 | dingus >= 0.3.4 | 28 | dingus >= 0.3.4 | ||
29 | mock >= 2.0.0 | 29 | mock >= 2.0.0 | ||
30 | pytest >= 2.7.3 | 30 | pytest >= 2.7.3 | ||
31 | pytest-cov >= 2.2.1 | 31 | pytest-cov >= 2.2.1 | ||
32 | 32 | | |||
33 | # Documentation requirements | 33 | # Documentation requirements | ||
34 | Sphinx >= 1.2.3 | 34 | Sphinx >= 1.2.3 | ||
35 | sphinx_rtd_theme >= 0.1.9 |
1 | from setuptools import setup, Command | 1 | from setuptools import setup, Command | ||
---|---|---|---|---|---|
2 | import codecs | 2 | from utils import build | ||
3 | import re | | |||
4 | import os | | |||
5 | | ||||
6 | here = os.path.abspath(os.path.dirname(__file__)) | | |||
7 | | ||||
8 | def read(*parts): | | |||
9 | return codecs.open(os.path.join(here, *parts), 'r').read() | | |||
10 | | ||||
11 | | ||||
12 | def find_version(*file_paths): | | |||
13 | version_file = read(*file_paths) | | |||
14 | version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | | |||
15 | version_file, re.M) | | |||
16 | if version_match: | | |||
17 | return version_match.group(1) | | |||
18 | raise RuntimeError("Unable to find version string.") | | |||
19 | 3 | | |||
20 | 4 | | |||
21 | class PyTest(Command): | 5 | class PyTest(Command): | ||
22 | user_options = [] | 6 | user_options = [] | ||
23 | def initialize_options(self): | 7 | def initialize_options(self): | ||
24 | pass | 8 | pass | ||
25 | def finalize_options(self): | 9 | def finalize_options(self): | ||
26 | pass | 10 | pass | ||
27 | def run(self): | 11 | def run(self): | ||
28 | import subprocess | 12 | import subprocess | ||
29 | errno = subprocess.call(['py.test']) | 13 | errno = subprocess.call(['py.test']) | ||
30 | raise SystemExit(errno) | 14 | raise SystemExit(errno) | ||
31 | 15 | | |||
32 | 16 | | |||
33 | setup(name='libtaskotron', | 17 | setup(name='libtaskotron', | ||
34 | version=find_version('libtaskotron', '__init__.py'), | 18 | version=build.find_version(), | ||
35 | description='base lib for taskotron jobs', | 19 | description='base lib for taskotron jobs', | ||
36 | author='Tim Flink', | 20 | author='Tim Flink', | ||
37 | author_email='tflink@fedoraproject.org', | 21 | author_email='tflink@fedoraproject.org', | ||
38 | license='GPLv2+', | 22 | license='GPLv2+', | ||
39 | url='https://pagure.io/taskotron/libtaskotron', | 23 | url='https://pagure.io/taskotron/libtaskotron', | ||
40 | packages=['libtaskotron', 'libtaskotron.directives', 'libtaskotron.ext', | 24 | packages=['libtaskotron', 'libtaskotron.directives', 'libtaskotron.ext', | ||
41 | 'libtaskotron.ext.fedora', 'libtaskotron.ext.disposable'], | 25 | 'libtaskotron.ext.fedora', 'libtaskotron.ext.disposable'], | ||
42 | package_data={'libtaskotron': ['report_templates/*.j2']}, | 26 | package_data={'libtaskotron': ['report_templates/*.j2']}, | ||
43 | package_dir={'libtaskotron':'libtaskotron'}, | 27 | package_dir={'libtaskotron':'libtaskotron'}, | ||
44 | include_package_data=True, | 28 | include_package_data=True, | ||
45 | cmdclass={'test': PyTest}, | 29 | cmdclass={'test': PyTest}, | ||
46 | entry_points=dict(console_scripts=['runtask=libtaskotron.main:main', | 30 | entry_points=dict(console_scripts=['runtask=libtaskotron.main:main', | ||
47 | 'taskotron_result=libtaskotron.taskotron_result:main']), | 31 | 'taskotron_result=libtaskotron.taskotron_result:main']), | ||
48 | install_requires = [ | 32 | install_requires = [ | ||
49 | ] | 33 | ] | ||
50 | ) | 34 | ) |
1 | # -*- coding: utf-8 -*- | ||||
---|---|---|---|---|---|
2 | # Copyright 2017, Red Hat, Inc. | ||||
3 | # License: GPL-2.0+ <http://spdx.org/licenses/GPL-2.0+> | ||||
4 | # See the LICENSE file for more details on Licensing | ||||
5 | | ||||
6 | from __future__ import absolute_import |
1 | # -*- coding: utf-8 -*- | ||||
---|---|---|---|---|---|
2 | # Copyright 2017, Red Hat, Inc. | ||||
3 | # License: GPL-2.0+ <http://spdx.org/licenses/GPL-2.0+> | ||||
4 | # See the LICENSE file for more details on Licensing | ||||
5 | | ||||
6 | '''Methods to help out with project building and maintenance''' | ||||
7 | | ||||
8 | from __future__ import absolute_import | ||||
9 | import re | ||||
10 | import os | ||||
11 | | ||||
12 | | ||||
13 | def find_version(path='libtaskotron/__init__.py'): | ||||
14 | '''Parse out a version string from a file and return it. | ||||
15 | | ||||
16 | :param str path: file path containing version string | ||||
17 | :return: version found in the file | ||||
18 | :rtype: str | ||||
19 | :raise RuntimeError: if no version is found in the file | ||||
20 | ''' | ||||
21 | here = os.path.abspath(os.path.dirname(__file__)) | ||||
22 | filepath = os.path.abspath(os.path.join(here, '..', path)) | ||||
23 | | ||||
24 | with open(filepath) as file_: | ||||
25 | data = file_.read() | ||||
26 | version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", data, re.M) | ||||
27 | | ||||
28 | if version_match: | ||||
29 | return version_match.group(1) | ||||
30 | else: | ||||
31 | raise RuntimeError("Unable to find version string in: %s" % filepath) |