Codebase list python-graphviz / 3cf4128
Update upstream source from tag 'upstream/0.14.1' Update to upstream version '0.14.1' with Debian dir 0da94f338cbae28cf84ddf81a2dc11ae3d1a7fce TANIGUCHI Takaki 3 years ago
13 changed file(s) with 77 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
00 Changelog
11 =========
2
3
4 Version 0.14.1
5 --------------
6
7 Document the colon-separated ``node[:port[:compass]]`` format used for ``tail``
8 and ``head`` points in the ``edge()``- and ``edges()``-methods' (PR Michał
9 Góral).
210
311
412 Version 0.14
00 Metadata-Version: 2.1
11 Name: graphviz
2 Version: 0.14
2 Version: 0.14.1
33 Summary: Simple Python interface for Graphviz
44 Home-page: https://github.com/xflr6/graphviz
55 Author: Sebastian Bank
2424 author = 'Sebastian Bank'
2525
2626 # The short X.Y version
27 version = '0.14'
27 version = '0.14.1'
2828 # The full version, including alpha/beta/rc tags
2929 release = version
3030
9393 :align: center
9494
9595
96 .. _btree.py:
97
9698 btree.py
9799 --------
98100
5151 :attr:`~.Graph.comment` for the first source code line, etc.
5252
5353 Add nodes and edges to the graph object using its :meth:`~.Graph.node` and
54 :meth:`~.Graph.edge` or :meth:`~.Graph.edges` methods:
54 :meth:`~.Graph.edge`- or :meth:`~.Graph.edges`-methods:
5555
5656 .. code:: python
5757
260260 :align: center
261261
262262
263 .. _ports:
264
265 Node ports & compass
266 --------------------
267
268 The :meth:`~.Graph.edge`- and :meth:`~.Graph.edges`-methods use the
269 colon-separated format ``node[:port[:compass]]`` for ``tail`` and ``head``
270 nodes. This allows to specify an optional node ``port`` plus an optional
271 ``compass`` point the edge should aim at for the given tail or head node
272 (:ref:`example <btree.py>`).
273
274 As colons are used to indicate ``port`` and ``compass``, node names with
275 literal colon(s) (``:``) are not supported. Note that there is no such
276 restriction for the ``label`` argument, so you can work around by choosing a
277 colon-free ``name`` together with the wanted ``label``:
278
279 .. code:: python
280
281 >>> cpp = Digraph('C++')
282
283 >>> cpp.node('A', 'std::string')
284 >>> cpp.node('B', '"spam"')
285
286 >>> cpp.edge('A', 'B')
287
288 >>> print(cpp.source) # doctest: +NORMALIZE_WHITESPACE
289 digraph "C++" {
290 A [label="std::string"]
291 B [label="\"spam\""]
292 A -> B
293 }
294
295
263296 Backslash escapes
264297 -----------------
265298
444477 To add arbitrary statements to the created DOT_ source, use the
445478 :attr:`~.Graph.body` attribute of the :class:`.Graph` or :class:`.Digraph`
446479 object. It holds the verbatim list of lines to be written to the source file.
447 Use its ``append()`` or ``extend()`` method:
480 Use its ``append()``- or ``extend()``-method:
448481
449482 .. code:: python
450483
+0
-0
docs/requirements.txt less more
(Empty file)
4040 ]
4141
4242 __title__ = 'graphviz'
43 __version__ = '0.14'
43 __version__ = '0.14.1'
4444 __author__ = 'Sebastian Bank <sebastian.bank@uni-leipzig.de>'
4545 __license__ = 'MIT, see LICENSE.txt'
4646 __copyright__ = 'Copyright (c) 2013-2020 Sebastian Bank'
132132 self.body.append(line)
133133
134134 def edge(self, tail_name, head_name, label=None, _attributes=None, **attrs):
135 """Create an edge between two nodes.
136
137 Args:
138 tail_name: Start node identifier.
139 head_name: End node identifier.
135 """Create an edge between two nodes.
136
137 Args:
138 tail_name: Start node identifier (format: ``node[:port[:compass]]``).
139 head_name: End node identifier (format: ``node[:port[:compass]]``).
140140 label: Caption to be displayed near the edge.
141141 attrs: Any additional edge attributes (must be strings).
142
143 Note:
144 The ``tail_name`` and ``head_name`` strings are separated by
145 (optional) colon(s) into ``node`` name, ``port`` name, and
146 ``compass`` (e.g. ``sw``).
147 See :ref:`details in the User Guide <ports>`.
142148 """
143149 tail_name = self._quote_edge(tail_name)
144150 head_name = self._quote_edge(head_name)
150156 """Create a bunch of edges.
151157
152158 Args:
153 tail_head_iter: Iterable of ``(tail_name, head_name)`` pairs.
159 tail_head_iter: Iterable of ``(tail_name, head_name)`` pairs (format:``node[:port[:compass]]``).
160
161
162 Note:
163 The ``tail_name`` and ``head_name`` strings are separated by
164 (optional) colon(s) into ``node`` name, ``port`` name, and
165 ``compass`` (e.g. ``sw``).
166 See :ref:`details in the User Guide <ports>`.
154167 """
155168 edge = self._edge_plain
156169 quote = self._quote_edge
197210
198211 See the :ref:`usage examples in the User Guide <subgraphs>`.
199212
200 .. note::
213 Note:
201214 If the ``name`` of the subgraph begins with ``'cluster'`` (all lowercase)
202215 the layout engine will treat it as a special cluster subgraph.
203216 """
254267 strict (bool): Rendering should merge multi-edges.
255268
256269 Note:
257 All parameters are optional and can be changed under their
270 All parameters are `optional` and can be changed under their
258271 corresponding attribute name after instance creation.
259272 """
260273
00 Metadata-Version: 2.1
11 Name: graphviz
2 Version: 0.14
2 Version: 0.14.1
33 Summary: Simple Python interface for Graphviz
44 Home-page: https://github.com/xflr6/graphviz
55 Author: Sebastian Bank
1616 docs/manual.rst
1717 docs/notebooks.rst
1818 docs/pet-shop.png
19 docs/requirements.txt
2019 docs/round-table.png
2120 docs/_static/angles.svg
2221 docs/_static/btree.svg
66 twine
77
88 [docs]
9 sphinx>=1.7
9 sphinx>=1.8
1010 sphinx-rtd-theme
1111
1212 [test]
1313 mock>=3
14 pytest!=3.10.0,>=3.4
15 pytest-mock>=1.8
14 pytest>=4
15 pytest-mock>=2
1616 pytest-cov
77 universal = 1
88
99 [tool:pytest]
10 minversion = 3.4
10 minversion = 4
1111 testpaths = README.rst docs graphviz tests
1212 addopts =
1313 --doctest-modules --doctest-glob='*.rst' --ignore=docs/conf.py
44
55 setup(
66 name='graphviz',
7 version='0.14',
7 version='0.14.1',
88 author='Sebastian Bank',
99 author_email='sebastian.bank@uni-leipzig.de',
1010 description='Simple Python interface for Graphviz',
2121 python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
2222 extras_require={
2323 'dev': ['tox>=3', 'flake8', 'pep8-naming', 'wheel', 'twine'],
24 'test': ['mock>=3', 'pytest>=3.4,!=3.10.0', 'pytest-mock>=1.8', 'pytest-cov'],
25 'docs': ['sphinx>=1.7', 'sphinx-rtd-theme'],
24 'test': ['mock>=3', 'pytest>=4', 'pytest-mock>=2', 'pytest-cov'],
25 'docs': ['sphinx>=1.8', 'sphinx-rtd-theme'],
2626 },
2727 long_description=io.open('README.rst', encoding='utf-8').read(),
2828 classifiers=[