From 2d62ac67ca60bb419830c2225347c3e395a1db3d Mon Sep 17 00:00:00 2001 From: jhermann Date: Sun, 1 Aug 2021 19:59:17 +0200 Subject: [PATCH 1/5] Add preliminary 'docs' Sphinx documentation. This will ultimately replace the existing 'documentation' folder. It also right now needs extra tweaking, so do not expect to be able to build it for now. --- docs/_static/css/custom.css | 27 +++ docs/_static/img/icon.svg | 127 +++++++++++++ docs/_static/img/logo.ico | Bin 0 -> 90022 bytes docs/_static/img/logo.png | Bin 0 -> 4212 bytes docs/_static/img/logo.svg | 118 ++++++++++++ docs/api-reference.rst | 17 ++ docs/api/modules.rst | 7 + docs/api/scanapi.evaluators.rst | 35 ++++ docs/api/scanapi.rst | 108 +++++++++++ docs/api/scanapi.tree.rst | 43 +++++ docs/cli-reference.rst | 23 +++ docs/conf.py | 315 ++++++++++++++++++++++++++++++++ docs/index.rst | 120 ++++++++++++ docs/requirements.txt | 7 + docs/usage.rst | 100 ++++++++++ pyproject.toml | 4 + tasks.py | 26 +++ 17 files changed, 1077 insertions(+) create mode 100644 docs/_static/css/custom.css create mode 100644 docs/_static/img/icon.svg create mode 100644 docs/_static/img/logo.ico create mode 100644 docs/_static/img/logo.png create mode 100644 docs/_static/img/logo.svg create mode 100644 docs/api-reference.rst create mode 100644 docs/api/modules.rst create mode 100644 docs/api/scanapi.evaluators.rst create mode 100644 docs/api/scanapi.rst create mode 100644 docs/api/scanapi.tree.rst create mode 100644 docs/cli-reference.rst create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/requirements.txt create mode 100644 docs/usage.rst create mode 100644 tasks.py diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css new file mode 100644 index 00000000..8b28d3b9 --- /dev/null +++ b/docs/_static/css/custom.css @@ -0,0 +1,27 @@ +/* Custom styles */ + +body { + color: #000; +} + +.wy-side-nav-search > div.version { + color: #026; +} + +.wy-menu-vertical header, .wy-menu-vertical p.caption { + color: #777; +} + +.rst-content blockquote { + border-left: 2px solid #ddd; +} + +code, .rst-content tt, .rst-content code { + font-size: 95%; +} +.note p code, .note div div pre { + background-color: #E7F2FC; +} +.warning p code, .warning div div pre { + background-color: #FFF8DD; +} diff --git a/docs/_static/img/icon.svg b/docs/_static/img/icon.svg new file mode 100644 index 00000000..013929e7 --- /dev/null +++ b/docs/_static/img/icon.svg @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + diff --git a/docs/_static/img/logo.ico b/docs/_static/img/logo.ico new file mode 100644 index 0000000000000000000000000000000000000000..e08f4be692fe194ed7d2efd9ee1cc52772056302 GIT binary patch literal 90022 zcmeI537loqoyTAGqFT`1_Pt-*VremU&7cfzjf{}kBU(4c7PM^|;T4Uv*bO5@>>>zZ z#u8$53C13KEHRXbv^A<@tEN(SzQ6bG={j}#-nZ3#ukL$w{-4jU&iS9^fBxtHKlg0+ zy;qq`OJ+o7?AQ$9_{hrNGHf3HuGvr0eL?D&yi$(D?Ynq&h3=gxn!yM0ymR22}}Vy#TT2GGmKap z_(qsw>R%3jM3`oRg@~xE>KHng$Sm+cm|*HF{Q!W4Ggumz6w0XVIl$11L`H#o!9?KJ z|2}DVfK9=JU_tN#5Gno%7!9rfy8*YpY@sye{Tz$|s-wCh=_gYC?}51b%2OGUsZ-zz ze=DhP*E8|Ks=qr5Oa~W(Gr$dCCb$w@7{-;RJe4^eYzPePLu4&62Ob@)3AT>HA;$$v zg%$QATs@2{(3m<844ZOH@V%)=2WLd$$Y5>CECS94F0DzzMPPf->Sn^r=h9PSa&Ztv z8q-^WlfkJV2TlQ}fn&frpdZZ*G8v(pk~60PMtHkMIdsj)Or{e}43vH$Bd&dTCiC#a zq@$7MnekvNp!q6KOgwi`MyP`H41Wjcc^C|m4_*R#h6aN)ugnG44@Tp(c^F_s1haNA#>Ha`Q;CfK%~EzJ>UfejqFZu?7_U{GOh^ul?Xot zYRjb;NO;*w)U&0!S}#Q9wErKJQ(u3q3XtkbhGZF18*0lYt$iBH!ct*|=6cnYOi?-Q zYfV!fl@(nK#Q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)&DZsKnQ6`!f7Gg!0{4M(j7x*xazEH+q*rL6abqa|FuQIcKQQFgmL5 z>gau7FR<-l;;)dt9%vTYmX5p$O#j?aV_lyi*d8>}I)}Pt)5?_mcMvzv%O+YMwFemN zdtFpWoHQ3452E(A_IS{H#4CY5Q`E?32Cdm^1Nr=EVD~X9uK7U!W4qaD2|B1f%^VPA z2RlvA!{gv=pz*LANGpv(G2PYv2>cp+2<*PZ#b;4&8!*&J&-RhP{VZFYolLsy`T)>5 z;$W~NSPLu+YE8pwU`4Pw*aw^pZU$Pfdw|igRH*gtDzGjX>ZJXU#=pK-Q0_AmXWx&J z@e+6#{1?!k;zE!EnumpBfyRxE!^1q~PY0TBt^l_JjkRaMJ3#YMT-&A6H9ls6L&1{3 z)BF|~L6Y{0mx7l;DVwG}Uwa*mL%j!C26(E>0!veTcW?>NKHyW3R-fxE_XfBP=x$?u zp!LF2au(29u?pA?oC2-}{{#L6w5HZ$Y`jN1PXYPa>_H|HugCs_W;_+Kz_R3h3v3B? z0h7ToUKoe!*`MubY+Gcz9WMcoi^VpzQyFXQ#I&d z)1~%$$FTPr-pBV0FYxW-GCAdUxAbPFw**0ZTOZ#eK3Cwo$nS;E52cjXFJ)8C#f&wEa>0=ay5wts$i8$2)+ z#gi7Qn9Y~%X1Xb844-4Zv3RX3J!AUvUA`k={%Y;Z&+|-AM&4=U2Nuut5d`@}MS@JZW}%;x=?&*e{{dzwrO)M@$~^15h%Om;XXvVFWf5H@Bd HMn?Z19y&P3 literal 0 HcmV?d00001 diff --git a/docs/_static/img/logo.png b/docs/_static/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..640bdb842a6d455cb9c33debfc29f3b620edabf3 GIT binary patch literal 4212 zcmcJTi8s{W|Htp!zKnzzL^Ms7tfA~f%w((;l6_yYOtOrfrnC%N?4+V%2pO_dmO@Mt zpN5pll6@T-Bun~EzyIO)KIgvgxy!ld+;gAL*Xwa_(s?TrJ|1x%005sU7H!R}3I7Tg z2lL;7^5|t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X4IeD}+YO>wv#y{q)11K(cZAuAd+OJD}%k$r7^z-k + + + + + + + + + + + + + + + + + + diff --git a/docs/api-reference.rst b/docs/api-reference.rst new file mode 100644 index 00000000..e3594904 --- /dev/null +++ b/docs/api-reference.rst @@ -0,0 +1,17 @@ +.. full API docs + + Copyright © 2019 Camila Maia + + ## LICENSE_SHORT ## + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +###################### +Complete API Reference +###################### + +The following is a complete API reference generated from source. + +.. toctree:: + :maxdepth: 4 + + api/scanapi diff --git a/docs/api/modules.rst b/docs/api/modules.rst new file mode 100644 index 00000000..4921d99a --- /dev/null +++ b/docs/api/modules.rst @@ -0,0 +1,7 @@ +scanapi +======= + +.. toctree:: + :maxdepth: 4 + + scanapi diff --git a/docs/api/scanapi.evaluators.rst b/docs/api/scanapi.evaluators.rst new file mode 100644 index 00000000..1a2373f9 --- /dev/null +++ b/docs/api/scanapi.evaluators.rst @@ -0,0 +1,35 @@ +scanapi.evaluators package +========================== + +.. automodule:: scanapi.evaluators + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +scanapi.evaluators.code\_evaluator module +----------------------------------------- + +.. automodule:: scanapi.evaluators.code_evaluator + :members: + :undoc-members: + :show-inheritance: + +scanapi.evaluators.spec\_evaluator module +----------------------------------------- + +.. automodule:: scanapi.evaluators.spec_evaluator + :members: + :undoc-members: + :show-inheritance: + +scanapi.evaluators.string\_evaluator module +------------------------------------------- + +.. automodule:: scanapi.evaluators.string_evaluator + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/api/scanapi.rst b/docs/api/scanapi.rst new file mode 100644 index 00000000..f4607891 --- /dev/null +++ b/docs/api/scanapi.rst @@ -0,0 +1,108 @@ +scanapi package +=============== + +.. automodule:: scanapi + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + scanapi.evaluators + scanapi.tree + +Submodules +---------- + +scanapi.config\_loader module +----------------------------- + +.. automodule:: scanapi.config_loader + :members: + :undoc-members: + :show-inheritance: + +scanapi.errors module +--------------------- + +.. automodule:: scanapi.errors + :members: + :undoc-members: + :show-inheritance: + +scanapi.exit\_code module +------------------------- + +.. automodule:: scanapi.exit_code + :members: + :undoc-members: + :show-inheritance: + +scanapi.hide\_utils module +-------------------------- + +.. automodule:: scanapi.hide_utils + :members: + :undoc-members: + :show-inheritance: + +scanapi.reporter module +----------------------- + +.. automodule:: scanapi.reporter + :members: + :undoc-members: + :show-inheritance: + +scanapi.scan module +------------------- + +.. automodule:: scanapi.scan + :members: + :undoc-members: + :show-inheritance: + +scanapi.session module +---------------------- + +.. automodule:: scanapi.session + :members: + :undoc-members: + :show-inheritance: + +scanapi.settings module +----------------------- + +.. automodule:: scanapi.settings + :members: + :undoc-members: + :show-inheritance: + +scanapi.template\_render module +------------------------------- + +.. automodule:: scanapi.template_render + :members: + :undoc-members: + :show-inheritance: + +scanapi.test\_status module +--------------------------- + +.. automodule:: scanapi.test_status + :members: + :undoc-members: + :show-inheritance: + +scanapi.utils module +-------------------- + +.. automodule:: scanapi.utils + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/api/scanapi.tree.rst b/docs/api/scanapi.tree.rst new file mode 100644 index 00000000..b84893de --- /dev/null +++ b/docs/api/scanapi.tree.rst @@ -0,0 +1,43 @@ +scanapi.tree package +==================== + +.. automodule:: scanapi.tree + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +scanapi.tree.endpoint\_node module +---------------------------------- + +.. automodule:: scanapi.tree.endpoint_node + :members: + :undoc-members: + :show-inheritance: + +scanapi.tree.request\_node module +--------------------------------- + +.. automodule:: scanapi.tree.request_node + :members: + :undoc-members: + :show-inheritance: + +scanapi.tree.testing\_node module +--------------------------------- + +.. automodule:: scanapi.tree.testing_node + :members: + :undoc-members: + :show-inheritance: + +scanapi.tree.tree\_keys module +------------------------------ + +.. automodule:: scanapi.tree.tree_keys + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/cli-reference.rst b/docs/cli-reference.rst new file mode 100644 index 00000000..6ce8d874 --- /dev/null +++ b/docs/cli-reference.rst @@ -0,0 +1,23 @@ + +.. Click CLI reference + + Copyright © 2019 Camila Maia + + ## LICENSE_SHORT ## + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +###################### +Complete CLI Reference +###################### + +This is a full reference of the :command:`scanapi` command, +with the same information as you get from using :option:`--help`. +It is generated from source code and thus always up to date. +See :doc:`usage` for a more detailed description. + +.. contents:: Available Commands + :local: + +.. click:: scanapi:main + :prog: scanapi + :show-nested: diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..e23bcd28 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,315 @@ +# +# Sphinx documentation build configuration file. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import os +import re +import sys + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +docs_dir = os.path.abspath(os.path.dirname(__file__)) +sys.path.insert(0, os.path.dirname(docs_dir)) +sys.path.insert(0, os.path.join(os.path.dirname(docs_dir), "src")) + +from setup import project as meta +from scanapi import __main__ + +def setup(app): + """See https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html""" + if os.path.exists('_static/css/custom.css'): + app.add_css_file('css/custom.css') + if os.path.exists('_static/js/custom.js'): + app.add_javascript('js/custom.js') + +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +if not on_rtd: + import sphinx_rtd_theme + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +needs_sphinx = '1.3' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', + 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', + 'sphinx_click.ext', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = { + '.rst': 'restructuredtext', + '.md': 'markdown', +} +try: + import recommonmark +except ImportError: + import warnings + warnings.warn("'recommonmark' extension not available!") + del source_suffix['.md'] +else: + extensions += ['recommonmark'] + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = meta["name"] +copyright = ' '.join([i for i in meta["long_description"].splitlines() if "Copyright" in i][0].split()[2:]) + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = meta["version"] +# The short X.Y version. +version = '.'.join(re.split(r"[^\d]+", release)[:2]) + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +today_fmt = '%Y-%m-%d' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [ + "*~", "README.rst", "api/modules.rst", +] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# Napoleon / API doc settings +napoleon_numpy_docstring = False +napoleon_use_ivar = True + +# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html +autodoc_inherit_docstrings = True +autodoc_default_options = { + 'members': None, + 'member-order': 'bysource', + 'undoc-members': None, + 'private-members': None, + #'special-members': '__str__,__repr__', # comma-separated specials to include + #'inherited-members': 'object,tuple,namedtuple', # comma-separated + #'show-inheritance': None, + #'ignore-module-all': '', + #'imported-members': 'StringIO', + 'exclude-members': '__weakref__', # comma-separated exclusions +} + + +# -- Options for HTML output --------------------------------------------------- +if not on_rtd: + # The theme to use for HTML and HTML Help pages. See the documentation for + # a list of builtin themes. + html_theme = 'sphinx_rtd_theme' + + # Add any paths that contain custom themes here, relative to this directory. + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# 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 = dict( +) + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +html_logo = "_static/img/logo.png" + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +html_favicon = "_static/img/logo.ico" + +# 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'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%Y-%m-%d' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +html_domain_indices = True + +# If false, no index is generated. +html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = project + 'doc' + + +# -- Options for LaTeX output -------------------------------------------------- + +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': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', project + '.tex', project + u' Documentation', meta["author"], 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', project, project + u' Documentation', [meta["author"]], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', project, project + u' Documentation', meta["author"], project, meta["description"], 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + + +# -- InterSphinx configuration ---------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration +extensions += ['sphinx.ext.intersphinx'] +intersphinx_timeout = 15 # seconds +intersphinx_mapping = dict( + invoke=('http://docs.pyinvoke.org/en/stable', None), +) + +# -- External Links configuration ------------------------------------------- +extensions += ['sphinx.ext.extlinks'] +extlinks = dict( + gh=('https://github.com/%s', ''), +) + +# -- GraphViz configuration ------------------------------------------------- +extensions += ['sphinx.ext.graphviz'] +graphviz_output_format = 'svg' + +# -- PlantUML configuration ------------------------------------------------- +##extensions += ['sphinxcontrib.plantuml'] +plantuml = os.path.expandvars('java -jar ${HOME}/.local/share/java/plantuml.jar') +plantuml_output_format = 'svg_obj' diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..c6625e8f --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,120 @@ +.. documentation master file + + Copyright © 2019 Camila Maia + + ## LICENSE_SHORT ## + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +############################################################################# +Welcome to the “ScanAPI” manual! +############################################################################# + +.. image:: _static/img/logo.png + +Automated Integration Testing and Live Documentation for your API. + + +********** +Installing +********** + +*ScanAPI* can be installed from PyPI +via ``pip install scanapi`` as usual, +see `releases `_ +on GitHub for an overview of available versions – the project uses +`semantic versioning `_ and follows +`PEP 440 `_ conventions. +If no releases are available yet, install from source as described right below. + +To get a bleeding-edge version from source, use these commands: + +.. code-block:: shell + + repo="scanapi/scanapi" + python3 -m venv ~/.local/venvs/scanapi && . $_/bin/activate + python3 -m pip install -r "https://raw.githubusercontent.com/$repo/master/requirements.txt" + python3 -m pip install -e "git+https://github.com/$repo.git#egg=${repo#*/}" + ln -nfs ../.local/venvs/scanapi/bin/scanapi ~/.local/bin + +See the following section on how to create a full development environment. + +To add bash completion, read the +`Click docs `_ +about it, or just follow these instructions: + +.. code-block:: shell + + cmdname=scanapi + mkdir -p ~/.bash_completion.d + ( export _$(tr a-z- A-Z_ <<<"$cmdname")_COMPLETE=source ; \ + $cmdname >~/.bash_completion.d/$cmdname.sh ) + grep /.bash_completion.d/$cmdname.sh ~/.bash_completion >/dev/null \ + || echo >>~/.bash_completion ". ~/.bash_completion.d/$cmdname.sh" + . "/etc/bash_completion" + +After installation, continue with :doc:`usage`. + + +************ +Contributing +************ + +To create a working directory for this project, call these commands: + +.. code-block:: shell + + git clone "https://github.com/scanapi/scanapi.git" + cd "scanapi" + . .env --yes --develop + invoke build --docs test check + +Contributing to this project is easy, and reporting an issue or +adding to the documentation also improves things for every user. +You don’t need to be a developer to contribute. +See :doc:`CONTRIBUTING` for more. + + +********************** +Documentation Contents +********************** + +.. toctree:: + :maxdepth: 4 + + usage + cli-reference + api-reference + CONTRIBUTING + LICENSE + + +********** +References +********** + +Tools +===== + +- `Cookiecutter `_ +- `PyInvoke `_ +- `pytest `_ +- `tox `_ +- `Pylint `_ +- `twine `_ +- `bpython `_ +- `yolk3k `_ + +Packages +======== + +- `Rituals `_ +- `Click `_ + + +Indices and Tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..816c1bc2 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,7 @@ +# +# "Read The Docs" requirements +# + + +sphinx-click +-r ../requirements.txt diff --git a/docs/usage.rst b/docs/usage.rst new file mode 100644 index 00000000..10bbe0fb --- /dev/null +++ b/docs/usage.rst @@ -0,0 +1,100 @@ +.. documentation: usage + + Copyright © 2019 Camila Maia + + ## LICENSE_SHORT ## + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +############################################################################# +Using `ScanAPI` +############################################################################# + +******** +Overview +******** + +**TODO** + +This project is based on the :gh:`Springerle/py-generic-project` cookiecutter. +Distribution packages are versioned according to :pep:`440`. + + +***************** +Command Line Tool +***************** + +The :command:`scanapi` tool uses a sub-command scheme, like known from `git`. + +Add :ref:`global options ` directly after the :command:`scanapi` command name, and other options +after their sub-command. To get detailed help for a specific sub-command, +use a local :option:`--help` option as in ``scanapi help --help``. + +.. warning:: + + .. rubric:: Status: ALPHA + + Not all of these options and commands are implemented yet! + + +.. _cmd-help: + +The `help` Command +================== + +Call ``scanapi help`` to check if your installation basically works. +The output shows version information and install locations. +It also lists the paths where configuration files are read from, +see :option:`--config` and :envvar:`SCANAPI_CONFIG` on how to provide a custom path. + + + +.. _global-opts: + +Global Command Line Options +=========================== + +Global options must be used *before* any sub-command, e.g. ``scanapi -c :/dev/null help``. + +.. option:: --version + + Show the version and install location, then exit. + +.. option:: --license + + Show the license text and exit. + +.. option:: -q, --quiet + + Be quiet and only show error messages. + +.. option:: -v, --verbose + + Create extra verbose output. + +.. option:: -c, --config FILE + + Load given configuration file(s). This overwrites the default lookup path for configuration files. + + You can provide this option multiple times, and also provide PATH-like lists separated by a colon. + An empty path component ``-c ''`` restores the default lookup path, at the place you used it. + + See also :envvar:`SCANAPI_CONFIG` on how to use the environment for this. + +.. option:: -h, --help + + Show a usage message and exit. + + +.. _env-vars: + +Environment Variables +===================== + +Certain environment variables can be used to customise the behaviour +of the application. + +.. envvar:: SCANAPI_CONFIG + + A PATH-like list of *additional* config files, read after the default ones. + + See also :option:`--config` for ad-hoc changes on the command line. diff --git a/pyproject.toml b/pyproject.toml index 60b5ae9e..11874c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,10 @@ isort = "^5.5.3" bandit = "^1.6.2" pytest-it = "^0.1.4" flake8 = "3.8.4" +invoke = "^1.6" +rituals = "^0.4.1" +sphinx-click = "^3.0.1" +recommonmark = "^0.7.1" [tool.isort] multi_line_output = 3 diff --git a/tasks.py b/tasks.py new file mode 100644 index 00000000..635d267d --- /dev/null +++ b/tasks.py @@ -0,0 +1,26 @@ +# pylint: disable=wildcard-import, unused-wildcard-import, invalid-name +""" Project automation for Invoke. +""" +# Copyright © 2019 Camila Maia +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +from rituals.easy import * # pylint: disable=redefined-builtin + +from rituals import config +config.set_flat_layout() From de2385edf5f5ca7e5c98138d64ebc947d57e886c Mon Sep 17 00:00:00 2001 From: jhermann Date: Mon, 2 Aug 2021 17:52:36 +0200 Subject: [PATCH 2/5] rituals now auto-detects layouts --- tasks.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tasks.py b/tasks.py index 635d267d..6990c6ea 100644 --- a/tasks.py +++ b/tasks.py @@ -21,6 +21,3 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. from rituals.easy import * # pylint: disable=redefined-builtin - -from rituals import config -config.set_flat_layout() From e47c6c7c60e9bcf953798cbfa151955b6e082b24 Mon Sep 17 00:00:00 2001 From: jhermann Date: Tue, 3 Aug 2021 11:33:29 +0200 Subject: [PATCH 3/5] docs: remove old documentation/ tree --- documentation/Makefile | 20 --- documentation/make.bat | 35 ------ documentation/source/conf.py | 52 -------- documentation/source/index.rst | 23 ---- documentation/source/modules.rst | 7 -- documentation/source/scanapi.evaluators.rst | 38 ------ documentation/source/scanapi.rst | 119 ------------------ documentation/source/scanapi.tree.rst | 46 ------- documentation/source/tests.rst | 30 ----- .../source/tests.unit.evaluators.rst | 38 ------ documentation/source/tests.unit.rst | 95 -------------- documentation/source/tests.unit.tree.rst | 38 ------ 12 files changed, 541 deletions(-) delete mode 100644 documentation/Makefile delete mode 100644 documentation/make.bat delete mode 100644 documentation/source/conf.py delete mode 100644 documentation/source/index.rst delete mode 100644 documentation/source/modules.rst delete mode 100644 documentation/source/scanapi.evaluators.rst delete mode 100644 documentation/source/scanapi.rst delete mode 100644 documentation/source/scanapi.tree.rst delete mode 100644 documentation/source/tests.rst delete mode 100644 documentation/source/tests.unit.evaluators.rst delete mode 100644 documentation/source/tests.unit.rst delete mode 100644 documentation/source/tests.unit.tree.rst diff --git a/documentation/Makefile b/documentation/Makefile deleted file mode 100644 index d0c3cbf1..00000000 --- a/documentation/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/documentation/make.bat b/documentation/make.bat deleted file mode 100644 index 6247f7e2..00000000 --- a/documentation/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/documentation/source/conf.py b/documentation/source/conf.py deleted file mode 100644 index b3933472..00000000 --- a/documentation/source/conf.py +++ /dev/null @@ -1,52 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys - -sys.path.insert(0, os.path.abspath("../../scanapi")) - - -# -- Project information ----------------------------------------------------- - -project = "scanapi" -copyright = "2020, Camila Maia" -author = "Camila Maia" - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ["sphinx.ext.autodoc"] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -# 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"] diff --git a/documentation/source/index.rst b/documentation/source/index.rst deleted file mode 100644 index 4e79d4ac..00000000 --- a/documentation/source/index.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. scanapi documentation master file, created by - sphinx-quickstart on Sat Jul 25 19:36:11 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to scanapi's documentation! -=================================== - -Here is some intro of the Scan API - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - modules - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/documentation/source/modules.rst b/documentation/source/modules.rst deleted file mode 100644 index 4921d99a..00000000 --- a/documentation/source/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -scanapi -======= - -.. toctree:: - :maxdepth: 4 - - scanapi diff --git a/documentation/source/scanapi.evaluators.rst b/documentation/source/scanapi.evaluators.rst deleted file mode 100644 index eb781f33..00000000 --- a/documentation/source/scanapi.evaluators.rst +++ /dev/null @@ -1,38 +0,0 @@ -scanapi.evaluators package -========================== - -Submodules ----------- - -scanapi.evaluators.code\_evaluator module ------------------------------------------ - -.. automodule:: scanapi.evaluators.code_evaluator - :members: - :undoc-members: - :show-inheritance: - -scanapi.evaluators.spec\_evaluator module ------------------------------------------ - -.. automodule:: scanapi.evaluators.spec_evaluator - :members: - :undoc-members: - :show-inheritance: - -scanapi.evaluators.string\_evaluator module -------------------------------------------- - -.. automodule:: scanapi.evaluators.string_evaluator - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: scanapi.evaluators - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/source/scanapi.rst b/documentation/source/scanapi.rst deleted file mode 100644 index bf3dab16..00000000 --- a/documentation/source/scanapi.rst +++ /dev/null @@ -1,119 +0,0 @@ -scanapi package -=============== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - scanapi.evaluators - scanapi.tree - -Submodules ----------- - -scanapi.config\_loader module ------------------------------ - -.. automodule:: scanapi.config_loader - :members: - :undoc-members: - :show-inheritance: - -scanapi.errors module ---------------------- - -.. automodule:: scanapi.errors - :members: - :undoc-members: - :show-inheritance: - -scanapi.exit\_code module -------------------------- - -.. automodule:: scanapi.exit_code - :members: - :undoc-members: - :show-inheritance: - -scanapi.hide\_utils module --------------------------- - -.. automodule:: scanapi.hide_utils - :members: - :undoc-members: - :show-inheritance: - -scanapi.main module -------------------- - -.. automodule:: scanapi.main - :members: - :undoc-members: - :show-inheritance: - -scanapi.reporter module ------------------------ - -.. automodule:: scanapi.reporter - :members: - :undoc-members: - :show-inheritance: - -scanapi.scan module -------------------- - -.. automodule:: scanapi.scan - :members: - :undoc-members: - :show-inheritance: - -scanapi.session module ----------------------- - -.. automodule:: scanapi.session - :members: - :undoc-members: - :show-inheritance: - -scanapi.settings module ------------------------ - -.. automodule:: scanapi.settings - :members: - :undoc-members: - :show-inheritance: - -scanapi.template\_render module -------------------------------- - -.. automodule:: scanapi.template_render - :members: - :undoc-members: - :show-inheritance: - -scanapi.test\_status module ---------------------------- - -.. automodule:: scanapi.test_status - :members: - :undoc-members: - :show-inheritance: - -scanapi.utils module --------------------- - -.. automodule:: scanapi.utils - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: scanapi - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/source/scanapi.tree.rst b/documentation/source/scanapi.tree.rst deleted file mode 100644 index b834566e..00000000 --- a/documentation/source/scanapi.tree.rst +++ /dev/null @@ -1,46 +0,0 @@ -scanapi.tree package -==================== - -Submodules ----------- - -scanapi.tree.endpoint\_node module ----------------------------------- - -.. automodule:: scanapi.tree.endpoint_node - :members: - :undoc-members: - :show-inheritance: - -scanapi.tree.request\_node module ---------------------------------- - -.. automodule:: scanapi.tree.request_node - :members: - :undoc-members: - :show-inheritance: - -scanapi.tree.testing\_node module ---------------------------------- - -.. automodule:: scanapi.tree.testing_node - :members: - :undoc-members: - :show-inheritance: - -scanapi.tree.tree\_keys module ------------------------------- - -.. automodule:: scanapi.tree.tree_keys - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: scanapi.tree - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/source/tests.rst b/documentation/source/tests.rst deleted file mode 100644 index 00616d66..00000000 --- a/documentation/source/tests.rst +++ /dev/null @@ -1,30 +0,0 @@ -tests package -============= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - tests.unit - -Submodules ----------- - -tests.conftest module ---------------------- - -.. automodule:: tests.conftest - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: tests - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/source/tests.unit.evaluators.rst b/documentation/source/tests.unit.evaluators.rst deleted file mode 100644 index 5e3ea18a..00000000 --- a/documentation/source/tests.unit.evaluators.rst +++ /dev/null @@ -1,38 +0,0 @@ -tests.unit.evaluators package -============================= - -Submodules ----------- - -tests.unit.evaluators.test\_code\_evaluator module --------------------------------------------------- - -.. automodule:: tests.unit.evaluators.test_code_evaluator - :members: - :undoc-members: - :show-inheritance: - -tests.unit.evaluators.test\_spec\_evaluator module --------------------------------------------------- - -.. automodule:: tests.unit.evaluators.test_spec_evaluator - :members: - :undoc-members: - :show-inheritance: - -tests.unit.evaluators.test\_string\_evaluator module ----------------------------------------------------- - -.. automodule:: tests.unit.evaluators.test_string_evaluator - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: tests.unit.evaluators - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/source/tests.unit.rst b/documentation/source/tests.unit.rst deleted file mode 100644 index e228b9a9..00000000 --- a/documentation/source/tests.unit.rst +++ /dev/null @@ -1,95 +0,0 @@ -tests.unit package -================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - tests.unit.evaluators - tests.unit.tree - -Submodules ----------- - -tests.unit.test\_config\_loader module --------------------------------------- - -.. automodule:: tests.unit.test_config_loader - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_hide\_utils module ------------------------------------ - -.. automodule:: tests.unit.test_hide_utils - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_main module ----------------------------- - -.. automodule:: tests.unit.test_main - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_reporter module --------------------------------- - -.. automodule:: tests.unit.test_reporter - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_scan module ----------------------------- - -.. automodule:: tests.unit.test_scan - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_session module -------------------------------- - -.. automodule:: tests.unit.test_session - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_settings module --------------------------------- - -.. automodule:: tests.unit.test_settings - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_template\_render module ----------------------------------------- - -.. automodule:: tests.unit.test_template_render - :members: - :undoc-members: - :show-inheritance: - -tests.unit.test\_utils module ------------------------------ - -.. automodule:: tests.unit.test_utils - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: tests.unit - :members: - :undoc-members: - :show-inheritance: diff --git a/documentation/source/tests.unit.tree.rst b/documentation/source/tests.unit.tree.rst deleted file mode 100644 index 73f0b7b6..00000000 --- a/documentation/source/tests.unit.tree.rst +++ /dev/null @@ -1,38 +0,0 @@ -tests.unit.tree package -======================= - -Submodules ----------- - -tests.unit.tree.test\_endpoint\_node module -------------------------------------------- - -.. automodule:: tests.unit.tree.test_endpoint_node - :members: - :undoc-members: - :show-inheritance: - -tests.unit.tree.test\_request\_node module ------------------------------------------- - -.. automodule:: tests.unit.tree.test_request_node - :members: - :undoc-members: - :show-inheritance: - -tests.unit.tree.test\_testing\_node module ------------------------------------------- - -.. automodule:: tests.unit.tree.test_testing_node - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: tests.unit.tree - :members: - :undoc-members: - :show-inheritance: From 6cb113661131bbb4e2d8b789ae0b78b6c745298a Mon Sep 17 00:00:00 2001 From: jhermann Date: Tue, 3 Aug 2021 11:37:19 +0200 Subject: [PATCH 4/5] docs: exclude 'include-*.rst' files from scanning --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index e23bcd28..dc9bf511 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -97,6 +97,7 @@ def setup(app): # directories to ignore when looking for source files. exclude_patterns = [ "*~", "README.rst", "api/modules.rst", + "include-*.rst", ] # The reST default role (used for this markup: `text`) to use for all documents. From 0c4baad52ea2e51239c51b930b177bd93a05392f Mon Sep 17 00:00:00 2001 From: jhermann Date: Tue, 10 Aug 2021 20:20:58 +0200 Subject: [PATCH 5/5] fix Sphinx conf.py (using unreleased rituals features) --- docs/conf.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index dc9bf511..eaa9ad33 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,10 +18,13 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. docs_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.dirname(docs_dir)) -sys.path.insert(0, os.path.join(os.path.dirname(docs_dir), "src")) +if os.path.exists(os.path.join(os.path.dirname(docs_dir), "src")): + sys.path.insert(0, os.path.join(os.path.dirname(docs_dir), "src")) -from setup import project as meta -from scanapi import __main__ +#from setup import project as meta +from rituals.util import buildsys +meta = buildsys.project_meta(os.path.dirname(docs_dir)) +from scanapi import __main__ # Perform click setup for 'sphinx_click.ext' def setup(app): """See https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html""" @@ -72,7 +75,7 @@ def setup(app): # General information about the project. project = meta["name"] -copyright = ' '.join([i for i in meta["long_description"].splitlines() if "Copyright" in i][0].split()[2:]) +copyright = meta["copyright"] # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the