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 dependency-groups):

$ git clone https://github.com/xflr6/graphviz.git
$ cd graphviz
$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install -e . --group dev

Platform: Windows

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

Tests

Build Codecov

Run the tests (in the current environment):

$ python run-tests.py

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

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

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

$ python -m tox

Run the code linter (flake8):

$ python lint-code.py

Run the type checker (mypy):

$ python typecheck-code.py

Documentation

Readthedocs (stable) Readthedocs (latest)

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

$ python 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.