Development

Latest PyPI Version License Supported Python Versions Wheel format Monthly downloads

Installation

Binder (HEAD)

Development environment binder : https://mybinder.org/v2/gh/xflr6/graphviz/HEAD

Local installation

Install in a venv in development mode (includes all extras_require):

$ git clone https://github.com/xflr6/graphviz.git
$ cd graphviz
$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install -r requirements.txt

Platform: Windows

.venv\Script\activate.bat to replace source .venv/bin/activate

Hint

alteratively: pip install -e .[dev,test,docs] (same as pip install -r requirements.txt)

Tests

Build Codecov

Run the tests (in the current environment):

$ ./run-tests.py

Run only tests that are expected to PASS or XFAIL without Graphviz executables:

$ ./run-tests.py --skip-exe

Run the tests with tox (installing into a virtualenv or many of them):

$ python -m tox

Run the static type checker (pytype, supported platforms and Python versions):

$ pip install pytype
$ pytype

Run the code linter (flake8):

$ ./lint-code.py

Documentation

Readthedocs (stable) Readthedocs (latest)

Build the documentation with sphinx and sphinx-rtd-theme (in the current environment):

$ ./build-docs.py

Overview

Use help() in the REPL to shows/structure methods and attributes in dependency order:

Tip

In the above, cooperative multiple inheritance classes reveal their (diamond) MRO structure and methods are shown in method resolution order (MRO), which should be an extension of their dependency relation…

TLDR; you might find this presentation helps to follow the implementation.