Development¶
Changelog: https://graphviz.readthedocs.io/en/latest/changelog.html
Issue Tracker: https://github.com/xflr6/graphviz/issues
Installation¶
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¶
GitHub Actions Build workflow (Python 3.7 to 3.10, experimental: PyPy 3.7 to 3.9)
Codecov test coverage (main branch)
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 static type checker (pytype, supported platforms and Python versions):
$ pip install pytype
$ pytype
Run the code linter (flake8):
$ python lint-code.py
Documentation¶
Read the Docs Project Home: https://readthedocs.org/projects/graphviz/
stable: https://graphviz.readthedocs.io
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:
Introduction: https://graphviz.readthedocs.io/en/latest/api.html#online-help-internal
Graph
: https://github.com/xflr6/graphviz/blob/master/docs/api.rst#graph-1Digraph
: https://github.com/xflr6/graphviz/blob/master/docs/api.rst#digraph-1Source
: https://github.com/xflr6/graphviz/blob/master/docs/api.rst#source-1
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.