From f8d6db3be87f8ac411ff46980374c0198c4aa015 Mon Sep 17 00:00:00 2001 From: juga Date: Wed, 21 Oct 2020 16:28:46 +0000 Subject: [PATCH] Add testing page with instructions on how to run the tests. --- docs/source/conf.py | 71 ++++++++++++++++++++++++----------------- docs/source/index.rst | 1 + docs/source/testing.rst | 15 +++++++++ 3 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 docs/source/testing.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 59b8664..c889b10 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,13 +20,13 @@ # -- Project information ----------------------------------------------------- from pkg_resources import get_distribution -project = 'pEpPythonAdapter' -copyright = '2020, Volker Birk, Matthias Heckmann, juga' -author = 'Volker Birk, Matthias Heckmann, juga' +project = "pEpPythonAdapter" +copyright = "2020, Volker Birk, Matthias Heckmann, juga" +author = "Volker Birk, Matthias Heckmann, juga" # The full version, including alpha/beta/rc tags -release = get_distribution('pEp').version +release = get_distribution("pEp").version # The short X.Y version -version = '.'.join(release.split('.')[:2]) +version = ".".join(release.split(".")[:2]) # -- General configuration --------------------------------------------------- @@ -38,25 +38,25 @@ version = '.'.join(release.split('.')[:2]) # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', - 'sphinx.ext.viewcode', + "sphinx.ext.autodoc", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.todo", + "sphinx.ext.coverage", + "sphinx.ext.viewcode", ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -79,7 +79,7 @@ pygments_style = None # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = "alabaster" # 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 @@ -90,7 +90,7 @@ html_theme = 'alabaster' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ["_static"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -106,7 +106,7 @@ html_static_path = ['_static'] # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'pEpPythonAdapterdoc' +htmlhelp_basename = "pEpPythonAdapterdoc" # -- Options for LaTeX output ------------------------------------------------ @@ -115,15 +115,12 @@ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -133,8 +130,13 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'pEpPythonAdapter.tex', 'pEpPythonAdapter Documentation', - '2020, Volker Birk, Matthias Heckmann, juga', 'manual'), + ( + master_doc, + "pEpPythonAdapter.tex", + "pEpPythonAdapter Documentation", + "2020, Volker Birk, Matthias Heckmann, juga", + "manual", + ) ] @@ -143,8 +145,13 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'peppythonadapter', 'pEpPythonAdapter Documentation', - [author], 1) + ( + master_doc, + "peppythonadapter", + "pEpPythonAdapter Documentation", + [author], + 1, + ) ] @@ -154,9 +161,15 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'pEpPythonAdapter', 'pEpPythonAdapter Documentation', - author, 'pEpPythonAdapter', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "pEpPythonAdapter", + "pEpPythonAdapter Documentation", + author, + "pEpPythonAdapter", + "One line description of project.", + "Miscellaneous", + ) ] @@ -175,7 +188,7 @@ epub_title = project # epub_uid = '' # A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] +epub_exclude_files = ["search.html"] # -- Extension configuration ------------------------------------------------- @@ -183,7 +196,7 @@ epub_exclude_files = ['search.html'] # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {"https://docs.python.org/": None} # -- Options for todo extension ---------------------------------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index 04dab42..477527b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,6 +11,7 @@ Welcome to pEpPythonAdapter's documentation! :caption: Contents: install + testing software_using api/pEp diff --git a/docs/source/testing.rst b/docs/source/testing.rst new file mode 100644 index 0000000..31c4a87 --- /dev/null +++ b/docs/source/testing.rst @@ -0,0 +1,15 @@ +Testing +======= + +See :ref:`install` to install the dependencies. + +See `test/README.md` to run the tests in `test`. + +To run the tests that use `pytest`, install the testing dependencies running +``pip install .[test]``. + +In Debian, you can install the testing dependencies in the system running ``apt +install tox``. + +Run the tests with the command `tox`. You can run individual tests by running +``tox -e ``, eg. ``tox -e py37`` or ``tox -e unit``.