GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - discogs/python-livingdocs: :pencil: Create living documentation from BDD specs

This repository was archived by the owner on Jan 22, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

48 Commits
48 Commits

Folders and files

NameName
Last commit message
Last commit date
ci
ci
 
 
src/livingdocs
src/livingdocs
 
 
tests
tests
 
 
.bumpversion.cfg
.bumpversion.cfg
 
 
.coveragerc
.coveragerc
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
AUTHORS.rst
AUTHORS.rst
 
 
CHANGELOG.rst
CHANGELOG.rst
 
 
CONTRIBUTING.rst
CONTRIBUTING.rst
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
README.rst
README.rst
 
 
requirements.txt
requirements.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 
tox.ini
tox.ini
 
 

Repository files navigation

Overview

Build Status Coverage Status codecov PyPI PyPI

Using a Python BDD test runner like behave, create living documentation from your BDD feature files. This library will create documents that contain up-to-date information about your BDD specs and helps generate a static site for your living documentation.

Current supported document types:

  • *.mmark files (to be used by Hugo)

Installation

pip install livingdocs

You should also install the Hugo binaries in order to generate your static site: https://gohugo.io/overview/installing/

Quick Start

Use the CLI command livingdocs to configure your Hugo site:

$ livingdocs
  Your site's title: <enter title>
  Your site's description: <enter description>
  ....

This will create a livingdocs folder in your root directory which will have a Hugo skeleton to create a static site.

Using a test runner like behave, you can generate documents for each feature, scenario and step. In environment.py, you can use the DocsMaker to capture this information:

from livingdocs.maker import DocsMaker

def before_all(context):
    context.docs = DocsMaker('feature')

def before_scenario(context, scenario):
    context.docs.start_scenario(context, scenario)

def after_scenario(context, scenario):
    context.docs.end_scenario(context, scenario)

def before_feature(context, feature):
    context.docs.start_feature(context, feature)

def after_feature(context, feature):
    context.docs.end_feature(context, feature)

def before_step(context, step):
    context.docs.start_step(context, step)

def after_step(context, step):
    """
    if context.browser is an instance
    of Selenium Webdriver, then it will
    take a snapshot of this step.
    """
    context.docs.end_step(context, step)

After you have successfully ran your tests, each test step will create its own documentation (and corresponding screenshot if you are using Selenium WebDriver). These new files will be placed in livingdocs/content/features. Once you have generated these files, we can build our static Hugo site with the following commands:

$ cd livingdocs
$ hugo

You will now have a static living docs site in the livingdocs/public directory.

Development

First create a virtual env, then to run the tests use:

tox -e py27

License

  • BSD License

About

📝 Create living documentation from BDD specs

pypi.python.org/pypi/livingdocs

Topics

bddbdd-specshugo

Resources

Readme
BSD-2-Clause license

Contributing

Contributing
Activity
Custom properties

Stars

6 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.