Project template created with cookiecutter
cookiecutter https://github.com/audreyr/cookiecutter-pypackage.git
Markus Gerstel
5 years ago
0 | # http://editorconfig.org | |
1 | ||
2 | root = true | |
3 | ||
4 | [*] | |
5 | indent_style = space | |
6 | indent_size = 4 | |
7 | trim_trailing_whitespace = true | |
8 | insert_final_newline = true | |
9 | charset = utf-8 | |
10 | end_of_line = lf | |
11 | ||
12 | [*.bat] | |
13 | indent_style = tab | |
14 | end_of_line = crlf | |
15 | ||
16 | [LICENSE] | |
17 | insert_final_newline = false | |
18 | ||
19 | [Makefile] | |
20 | indent_style = tab |
0 | * ProcRunner version: | |
1 | * Python version: | |
2 | * Operating System: | |
3 | ||
4 | ### Description | |
5 | ||
6 | Describe what you were trying to get done. | |
7 | Tell us what happened, what went wrong, and what you expected to happen. | |
8 | ||
9 | ### What I Did | |
10 | ||
11 | ``` | |
12 | Paste the command(s) you ran and the output. | |
13 | If there was a crash, please include the traceback here. | |
14 | ``` |
0 | # Byte-compiled / optimized / DLL files | |
1 | __pycache__/ | |
2 | *.py[cod] | |
3 | *$py.class | |
4 | ||
5 | # C extensions | |
6 | *.so | |
7 | ||
8 | # Distribution / packaging | |
9 | .Python | |
10 | env/ | |
11 | build/ | |
12 | develop-eggs/ | |
13 | dist/ | |
14 | downloads/ | |
15 | eggs/ | |
16 | .eggs/ | |
17 | lib/ | |
18 | lib64/ | |
19 | parts/ | |
20 | sdist/ | |
21 | var/ | |
22 | wheels/ | |
23 | *.egg-info/ | |
24 | .installed.cfg | |
25 | *.egg | |
26 | ||
27 | # PyInstaller | |
28 | # Usually these files are written by a python script from a template | |
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. | |
30 | *.manifest | |
31 | *.spec | |
32 | ||
33 | # Installer logs | |
34 | pip-log.txt | |
35 | pip-delete-this-directory.txt | |
36 | ||
37 | # Unit test / coverage reports | |
38 | htmlcov/ | |
39 | .tox/ | |
40 | .coverage | |
41 | .coverage.* | |
42 | .cache | |
43 | nosetests.xml | |
44 | coverage.xml | |
45 | *.cover | |
46 | .hypothesis/ | |
47 | ||
48 | # Translations | |
49 | *.mo | |
50 | *.pot | |
51 | ||
52 | # Django stuff: | |
53 | *.log | |
54 | local_settings.py | |
55 | ||
56 | # Flask stuff: | |
57 | instance/ | |
58 | .webassets-cache | |
59 | ||
60 | # Scrapy stuff: | |
61 | .scrapy | |
62 | ||
63 | # Sphinx documentation | |
64 | docs/_build/ | |
65 | ||
66 | # PyBuilder | |
67 | target/ | |
68 | ||
69 | # Jupyter Notebook | |
70 | .ipynb_checkpoints | |
71 | ||
72 | # pyenv | |
73 | .python-version | |
74 | ||
75 | # celery beat schedule file | |
76 | celerybeat-schedule | |
77 | ||
78 | # SageMath parsed files | |
79 | *.sage.py | |
80 | ||
81 | # dotenv | |
82 | .env | |
83 | ||
84 | # virtualenv | |
85 | .venv | |
86 | venv/ | |
87 | ENV/ | |
88 | ||
89 | # Spyder project settings | |
90 | .spyderproject | |
91 | .spyproject | |
92 | ||
93 | # Rope project settings | |
94 | .ropeproject | |
95 | ||
96 | # mkdocs documentation | |
97 | /site | |
98 | ||
99 | # mypy | |
100 | .mypy_cache/ |
0 | # Config file for automatic testing at travis-ci.org | |
1 | ||
2 | language: python | |
3 | python: | |
4 | - 3.6 | |
5 | - 3.5 | |
6 | - 3.4 | |
7 | - 2.7 | |
8 | ||
9 | # Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors | |
10 | install: pip install -U tox-travis | |
11 | ||
12 | # Command to run tests, e.g. python setup.py test | |
13 | script: tox | |
14 | ||
15 | # Assuming you have installed the travis-ci CLI tool, after you | |
16 | # create the Github repo and add it to Travis, run the | |
17 | # following command to finish PyPI deployment setup: | |
18 | # $ travis encrypt --add deploy.password | |
19 | deploy: | |
20 | provider: pypi | |
21 | distributions: sdist bdist_wheel | |
22 | user: mgerstel | |
23 | password: | |
24 | secure: PLEASE_REPLACE_ME | |
25 | on: | |
26 | tags: true | |
27 | repo: DiamondLightSource/procrunner | |
28 | python: 3.6 |
0 | ======= | |
1 | Credits | |
2 | ======= | |
3 | ||
4 | Development Lead | |
5 | ---------------- | |
6 | ||
7 | * Markus Gerstel <scientificsoftware@diamond.ac.uk> | |
8 | ||
9 | Contributors | |
10 | ------------ | |
11 | ||
12 | None yet. Why not be the first? |
0 | .. highlight:: shell | |
1 | ||
2 | ============ | |
3 | Contributing | |
4 | ============ | |
5 | ||
6 | Contributions are welcome, and they are greatly appreciated! Every little bit | |
7 | helps, and credit will always be given. | |
8 | ||
9 | You can contribute in many ways: | |
10 | ||
11 | Types of Contributions | |
12 | ---------------------- | |
13 | ||
14 | Report Bugs | |
15 | ~~~~~~~~~~~ | |
16 | ||
17 | Report bugs at https://github.com/DiamondLightSource/procrunner/issues. | |
18 | ||
19 | If you are reporting a bug, please include: | |
20 | ||
21 | * Your operating system name and version. | |
22 | * Any details about your local setup that might be helpful in troubleshooting. | |
23 | * Detailed steps to reproduce the bug. | |
24 | ||
25 | Fix Bugs | |
26 | ~~~~~~~~ | |
27 | ||
28 | Look through the GitHub issues for bugs. Anything tagged with "bug" and "help | |
29 | wanted" is open to whoever wants to implement it. | |
30 | ||
31 | Implement Features | |
32 | ~~~~~~~~~~~~~~~~~~ | |
33 | ||
34 | Look through the GitHub issues for features. Anything tagged with "enhancement" | |
35 | and "help wanted" is open to whoever wants to implement it. | |
36 | ||
37 | Write Documentation | |
38 | ~~~~~~~~~~~~~~~~~~~ | |
39 | ||
40 | ProcRunner could always use more documentation, whether as part of the | |
41 | official ProcRunner docs, in docstrings, or even on the web in blog posts, | |
42 | articles, and such. | |
43 | ||
44 | Submit Feedback | |
45 | ~~~~~~~~~~~~~~~ | |
46 | ||
47 | The best way to send feedback is to file an issue at https://github.com/DiamondLightSource/procrunner/issues. | |
48 | ||
49 | If you are proposing a feature: | |
50 | ||
51 | * Explain in detail how it would work. | |
52 | * Keep the scope as narrow as possible, to make it easier to implement. | |
53 | * Remember that this is a volunteer-driven project, and that contributions | |
54 | are welcome :) | |
55 | ||
56 | Get Started! | |
57 | ------------ | |
58 | ||
59 | Ready to contribute? Here's how to set up `procrunner` for local development. | |
60 | ||
61 | 1. Fork the `procrunner` repo on GitHub. | |
62 | 2. Clone your fork locally:: | |
63 | ||
64 | $ git clone git@github.com:your_name_here/procrunner.git | |
65 | ||
66 | 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: | |
67 | ||
68 | $ mkvirtualenv procrunner | |
69 | $ cd procrunner/ | |
70 | $ python setup.py develop | |
71 | ||
72 | 4. Create a branch for local development:: | |
73 | ||
74 | $ git checkout -b name-of-your-bugfix-or-feature | |
75 | ||
76 | Now you can make your changes locally. | |
77 | ||
78 | 5. When you're done making changes, check that your changes pass flake8 and the | |
79 | tests, including testing other Python versions with tox:: | |
80 | ||
81 | $ flake8 procrunner tests | |
82 | $ python setup.py test or py.test | |
83 | $ tox | |
84 | ||
85 | To get flake8 and tox, just pip install them into your virtualenv. | |
86 | ||
87 | 6. Commit your changes and push your branch to GitHub:: | |
88 | ||
89 | $ git add . | |
90 | $ git commit -m "Your detailed description of your changes." | |
91 | $ git push origin name-of-your-bugfix-or-feature | |
92 | ||
93 | 7. Submit a pull request through the GitHub website. | |
94 | ||
95 | Pull Request Guidelines | |
96 | ----------------------- | |
97 | ||
98 | Before you submit a pull request, check that it meets these guidelines: | |
99 | ||
100 | 1. The pull request should include tests. | |
101 | 2. If the pull request adds functionality, the docs should be updated. Put | |
102 | your new functionality into a function with a docstring, and add the | |
103 | feature to the list in README.rst. | |
104 | 3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check | |
105 | https://travis-ci.org/DiamondLightSource/procrunner/pull_requests | |
106 | and make sure that the tests pass for all supported Python versions. | |
107 | ||
108 | Tips | |
109 | ---- | |
110 | ||
111 | To run a subset of tests:: | |
112 | ||
113 | $ py.test tests.test_procrunner | |
114 | ||
115 | ||
116 | Deploying | |
117 | --------- | |
118 | ||
119 | A reminder for the maintainers on how to deploy. | |
120 | Make sure all your changes are committed (including an entry in HISTORY.rst). | |
121 | Then run:: | |
122 | ||
123 | $ bumpversion patch # possible: major / minor / patch | |
124 | $ git push | |
125 | $ git push --tags | |
126 | ||
127 | Travis will then deploy to PyPI if tests pass. |
0 | ======= | |
1 | History | |
2 | ======= | |
3 | ||
4 | 0.1.0 (2018-03-12) | |
5 | ------------------ | |
6 | ||
7 | * First release on PyPI. |
0 | ||
1 | ||
2 | BSD License | |
3 | ||
4 | Copyright (c) 2018, Markus Gerstel | |
5 | All rights reserved. | |
6 | ||
7 | Redistribution and use in source and binary forms, with or without modification, | |
8 | are permitted provided that the following conditions are met: | |
9 | ||
10 | * Redistributions of source code must retain the above copyright notice, this | |
11 | list of conditions and the following disclaimer. | |
12 | ||
13 | * Redistributions in binary form must reproduce the above copyright notice, this | |
14 | list of conditions and the following disclaimer in the documentation and/or | |
15 | other materials provided with the distribution. | |
16 | ||
17 | * Neither the name of the copyright holder nor the names of its | |
18 | contributors may be used to endorse or promote products derived from this | |
19 | software without specific prior written permission. | |
20 | ||
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |
22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
24 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | |
26 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | |
28 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
29 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | |
30 | OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 |
0 | include AUTHORS.rst | |
1 | include CONTRIBUTING.rst | |
2 | include HISTORY.rst | |
3 | include LICENSE | |
4 | include README.rst | |
5 | ||
6 | recursive-include tests * | |
7 | recursive-exclude * __pycache__ | |
8 | recursive-exclude * *.py[co] | |
9 | ||
10 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif |
0 | .PHONY: clean clean-test clean-pyc clean-build docs help | |
1 | .DEFAULT_GOAL := help | |
2 | ||
3 | define BROWSER_PYSCRIPT | |
4 | import os, webbrowser, sys | |
5 | ||
6 | try: | |
7 | from urllib import pathname2url | |
8 | except: | |
9 | from urllib.request import pathname2url | |
10 | ||
11 | webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) | |
12 | endef | |
13 | export BROWSER_PYSCRIPT | |
14 | ||
15 | define PRINT_HELP_PYSCRIPT | |
16 | import re, sys | |
17 | ||
18 | for line in sys.stdin: | |
19 | match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) | |
20 | if match: | |
21 | target, help = match.groups() | |
22 | print("%-20s %s" % (target, help)) | |
23 | endef | |
24 | export PRINT_HELP_PYSCRIPT | |
25 | ||
26 | BROWSER := python -c "$$BROWSER_PYSCRIPT" | |
27 | ||
28 | help: | |
29 | @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) | |
30 | ||
31 | clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts | |
32 | ||
33 | clean-build: ## remove build artifacts | |
34 | rm -fr build/ | |
35 | rm -fr dist/ | |
36 | rm -fr .eggs/ | |
37 | find . -name '*.egg-info' -exec rm -fr {} + | |
38 | find . -name '*.egg' -exec rm -f {} + | |
39 | ||
40 | clean-pyc: ## remove Python file artifacts | |
41 | find . -name '*.pyc' -exec rm -f {} + | |
42 | find . -name '*.pyo' -exec rm -f {} + | |
43 | find . -name '*~' -exec rm -f {} + | |
44 | find . -name '__pycache__' -exec rm -fr {} + | |
45 | ||
46 | clean-test: ## remove test and coverage artifacts | |
47 | rm -fr .tox/ | |
48 | rm -f .coverage | |
49 | rm -fr htmlcov/ | |
50 | ||
51 | lint: ## check style with flake8 | |
52 | flake8 procrunner tests | |
53 | ||
54 | test: ## run tests quickly with the default Python | |
55 | py.test | |
56 | ||
57 | test-all: ## run tests on every Python version with tox | |
58 | tox | |
59 | ||
60 | coverage: ## check code coverage quickly with the default Python | |
61 | coverage run --source procrunner -m pytest | |
62 | coverage report -m | |
63 | coverage html | |
64 | $(BROWSER) htmlcov/index.html | |
65 | ||
66 | docs: ## generate Sphinx HTML documentation, including API docs | |
67 | rm -f docs/procrunner.rst | |
68 | rm -f docs/modules.rst | |
69 | sphinx-apidoc -o docs/ procrunner | |
70 | $(MAKE) -C docs clean | |
71 | $(MAKE) -C docs html | |
72 | $(BROWSER) docs/_build/html/index.html | |
73 | ||
74 | servedocs: docs ## compile the docs watching for changes | |
75 | watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . | |
76 | ||
77 | release: clean ## package and upload a release | |
78 | twine upload dist/* | |
79 | ||
80 | dist: clean ## builds source and wheel package | |
81 | python setup.py sdist | |
82 | python setup.py bdist_wheel | |
83 | ls -l dist | |
84 | ||
85 | install: clean ## install the package to the active Python's site-packages | |
86 | python setup.py install |
0 | ========== | |
1 | ProcRunner | |
2 | ========== | |
3 | ||
4 | ||
5 | .. image:: https://img.shields.io/pypi/v/procrunner.svg | |
6 | :target: https://pypi.python.org/pypi/procrunner | |
7 | ||
8 | .. image:: https://img.shields.io/travis/DiamondLightSource/procrunner.svg | |
9 | :target: https://travis-ci.org/DiamondLightSource/procrunner | |
10 | ||
11 | .. image:: https://readthedocs.org/projects/procrunner/badge/?version=latest | |
12 | :target: https://procrunner.readthedocs.io/en/latest/?badge=latest | |
13 | :alt: Documentation Status | |
14 | ||
15 | ||
16 | .. image:: https://pyup.io/repos/github/DiamondLightSource/procrunner/shield.svg | |
17 | :target: https://pyup.io/repos/github/DiamondLightSource/procrunner/ | |
18 | :alt: Updates | |
19 | ||
20 | ||
21 | ||
22 | Versatile utility function to run external processes | |
23 | ||
24 | ||
25 | * Free software: BSD license | |
26 | * Documentation: https://procrunner.readthedocs.io. | |
27 | ||
28 | ||
29 | Features | |
30 | -------- | |
31 | ||
32 | * TODO | |
33 | ||
34 | Credits | |
35 | ------- | |
36 | ||
37 | This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template. | |
38 | ||
39 | .. _Cookiecutter: https://github.com/audreyr/cookiecutter | |
40 | .. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage |
0 | # Minimal makefile for Sphinx documentation | |
1 | # | |
2 | ||
3 | # You can set these variables from the command line. | |
4 | SPHINXOPTS = | |
5 | SPHINXBUILD = python -msphinx | |
6 | SPHINXPROJ = procrunner | |
7 | SOURCEDIR = . | |
8 | BUILDDIR = _build | |
9 | ||
10 | # Put it first so that "make" without argument is like "make help". | |
11 | help: | |
12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | |
13 | ||
14 | .PHONY: help Makefile | |
15 | ||
16 | # Catch-all target: route all unknown targets to Sphinx using the new | |
17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | |
18 | %: Makefile | |
19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
0 | .. include:: ../AUTHORS.rst |
0 | #!/usr/bin/env python | |
1 | # -*- coding: utf-8 -*- | |
2 | # | |
3 | # procrunner documentation build configuration file, created by | |
4 | # sphinx-quickstart on Fri Jun 9 13:47:02 2017. | |
5 | # | |
6 | # This file is execfile()d with the current directory set to its | |
7 | # containing dir. | |
8 | # | |
9 | # Note that not all possible configuration values are present in this | |
10 | # autogenerated file. | |
11 | # | |
12 | # All configuration values have a default; values that are commented out | |
13 | # serve to show the default. | |
14 | ||
15 | # If extensions (or modules to document with autodoc) are in another | |
16 | # directory, add these directories to sys.path here. If the directory is | |
17 | # relative to the documentation root, use os.path.abspath to make it | |
18 | # absolute, like shown here. | |
19 | # | |
20 | import os | |
21 | import sys | |
22 | sys.path.insert(0, os.path.abspath('..')) | |
23 | ||
24 | import procrunner | |
25 | ||
26 | # -- General configuration --------------------------------------------- | |
27 | ||
28 | # If your documentation needs a minimal Sphinx version, state it here. | |
29 | # | |
30 | # needs_sphinx = '1.0' | |
31 | ||
32 | # Add any Sphinx extension module names here, as strings. They can be | |
33 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |
34 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] | |
35 | ||
36 | # Add any paths that contain templates here, relative to this directory. | |
37 | templates_path = ['_templates'] | |
38 | ||
39 | # The suffix(es) of source filenames. | |
40 | # You can specify multiple suffix as a list of string: | |
41 | # | |
42 | # source_suffix = ['.rst', '.md'] | |
43 | source_suffix = '.rst' | |
44 | ||
45 | # The master toctree document. | |
46 | master_doc = 'index' | |
47 | ||
48 | # General information about the project. | |
49 | project = u'ProcRunner' | |
50 | copyright = u"2018, Markus Gerstel" | |
51 | author = u"Markus Gerstel" | |
52 | ||
53 | # The version info for the project you're documenting, acts as replacement | |
54 | # for |version| and |release|, also used in various other places throughout | |
55 | # the built documents. | |
56 | # | |
57 | # The short X.Y version. | |
58 | version = procrunner.__version__ | |
59 | # The full version, including alpha/beta/rc tags. | |
60 | release = procrunner.__version__ | |
61 | ||
62 | # The language for content autogenerated by Sphinx. Refer to documentation | |
63 | # for a list of supported languages. | |
64 | # | |
65 | # This is also used if you do content translation via gettext catalogs. | |
66 | # Usually you set "language" from the command line for these cases. | |
67 | language = None | |
68 | ||
69 | # List of patterns, relative to source directory, that match files and | |
70 | # directories to ignore when looking for source files. | |
71 | # This patterns also effect to html_static_path and html_extra_path | |
72 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | |
73 | ||
74 | # The name of the Pygments (syntax highlighting) style to use. | |
75 | pygments_style = 'sphinx' | |
76 | ||
77 | # If true, `todo` and `todoList` produce output, else they produce nothing. | |
78 | todo_include_todos = False | |
79 | ||
80 | ||
81 | # -- Options for HTML output ------------------------------------------- | |
82 | ||
83 | # The theme to use for HTML and HTML Help pages. See the documentation for | |
84 | # a list of builtin themes. | |
85 | # | |
86 | html_theme = 'alabaster' | |
87 | ||
88 | # Theme options are theme-specific and customize the look and feel of a | |
89 | # theme further. For a list of options available for each theme, see the | |
90 | # documentation. | |
91 | # | |
92 | # html_theme_options = {} | |
93 | ||
94 | # Add any paths that contain custom static files (such as style sheets) here, | |
95 | # relative to this directory. They are copied after the builtin static files, | |
96 | # so a file named "default.css" will overwrite the builtin "default.css". | |
97 | html_static_path = ['_static'] | |
98 | ||
99 | ||
100 | # -- Options for HTMLHelp output --------------------------------------- | |
101 | ||
102 | # Output file base name for HTML help builder. | |
103 | htmlhelp_basename = 'procrunnerdoc' | |
104 | ||
105 | ||
106 | # -- Options for LaTeX output ------------------------------------------ | |
107 | ||
108 | latex_elements = { | |
109 | # The paper size ('letterpaper' or 'a4paper'). | |
110 | # | |
111 | # 'papersize': 'letterpaper', | |
112 | ||
113 | # The font size ('10pt', '11pt' or '12pt'). | |
114 | # | |
115 | # 'pointsize': '10pt', | |
116 | ||
117 | # Additional stuff for the LaTeX preamble. | |
118 | # | |
119 | # 'preamble': '', | |
120 | ||
121 | # Latex figure (float) alignment | |
122 | # | |
123 | # 'figure_align': 'htbp', | |
124 | } | |
125 | ||
126 | # Grouping the document tree into LaTeX files. List of tuples | |
127 | # (source start file, target name, title, author, documentclass | |
128 | # [howto, manual, or own class]). | |
129 | latex_documents = [ | |
130 | (master_doc, 'procrunner.tex', | |
131 | u'ProcRunner Documentation', | |
132 | u'Markus Gerstel', 'manual'), | |
133 | ] | |
134 | ||
135 | ||
136 | # -- Options for manual page output ------------------------------------ | |
137 | ||
138 | # One entry per manual page. List of tuples | |
139 | # (source start file, name, description, authors, manual section). | |
140 | man_pages = [ | |
141 | (master_doc, 'procrunner', | |
142 | u'ProcRunner Documentation', | |
143 | [author], 1) | |
144 | ] | |
145 | ||
146 | ||
147 | # -- Options for Texinfo output ---------------------------------------- | |
148 | ||
149 | # Grouping the document tree into Texinfo files. List of tuples | |
150 | # (source start file, target name, title, author, | |
151 | # dir menu entry, description, category) | |
152 | texinfo_documents = [ | |
153 | (master_doc, 'procrunner', | |
154 | u'ProcRunner Documentation', | |
155 | author, | |
156 | 'procrunner', | |
157 | 'One line description of project.', | |
158 | 'Miscellaneous'), | |
159 | ] | |
160 | ||
161 | ||
162 |
0 | .. include:: ../CONTRIBUTING.rst |
0 | .. include:: ../HISTORY.rst |
0 | Welcome to ProcRunner's documentation! | |
1 | ====================================== | |
2 | ||
3 | .. toctree:: | |
4 | :maxdepth: 2 | |
5 | :caption: Contents: | |
6 | ||
7 | readme | |
8 | installation | |
9 | usage | |
10 | modules | |
11 | contributing | |
12 | authors | |
13 | history | |
14 | ||
15 | Indices and tables | |
16 | ================== | |
17 | * :ref:`genindex` | |
18 | * :ref:`modindex` | |
19 | * :ref:`search` |
0 | .. highlight:: shell | |
1 | ||
2 | ============ | |
3 | Installation | |
4 | ============ | |
5 | ||
6 | ||
7 | Stable release | |
8 | -------------- | |
9 | ||
10 | To install ProcRunner, run this command in your terminal: | |
11 | ||
12 | .. code-block:: console | |
13 | ||
14 | $ pip install procrunner | |
15 | ||
16 | This is the preferred method to install ProcRunner, as it will always install the most recent stable release. | |
17 | ||
18 | If you don't have `pip`_ installed, this `Python installation guide`_ can guide | |
19 | you through the process. | |
20 | ||
21 | .. _pip: https://pip.pypa.io | |
22 | .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/ | |
23 | ||
24 | ||
25 | From sources | |
26 | ------------ | |
27 | ||
28 | The sources for ProcRunner can be downloaded from the `Github repo`_. | |
29 | ||
30 | You can either clone the public repository: | |
31 | ||
32 | .. code-block:: console | |
33 | ||
34 | $ git clone git://github.com/DiamondLightSource/procrunner | |
35 | ||
36 | Or download the `tarball`_: | |
37 | ||
38 | .. code-block:: console | |
39 | ||
40 | $ curl -OL https://github.com/DiamondLightSource/procrunner/tarball/master | |
41 | ||
42 | Once you have a copy of the source, you can install it with: | |
43 | ||
44 | .. code-block:: console | |
45 | ||
46 | $ python setup.py install | |
47 | ||
48 | ||
49 | .. _Github repo: https://github.com/DiamondLightSource/procrunner | |
50 | .. _tarball: https://github.com/DiamondLightSource/procrunner/tarball/master |
0 | @ECHO OFF | |
1 | ||
2 | pushd %~dp0 | |
3 | ||
4 | REM Command file for Sphinx documentation | |
5 | ||
6 | if "%SPHINXBUILD%" == "" ( | |
7 | set SPHINXBUILD=python -msphinx | |
8 | ) | |
9 | set SOURCEDIR=. | |
10 | set BUILDDIR=_build | |
11 | set SPHINXPROJ=procrunner | |
12 | ||
13 | if "%1" == "" goto help | |
14 | ||
15 | %SPHINXBUILD% >NUL 2>NUL | |
16 | if errorlevel 9009 ( | |
17 | echo. | |
18 | echo.The Sphinx module was not found. Make sure you have Sphinx installed, | |
19 | echo.then set the SPHINXBUILD environment variable to point to the full | |
20 | echo.path of the 'sphinx-build' executable. Alternatively you may add the | |
21 | echo.Sphinx directory to PATH. | |
22 | echo. | |
23 | echo.If you don't have Sphinx installed, grab it from | |
24 | echo.http://sphinx-doc.org/ | |
25 | exit /b 1 | |
26 | ) | |
27 | ||
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | |
29 | goto end | |
30 | ||
31 | :help | |
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | |
33 | ||
34 | :end | |
35 | popd |
0 | .. include:: ../README.rst |
0 | # -*- coding: utf-8 -*- | |
1 | ||
2 | """Top-level package for ProcRunner.""" | |
3 | ||
4 | __author__ = """Markus Gerstel""" | |
5 | __email__ = 'scientificsoftware@diamond.ac.uk' | |
6 | __version__ = '0.1.0' |
0 | pip==9.0.1 | |
1 | bumpversion==0.5.3 | |
2 | wheel==0.30.0 | |
3 | watchdog==0.8.3 | |
4 | flake8==3.5.0 | |
5 | tox==2.9.1 | |
6 | coverage==4.5.1 | |
7 | Sphinx==1.7.1 | |
8 | twine | |
9 | ||
10 | pytest==3.4.2 | |
11 | pytest-runner==2.11.1 |
0 | [bumpversion] | |
1 | current_version = 0.1.0 | |
2 | commit = True | |
3 | tag = True | |
4 | ||
5 | [bumpversion:file:setup.py] | |
6 | search = version='{current_version}' | |
7 | replace = version='{new_version}' | |
8 | ||
9 | [bumpversion:file:procrunner/__init__.py] | |
10 | search = __version__ = '{current_version}' | |
11 | replace = __version__ = '{new_version}' | |
12 | ||
13 | [bdist_wheel] | |
14 | universal = 1 | |
15 | ||
16 | [flake8] | |
17 | exclude = docs | |
18 | ||
19 | [aliases] | |
20 | # Define setup.py command aliases here | |
21 | test = pytest | |
22 | ||
23 | [tool:pytest] | |
24 | collect_ignore = ['setup.py'] | |
25 |
0 | #!/usr/bin/env python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | """The setup script.""" | |
4 | ||
5 | from setuptools import setup, find_packages | |
6 | ||
7 | with open('README.rst') as readme_file: | |
8 | readme = readme_file.read() | |
9 | ||
10 | with open('HISTORY.rst') as history_file: | |
11 | history = history_file.read() | |
12 | ||
13 | requirements = [ ] | |
14 | ||
15 | setup_requirements = ['pytest-runner', ] | |
16 | ||
17 | test_requirements = ['pytest', ] | |
18 | ||
19 | setup( | |
20 | author="Markus Gerstel", | |
21 | author_email='scientificsoftware@diamond.ac.uk', | |
22 | classifiers=[ | |
23 | 'Development Status :: 2 - Pre-Alpha', | |
24 | 'Intended Audience :: Developers', | |
25 | 'License :: OSI Approved :: BSD License', | |
26 | 'Natural Language :: English', | |
27 | "Programming Language :: Python :: 2", | |
28 | 'Programming Language :: Python :: 2.7', | |
29 | 'Programming Language :: Python :: 3', | |
30 | 'Programming Language :: Python :: 3.4', | |
31 | 'Programming Language :: Python :: 3.5', | |
32 | 'Programming Language :: Python :: 3.6', | |
33 | ], | |
34 | description="Versatile utility function to run external processes", | |
35 | install_requires=requirements, | |
36 | license="BSD license", | |
37 | long_description=readme + '\n\n' + history, | |
38 | include_package_data=True, | |
39 | keywords='procrunner', | |
40 | name='procrunner', | |
41 | packages=find_packages(include=['procrunner']), | |
42 | setup_requires=setup_requirements, | |
43 | test_suite='tests', | |
44 | tests_require=test_requirements, | |
45 | url='https://github.com/DiamondLightSource/procrunner', | |
46 | version='0.1.0', | |
47 | zip_safe=False, | |
48 | ) |
0 | #!/usr/bin/env python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | """Tests for `procrunner` package.""" | |
4 | ||
5 | import pytest | |
6 | ||
7 | ||
8 | from procrunner import procrunner | |
9 | ||
10 | ||
11 | @pytest.fixture | |
12 | def response(): | |
13 | """Sample pytest fixture. | |
14 | ||
15 | See more at: http://doc.pytest.org/en/latest/fixture.html | |
16 | """ | |
17 | # import requests | |
18 | # return requests.get('https://github.com/audreyr/cookiecutter-pypackage') | |
19 | ||
20 | ||
21 | def test_content(response): | |
22 | """Sample pytest test function with the pytest fixture as an argument.""" | |
23 | # from bs4 import BeautifulSoup | |
24 | # assert 'GitHub' in BeautifulSoup(response.content).title.string |
0 | [tox] | |
1 | envlist = py27, py34, py35, py36, flake8 | |
2 | ||
3 | [travis] | |
4 | python = | |
5 | 3.6: py36 | |
6 | 3.5: py35 | |
7 | 3.4: py34 | |
8 | 2.7: py27 | |
9 | ||
10 | [testenv:flake8] | |
11 | basepython = python | |
12 | deps = flake8 | |
13 | commands = flake8 procrunner | |
14 | ||
15 | [testenv] | |
16 | setenv = | |
17 | PYTHONPATH = {toxinidir} | |
18 | deps = | |
19 | -r{toxinidir}/requirements_dev.txt | |
20 | ; If you want to make tox run the tests with the same versions, create a | |
21 | ; requirements.txt with the pinned versions and uncomment the following line: | |
22 | ; -r{toxinidir}/requirements.txt | |
23 | commands = | |
24 | pip install -U pip | |
25 | py.test --basetemp={envtmpdir} | |
26 | ||
27 |