Skip to content

Commit

Permalink
docs refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Cunliffe authored and tjcunliffe committed Feb 17, 2017
1 parent d0d710b commit f57c535
Show file tree
Hide file tree
Showing 38 changed files with 295 additions and 358 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2016 SpectoLabs Ltd.
Copyright 2017 SpectoLabs Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_build
*.oplx
6 changes: 3 additions & 3 deletions docs/makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
Expand All @@ -15,9 +15,9 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext

Expand Down
112 changes: 112 additions & 0 deletions docs/_static/theme_overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
.wy-side-nav-search {
background-color: #344556 !important;
color: #fcfcfc !important;
}

.wy-nav-side {
background: #344556 !important;
}

.wy-nav-top {
background: #344556 !important;
color: #fff !important;
}


.wy-side-nav-search input[type=text] {
border-color: #344556 !important;
}

.wy-menu-vertical li.current {
background: #f2f3f4 !important;
}

.wy-menu-vertical li.toctree-l2.current>a {
background: #f2f3f4 !important;
}

.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a {
background: #f2f3f4 !important;
}

.wy-menu-vertical a {
color: #fcfcfc !important;
}

.wy-menu-vertical li.current a {
color: #344556 !important;
border-right: none !important;
}

.wy-menu-vertical li.on a, .wy-menu-vertical li.current>a {
border: none !important;
}

h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend {
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif !important;
}

body {
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif !important;
color: #4c4c4c !important;
}

/*
body a {
color: #c3996b !important;
text-decoration: none;
cursor: pointer;
}
a:visited {
color: #c3996b !important;
}
a:hover {
text-decoration: underline;
}
*/


.wy-alert.wy-alert-info .wy-alert-title, .rst-content .note .wy-alert-title, .rst-content .wy-alert-info.attention .wy-alert-title, .rst-content .wy-alert-info.caution .wy-alert-title, .rst-content .wy-alert-info.danger .wy-alert-title, .rst-content .wy-alert-info.error .wy-alert-title, .rst-content .wy-alert-info.hint .wy-alert-title, .rst-content .wy-alert-info.important .wy-alert-title, .rst-content .wy-alert-info.tip .wy-alert-title, .rst-content .wy-alert-info.warning .wy-alert-title, .rst-content .seealso .wy-alert-title, .rst-content .wy-alert-info.admonition-todo .wy-alert-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .rst-content .wy-alert.wy-alert-info .admonition-title, .rst-content .note .admonition-title, .rst-content .wy-alert-info.attention .admonition-title, .rst-content .wy-alert-info.caution .admonition-title, .rst-content .wy-alert-info.danger .admonition-title, .rst-content .wy-alert-info.error .admonition-title, .rst-content .wy-alert-info.hint .admonition-title, .rst-content .wy-alert-info.important .admonition-title, .rst-content .wy-alert-info.tip .admonition-title, .rst-content .wy-alert-info.warning .admonition-title, .rst-content .seealso .admonition-title, .rst-content .wy-alert-info.admonition-todo .admonition-title {
background: #6BABC3 !important;
}

.wy-alert.wy-alert-info, .rst-content .note, .rst-content .wy-alert-info.attention, .rst-content .wy-alert-info.caution, .rst-content .wy-alert-info.danger, .rst-content .wy-alert-info.error, .rst-content .wy-alert-info.hint, .rst-content .wy-alert-info.important, .rst-content .wy-alert-info.tip, .rst-content .wy-alert-info.warning, .rst-content .seealso, .rst-content .wy-alert-info.admonition-todo {
background: #f3f6fa !important;
}

.wy-alert.wy-alert-warning .wy-alert-title, .rst-content .wy-alert-warning.note .wy-alert-title, .rst-content .attention .wy-alert-title, .rst-content .caution .wy-alert-title, .rst-content .wy-alert-warning.danger .wy-alert-title, .rst-content .wy-alert-warning.error .wy-alert-title, .rst-content .wy-alert-warning.hint .wy-alert-title, .rst-content .wy-alert-warning.important .wy-alert-title, .rst-content .wy-alert-warning.tip .wy-alert-title, .rst-content .warning .wy-alert-title, .rst-content .wy-alert-warning.seealso .wy-alert-title, .rst-content .admonition-todo .wy-alert-title, .wy-alert.wy-alert-warning .rst-content .admonition-title, .rst-content .wy-alert.wy-alert-warning .admonition-title, .rst-content .wy-alert-warning.note .admonition-title, .rst-content .attention .admonition-title, .rst-content .caution .admonition-title, .rst-content .wy-alert-warning.danger .admonition-title, .rst-content .wy-alert-warning.error .admonition-title, .rst-content .wy-alert-warning.hint .admonition-title, .rst-content .wy-alert-warning.important .admonition-title, .rst-content .wy-alert-warning.tip .admonition-title, .rst-content .warning .admonition-title, .rst-content .wy-alert-warning.seealso .admonition-title, .rst-content .admonition-todo .admonition-title {
background: #EF9574 !important;
}

.codeblock, pre.literal-block, .rst-content .literal-block, .rst-content pre.literal-block, div[class^='highlight'] {
background: #f2f3f4 !important;
}

div.wy-menu.rst-pro {
display: none !important;
}

.wy-body-for-nav {
background: left repeat-y #fcfcfc !important;
background-image: none !important;
}

/*
@media screen and (max-width: 768px)
.wy-nav-top {
display: block;
}
@media screen and (max-width: 768px)
.wy-nav-content-wrap {
margin-left: none;
}
@media (max-width: 768px) {
div.wy-menu.rst-pro {
display: none !important;
}
}
*/
95 changes: 95 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import sys
import os
import shlex
import sys

from recommonmark.parser import CommonMarkParser

source_parsers = {
'.md': CommonMarkParser,
}

source_suffix = ['.rst', '.md']

# 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.
sys.path.insert(0, os.path.abspath('../../'))

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
]

templates_path = ['_templates']

master_doc = 'index'

project = u'HoverPy'
copyright = u'2017, SpectoLabs'
author = u'SpectoLabs'

version = '0.1.20'
# The full version, including alpha/beta/rc tags.
release = version

language = None

exclude_patterns = ['_build']

pygments_style = 'sphinx'

todo_include_todos = False

if 'READTHEDOCS' not in os.environ:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

html_static_path = ['_static']

html_context = {
'css_files': [
'https://media.readthedocs.org/css/sphinx_rtd_theme.css',
'https://media.readthedocs.org/css/readthedocs-doc-embed.css',
'_static/theme_overrides.css',
],
}


html_show_sphinx = False

html_show_copyright = True

htmlhelp_basename = 'hoverpydoc'

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',
}


latex_documents = [
(master_doc, 'hoverpy.tex', u'HoverPy Documentation',
u'SpectoLabs', 'manual'),
]

man_pages = [
(master_doc, 'HoverPy', u'HoverPy Documentation',
[author], 1)
]

texinfo_documents = [
(master_doc, 'HoverPy', u'HoverPy Documentation',
author, 'HoverPy', 'Python library for Hoverfly API simulation tool',
'Miscellaneous'),
]
File renamed without changes
File renamed without changes
48 changes: 34 additions & 14 deletions docs/source/README.rst → docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
|PyPI version| |RTD badget|\ |Build Status|


.. figure:: https://github.com/SpectoLabs/hoverpy/raw/master/docs/source/hoverpy_logo.png
:alt:

Documentation
~~~~~~~~~~~~~

https://hoverpy.readthedocs.io/

Source
~~~~~~
|PyPI version| |RTD badget| |Build Status|

https://github.com/SpectoLabs/hoverpy/
|
Motivation
~~~~~~~~~~
What is HoverPy?
=================

HoverPy speeds up and simplifies tests that depend on HTTP / HTTPS
services. It does so by recording all HTTP traffic generated by your
Expand All @@ -32,10 +26,14 @@ gets generated whatsoever. This grants several benefits:

If/when the service you are testing against changes its API, then you
can simply delete your db file, and capture the test results again.
HoverPy uses a `very high performance proxy written in
Go <http://hoverfly.io>`__, for this reason it is rock solid in terms of

HoverPy uses `Hoverfly <http://hoverfly.io>`__, a high-performance API
simulation tool written in Go. For this reason it is rock solid in terms of
speed and reliability.

HoverPy and Hoverfly are developed and maintained by `SpectoLabs <https://specto.io>`_.


Support
~~~~~~~

Expand All @@ -46,14 +44,36 @@ HoverPy works great with the following HTTP clients:
- urllib3
- TBD

Source
~~~~~~

https://github.com/SpectoLabs/hoverpy/

License
~~~~~~~

HoverPy uses Apache License V2. See LICENSE.txt for more details.

.. |PyPI version| image:: https://badge.fury.io/py/hoverpy.svg
:target: https://testpypi.python.org/pypi/hoverpy
:target: https://pypi.python.org/pypi/hoverpy
.. |RTD badget| image:: https://readthedocs.org/projects/hoverpy/badge/?version=latest
:target: http://hoverpy.readthedocs.io/en/latest/
.. |Build Status| image:: https://travis-ci.org/SpectoLabs/hoverpy.svg?branch=master
:target: https://travis-ci.org/SpectoLabs/hoverpy

Contents
========

.. toctree::
:maxdepth: 3

pages/installation
pages/introduction
pages/usage/usage

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/source/installation.rst → docs/pages/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ You can also install HoverPy from PIP:
$ pip install hoverpy
HoverFly binary
Hoverfly binary
---------------

Please note that when you install HoverPy, the HoverFly binaries get downloaded and installed in your home directory, in
Please note that when you install HoverPy, the Hoverfly binaries get downloaded and installed in your home directory, in

.. code:: bash
Expand Down
14 changes: 7 additions & 7 deletions docs/source/introduction.rst → docs/pages/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ and random outages can cause integration tests to fail unexpectedly.
Service Virtualisation is software that records the interactions between
*you*, and the *big unpredictible world*.

.. figure:: mermaid/intro/graph1.png
.. figure:: ../mermaid/intro/graph1.png
:alt: hoverpy intro image1

A very sturdy software solution for Service Virtualisation is
`Mirage <https://github.com/SpectoLabs/mirage>`__, which is used
extensively in the airline industry. Its successor,
`HoverFly <http://hoverfly.io>`__, has taken all the lessons learned in
`Hoverfly <http://hoverfly.io>`__, has taken all the lessons learned in
the years of use of Mirage. Both Mirage and Hoverfly are open source
software, developed at `specto.io <http://spectio.io>`__.

HoverPy is the thin layer between Python and HoverFly. HoverFly is a
light-weight and extremely fast proxy written in Go, and does the heavy
lifting for HoverPy. So a more accurate picture might be:

.. figure:: mermaid/intro/graph2.png
.. figure:: ../mermaid/intro/graph2.png
:alt: hoverpy intro image2

--------------
Expand Down Expand Up @@ -132,7 +132,7 @@ available in the Usage section.
Capture mode
^^^^^^^^^^^^

.. figure:: mermaid/intro/graph3.png
.. figure:: ../mermaid/intro/graph3.png
:alt: hoverpy intro image3


Expand All @@ -145,7 +145,7 @@ development or testing.
Simulate mode
^^^^^^^^^^^^^

.. figure:: mermaid/intro/graph4.png
.. figure:: ../mermaid/intro/graph4.png
:alt: hoverpy intro image4

In this mode, Hoverfly uses either previously captured traffic, or
Expand All @@ -157,7 +157,7 @@ can use the Hoverfly “surrogate” instead of the real service.
Synthesize mode
^^^^^^^^^^^^^^^

.. figure:: mermaid/intro/graph5.png
.. figure:: ../mermaid/intro/graph5.png
:alt: hoverpy intro image5

In this mode, Hoverfly doesn’t use any stored request/response pairs.
Expand All @@ -171,7 +171,7 @@ if you don’t want to write service data files.
Modify mode
^^^^^^^^^^^

.. figure:: mermaid/intro/graph6.png
.. figure:: ../mermaid/intro/graph6.png
:alt: hoverpy intro image6

In this mode, Hoverfly passes requests through from to the server, and
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f57c535

Please sign in to comment.