pygraphviz 2.0rc2__tar.gz → 2.0rc4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/INSTALL.txt +1 -1
- pygraphviz-2.0rc4/LICENSE.graphviz +277 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/MANIFEST.in +2 -1
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/PKG-INFO +10 -4
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/README.rst +6 -2
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/conf.py +7 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/install.rst +1 -1
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/release/index.rst +1 -0
- pygraphviz-2.0rc4/doc/source/release/release_dev.rst +38 -0
- pygraphviz-2.0rc4/examples/README.txt +6 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/__init__.py +10 -1
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/graphviz.i +4 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/graphviz.py +3 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_drawing.py +45 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_graph.py +26 -1
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_layout.py +11 -0
- pygraphviz-2.0rc4/pygraphviz/tests/test_pygraphviz.py +13 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_readwrite.py +19 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz.egg-info/PKG-INFO +10 -4
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz.egg-info/SOURCES.txt +3 -1
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pyproject.toml +3 -2
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/setup.py +15 -4
- pygraphviz-2.0rc2/doc/source/release/release_dev.rst +0 -39
- pygraphviz-2.0rc2/doc/source/tutorial.rst +0 -115
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/LICENSE +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/Makefile +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/Makefile +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/developer/contribute.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/developer/index.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/developer/release.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/index.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/reference/agraph.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/reference/credits.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/reference/history.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/reference/index.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/release/old_release_log.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/release/release_1.12.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/release/release_1.13.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/doc/source/release/release_1.14.rst +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/miles_dat.txt.gz +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/plot_attributes.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/plot_miles.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/plot_simple.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/plot_star.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/plot_subgraph.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/skip_django_simple.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/examples/skip_utf8_encoding.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/agraph.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/scraper.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/testing.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/__init__.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_attribute_defaults.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_clear.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_close.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_edge_attributes.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_html.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_node_attributes.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_repr_mimebundle.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_scraper.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_string.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_subgraph.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz/tests/test_unicode.py +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz.egg-info/dependency_links.txt +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/pygraphviz.egg-info/top_level.txt +0 -0
- {pygraphviz-2.0rc2 → pygraphviz-2.0rc4}/setup.cfg +0 -0
|
@@ -39,7 +39,7 @@ Install from Source
|
|
|
39
39
|
|
|
40
40
|
Building PyGraphviz from source requires:
|
|
41
41
|
|
|
42
|
-
- Python (version 3.11, 3.12, 3.13 or 3.14)
|
|
42
|
+
- Python (version 3.10, 3.11, 3.12, 3.13 or 3.14)
|
|
43
43
|
- `Graphviz <https://www.graphviz.org/>`_ (version 2.46 or later)
|
|
44
44
|
- C/C++ compiler
|
|
45
45
|
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
Eclipse Public License - v 2.0
|
|
2
|
+
|
|
3
|
+
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
|
|
4
|
+
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
|
|
5
|
+
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
|
6
|
+
|
|
7
|
+
1. DEFINITIONS
|
|
8
|
+
|
|
9
|
+
"Contribution" means:
|
|
10
|
+
|
|
11
|
+
a) in the case of the initial Contributor, the initial content
|
|
12
|
+
Distributed under this Agreement, and
|
|
13
|
+
|
|
14
|
+
b) in the case of each subsequent Contributor:
|
|
15
|
+
i) changes to the Program, and
|
|
16
|
+
ii) additions to the Program;
|
|
17
|
+
where such changes and/or additions to the Program originate from
|
|
18
|
+
and are Distributed by that particular Contributor. A Contribution
|
|
19
|
+
"originates" from a Contributor if it was added to the Program by
|
|
20
|
+
such Contributor itself or anyone acting on such Contributor's behalf.
|
|
21
|
+
Contributions do not include changes or additions to the Program that
|
|
22
|
+
are not Modified Works.
|
|
23
|
+
|
|
24
|
+
"Contributor" means any person or entity that Distributes the Program.
|
|
25
|
+
|
|
26
|
+
"Licensed Patents" mean patent claims licensable by a Contributor which
|
|
27
|
+
are necessarily infringed by the use or sale of its Contribution alone
|
|
28
|
+
or when combined with the Program.
|
|
29
|
+
|
|
30
|
+
"Program" means the Contributions Distributed in accordance with this
|
|
31
|
+
Agreement.
|
|
32
|
+
|
|
33
|
+
"Recipient" means anyone who receives the Program under this Agreement
|
|
34
|
+
or any Secondary License (as applicable), including Contributors.
|
|
35
|
+
|
|
36
|
+
"Derivative Works" shall mean any work, whether in Source Code or other
|
|
37
|
+
form, that is based on (or derived from) the Program and for which the
|
|
38
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
39
|
+
represent, as a whole, an original work of authorship.
|
|
40
|
+
|
|
41
|
+
"Modified Works" shall mean any work in Source Code or other form that
|
|
42
|
+
results from an addition to, deletion from, or modification of the
|
|
43
|
+
contents of the Program, including, for purposes of clarity any new file
|
|
44
|
+
in Source Code form that contains any contents of the Program. Modified
|
|
45
|
+
Works shall not include works that contain only declarations,
|
|
46
|
+
interfaces, types, classes, structures, or files of the Program solely
|
|
47
|
+
in each case in order to link to, bind by name, or subclass the Program
|
|
48
|
+
or Modified Works thereof.
|
|
49
|
+
|
|
50
|
+
"Distribute" means the acts of a) distributing or b) making available
|
|
51
|
+
in any manner that enables the transfer of a copy.
|
|
52
|
+
|
|
53
|
+
"Source Code" means the form of a Program preferred for making
|
|
54
|
+
modifications, including but not limited to software source code,
|
|
55
|
+
documentation source, and configuration files.
|
|
56
|
+
|
|
57
|
+
"Secondary License" means either the GNU General Public License,
|
|
58
|
+
Version 2.0, or any later versions of that license, including any
|
|
59
|
+
exceptions or additional permissions as identified by the initial
|
|
60
|
+
Contributor.
|
|
61
|
+
|
|
62
|
+
2. GRANT OF RIGHTS
|
|
63
|
+
|
|
64
|
+
a) Subject to the terms of this Agreement, each Contributor hereby
|
|
65
|
+
grants Recipient a non-exclusive, worldwide, royalty-free copyright
|
|
66
|
+
license to reproduce, prepare Derivative Works of, publicly display,
|
|
67
|
+
publicly perform, Distribute and sublicense the Contribution of such
|
|
68
|
+
Contributor, if any, and such Derivative Works.
|
|
69
|
+
|
|
70
|
+
b) Subject to the terms of this Agreement, each Contributor hereby
|
|
71
|
+
grants Recipient a non-exclusive, worldwide, royalty-free patent
|
|
72
|
+
license under Licensed Patents to make, use, sell, offer to sell,
|
|
73
|
+
import and otherwise transfer the Contribution of such Contributor,
|
|
74
|
+
if any, in Source Code or other form. This patent license shall
|
|
75
|
+
apply to the combination of the Contribution and the Program if, at
|
|
76
|
+
the time the Contribution is added by the Contributor, such addition
|
|
77
|
+
of the Contribution causes such combination to be covered by the
|
|
78
|
+
Licensed Patents. The patent license shall not apply to any other
|
|
79
|
+
combinations which include the Contribution. No hardware per se is
|
|
80
|
+
licensed hereunder.
|
|
81
|
+
|
|
82
|
+
c) Recipient understands that although each Contributor grants the
|
|
83
|
+
licenses to its Contributions set forth herein, no assurances are
|
|
84
|
+
provided by any Contributor that the Program does not infringe the
|
|
85
|
+
patent or other intellectual property rights of any other entity.
|
|
86
|
+
Each Contributor disclaims any liability to Recipient for claims
|
|
87
|
+
brought by any other entity based on infringement of intellectual
|
|
88
|
+
property rights or otherwise. As a condition to exercising the
|
|
89
|
+
rights and licenses granted hereunder, each Recipient hereby
|
|
90
|
+
assumes sole responsibility to secure any other intellectual
|
|
91
|
+
property rights needed, if any. For example, if a third party
|
|
92
|
+
patent license is required to allow Recipient to Distribute the
|
|
93
|
+
Program, it is Recipient's responsibility to acquire that license
|
|
94
|
+
before distributing the Program.
|
|
95
|
+
|
|
96
|
+
d) Each Contributor represents that to its knowledge it has
|
|
97
|
+
sufficient copyright rights in its Contribution, if any, to grant
|
|
98
|
+
the copyright license set forth in this Agreement.
|
|
99
|
+
|
|
100
|
+
e) Notwithstanding the terms of any Secondary License, no
|
|
101
|
+
Contributor makes additional grants to any Recipient (other than
|
|
102
|
+
those set forth in this Agreement) as a result of such Recipient's
|
|
103
|
+
receipt of the Program under the terms of a Secondary License
|
|
104
|
+
(if permitted under the terms of Section 3).
|
|
105
|
+
|
|
106
|
+
3. REQUIREMENTS
|
|
107
|
+
|
|
108
|
+
3.1 If a Contributor Distributes the Program in any form, then:
|
|
109
|
+
|
|
110
|
+
a) the Program must also be made available as Source Code, in
|
|
111
|
+
accordance with section 3.2, and the Contributor must accompany
|
|
112
|
+
the Program with a statement that the Source Code for the Program
|
|
113
|
+
is available under this Agreement, and informs Recipients how to
|
|
114
|
+
obtain it in a reasonable manner on or through a medium customarily
|
|
115
|
+
used for software exchange; and
|
|
116
|
+
|
|
117
|
+
b) the Contributor may Distribute the Program under a license
|
|
118
|
+
different than this Agreement, provided that such license:
|
|
119
|
+
i) effectively disclaims on behalf of all other Contributors all
|
|
120
|
+
warranties and conditions, express and implied, including
|
|
121
|
+
warranties or conditions of title and non-infringement, and
|
|
122
|
+
implied warranties or conditions of merchantability and fitness
|
|
123
|
+
for a particular purpose;
|
|
124
|
+
|
|
125
|
+
ii) effectively excludes on behalf of all other Contributors all
|
|
126
|
+
liability for damages, including direct, indirect, special,
|
|
127
|
+
incidental and consequential damages, such as lost profits;
|
|
128
|
+
|
|
129
|
+
iii) does not attempt to limit or alter the recipients' rights
|
|
130
|
+
in the Source Code under section 3.2; and
|
|
131
|
+
|
|
132
|
+
iv) requires any subsequent distribution of the Program by any
|
|
133
|
+
party to be under a license that satisfies the requirements
|
|
134
|
+
of this section 3.
|
|
135
|
+
|
|
136
|
+
3.2 When the Program is Distributed as Source Code:
|
|
137
|
+
|
|
138
|
+
a) it must be made available under this Agreement, or if the
|
|
139
|
+
Program (i) is combined with other material in a separate file or
|
|
140
|
+
files made available under a Secondary License, and (ii) the initial
|
|
141
|
+
Contributor attached to the Source Code the notice described in
|
|
142
|
+
Exhibit A of this Agreement, then the Program may be made available
|
|
143
|
+
under the terms of such Secondary Licenses, and
|
|
144
|
+
|
|
145
|
+
b) a copy of this Agreement must be included with each copy of
|
|
146
|
+
the Program.
|
|
147
|
+
|
|
148
|
+
3.3 Contributors may not remove or alter any copyright, patent,
|
|
149
|
+
trademark, attribution notices, disclaimers of warranty, or limitations
|
|
150
|
+
of liability ("notices") contained within the Program from any copy of
|
|
151
|
+
the Program which they Distribute, provided that Contributors may add
|
|
152
|
+
their own appropriate notices.
|
|
153
|
+
|
|
154
|
+
4. COMMERCIAL DISTRIBUTION
|
|
155
|
+
|
|
156
|
+
Commercial distributors of software may accept certain responsibilities
|
|
157
|
+
with respect to end users, business partners and the like. While this
|
|
158
|
+
license is intended to facilitate the commercial use of the Program,
|
|
159
|
+
the Contributor who includes the Program in a commercial product
|
|
160
|
+
offering should do so in a manner which does not create potential
|
|
161
|
+
liability for other Contributors. Therefore, if a Contributor includes
|
|
162
|
+
the Program in a commercial product offering, such Contributor
|
|
163
|
+
("Commercial Contributor") hereby agrees to defend and indemnify every
|
|
164
|
+
other Contributor ("Indemnified Contributor") against any losses,
|
|
165
|
+
damages and costs (collectively "Losses") arising from claims, lawsuits
|
|
166
|
+
and other legal actions brought by a third party against the Indemnified
|
|
167
|
+
Contributor to the extent caused by the acts or omissions of such
|
|
168
|
+
Commercial Contributor in connection with its distribution of the Program
|
|
169
|
+
in a commercial product offering. The obligations in this section do not
|
|
170
|
+
apply to any claims or Losses relating to any actual or alleged
|
|
171
|
+
intellectual property infringement. In order to qualify, an Indemnified
|
|
172
|
+
Contributor must: a) promptly notify the Commercial Contributor in
|
|
173
|
+
writing of such claim, and b) allow the Commercial Contributor to control,
|
|
174
|
+
and cooperate with the Commercial Contributor in, the defense and any
|
|
175
|
+
related settlement negotiations. The Indemnified Contributor may
|
|
176
|
+
participate in any such claim at its own expense.
|
|
177
|
+
|
|
178
|
+
For example, a Contributor might include the Program in a commercial
|
|
179
|
+
product offering, Product X. That Contributor is then a Commercial
|
|
180
|
+
Contributor. If that Commercial Contributor then makes performance
|
|
181
|
+
claims, or offers warranties related to Product X, those performance
|
|
182
|
+
claims and warranties are such Commercial Contributor's responsibility
|
|
183
|
+
alone. Under this section, the Commercial Contributor would have to
|
|
184
|
+
defend claims against the other Contributors related to those performance
|
|
185
|
+
claims and warranties, and if a court requires any other Contributor to
|
|
186
|
+
pay any damages as a result, the Commercial Contributor must pay
|
|
187
|
+
those damages.
|
|
188
|
+
|
|
189
|
+
5. NO WARRANTY
|
|
190
|
+
|
|
191
|
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
|
192
|
+
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
|
|
193
|
+
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
|
194
|
+
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
|
|
195
|
+
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
|
196
|
+
PURPOSE. Each Recipient is solely responsible for determining the
|
|
197
|
+
appropriateness of using and distributing the Program and assumes all
|
|
198
|
+
risks associated with its exercise of rights under this Agreement,
|
|
199
|
+
including but not limited to the risks and costs of program errors,
|
|
200
|
+
compliance with applicable laws, damage to or loss of data, programs
|
|
201
|
+
or equipment, and unavailability or interruption of operations.
|
|
202
|
+
|
|
203
|
+
6. DISCLAIMER OF LIABILITY
|
|
204
|
+
|
|
205
|
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
|
206
|
+
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
|
|
207
|
+
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
208
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
|
209
|
+
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
210
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
211
|
+
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
|
212
|
+
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
|
|
213
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
214
|
+
|
|
215
|
+
7. GENERAL
|
|
216
|
+
|
|
217
|
+
If any provision of this Agreement is invalid or unenforceable under
|
|
218
|
+
applicable law, it shall not affect the validity or enforceability of
|
|
219
|
+
the remainder of the terms of this Agreement, and without further
|
|
220
|
+
action by the parties hereto, such provision shall be reformed to the
|
|
221
|
+
minimum extent necessary to make such provision valid and enforceable.
|
|
222
|
+
|
|
223
|
+
If Recipient institutes patent litigation against any entity
|
|
224
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
|
225
|
+
Program itself (excluding combinations of the Program with other software
|
|
226
|
+
or hardware) infringes such Recipient's patent(s), then such Recipient's
|
|
227
|
+
rights granted under Section 2(b) shall terminate as of the date such
|
|
228
|
+
litigation is filed.
|
|
229
|
+
|
|
230
|
+
All Recipient's rights under this Agreement shall terminate if it
|
|
231
|
+
fails to comply with any of the material terms or conditions of this
|
|
232
|
+
Agreement and does not cure such failure in a reasonable period of
|
|
233
|
+
time after becoming aware of such noncompliance. If all Recipient's
|
|
234
|
+
rights under this Agreement terminate, Recipient agrees to cease use
|
|
235
|
+
and distribution of the Program as soon as reasonably practicable.
|
|
236
|
+
However, Recipient's obligations under this Agreement and any licenses
|
|
237
|
+
granted by Recipient relating to the Program shall continue and survive.
|
|
238
|
+
|
|
239
|
+
Everyone is permitted to copy and distribute copies of this Agreement,
|
|
240
|
+
but in order to avoid inconsistency the Agreement is copyrighted and
|
|
241
|
+
may only be modified in the following manner. The Agreement Steward
|
|
242
|
+
reserves the right to publish new versions (including revisions) of
|
|
243
|
+
this Agreement from time to time. No one other than the Agreement
|
|
244
|
+
Steward has the right to modify this Agreement. The Eclipse Foundation
|
|
245
|
+
is the initial Agreement Steward. The Eclipse Foundation may assign the
|
|
246
|
+
responsibility to serve as the Agreement Steward to a suitable separate
|
|
247
|
+
entity. Each new version of the Agreement will be given a distinguishing
|
|
248
|
+
version number. The Program (including Contributions) may always be
|
|
249
|
+
Distributed subject to the version of the Agreement under which it was
|
|
250
|
+
received. In addition, after a new version of the Agreement is published,
|
|
251
|
+
Contributor may elect to Distribute the Program (including its
|
|
252
|
+
Contributions) under the new version.
|
|
253
|
+
|
|
254
|
+
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
|
|
255
|
+
receives no rights or licenses to the intellectual property of any
|
|
256
|
+
Contributor under this Agreement, whether expressly, by implication,
|
|
257
|
+
estoppel or otherwise. All rights in the Program not expressly granted
|
|
258
|
+
under this Agreement are reserved. Nothing in this Agreement is intended
|
|
259
|
+
to be enforceable by any entity that is not a Contributor or Recipient.
|
|
260
|
+
No third-party beneficiary rights are created under this Agreement.
|
|
261
|
+
|
|
262
|
+
Exhibit A - Form of Secondary Licenses Notice
|
|
263
|
+
|
|
264
|
+
"This Source Code may also be made available under the following
|
|
265
|
+
Secondary Licenses when the conditions for such availability set forth
|
|
266
|
+
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
|
|
267
|
+
version(s), and exceptions or additional permissions here}."
|
|
268
|
+
|
|
269
|
+
Simply including a copy of this Agreement, including this Exhibit A
|
|
270
|
+
is not sufficient to license the Source Code under Secondary Licenses.
|
|
271
|
+
|
|
272
|
+
If it is not possible or desirable to put the notice in a particular
|
|
273
|
+
file, then You may include the notice in a location (such as a LICENSE
|
|
274
|
+
file in a relevant directory) where a recipient would be likely to
|
|
275
|
+
look for such a notice.
|
|
276
|
+
|
|
277
|
+
You may add additional accurate notices of copyright ownership.
|
|
@@ -2,6 +2,7 @@ include MANIFEST.in
|
|
|
2
2
|
include INSTALL.txt
|
|
3
3
|
include README.rst
|
|
4
4
|
include LICENSE
|
|
5
|
+
include LICENSE.graphviz
|
|
5
6
|
|
|
6
7
|
include *.py
|
|
7
8
|
include *.swg
|
|
@@ -9,7 +10,7 @@ include Makefile
|
|
|
9
10
|
|
|
10
11
|
recursive-include doc *.png
|
|
11
12
|
recursive-include pygraphviz *.i
|
|
12
|
-
recursive-include examples *.py *.gz
|
|
13
|
+
recursive-include examples *.py *.gz *.txt
|
|
13
14
|
recursive-include doc *.py *.rst Makefile *.html *.txt *.css
|
|
14
15
|
|
|
15
16
|
global-exclude *~
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygraphviz
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0rc4
|
|
4
4
|
Summary: Python interface to Graphviz
|
|
5
5
|
Author: Manos Renieris
|
|
6
6
|
Author-email: Aric Hagberg <aric.hagberg@gmail.com>, Dan Schult <dschult@colgate.edu>
|
|
@@ -20,6 +20,7 @@ Classifier: Intended Audience :: Science/Research
|
|
|
20
20
|
Classifier: Programming Language :: C
|
|
21
21
|
Classifier: Programming Language :: Python
|
|
22
22
|
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
26
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -30,16 +31,17 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
30
31
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
31
32
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
32
33
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
33
|
-
Requires-Python: >=3.
|
|
34
|
+
Requires-Python: >=3.10
|
|
34
35
|
Description-Content-Type: text/x-rst
|
|
35
36
|
License-File: LICENSE
|
|
37
|
+
License-File: LICENSE.graphviz
|
|
36
38
|
Dynamic: license-file
|
|
37
39
|
|
|
38
40
|
PyGraphviz
|
|
39
41
|
==========
|
|
40
42
|
|
|
41
|
-
.. image:: https://github.com/pygraphviz/pygraphviz/workflows/test/badge.svg
|
|
42
|
-
:target: https://github.com/pygraphviz/pygraphviz/actions
|
|
43
|
+
.. image:: https://github.com/pygraphviz/pygraphviz/workflows/test/badge.svg
|
|
44
|
+
:target: https://github.com/pygraphviz/pygraphviz/actions/workflows/test.yml
|
|
43
45
|
|
|
44
46
|
.. image:: https://codecov.io/gh/pygraphviz/pygraphviz/branch/main/graph/badge.svg
|
|
45
47
|
:target: https://app.codecov.io/gh/pygraphviz/pygraphviz/branch/main
|
|
@@ -87,3 +89,7 @@ Released under the 3-Clause BSD license (see ``LICENSE``)::
|
|
|
87
89
|
Aric Hagberg <aric.hagberg@gmail.gov>
|
|
88
90
|
Dan Schult <dschult@colgate.edu>
|
|
89
91
|
Manos Renieris
|
|
92
|
+
|
|
93
|
+
The binary wheels distributed on PyPI bundle the Graphviz libraries and
|
|
94
|
+
command-line tools, which are licensed separately under the Eclipse Public
|
|
95
|
+
License v2.0 (see ``LICENSE.graphviz``).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PyGraphviz
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
-
.. image:: https://github.com/pygraphviz/pygraphviz/workflows/test/badge.svg
|
|
5
|
-
:target: https://github.com/pygraphviz/pygraphviz/actions
|
|
4
|
+
.. image:: https://github.com/pygraphviz/pygraphviz/workflows/test/badge.svg
|
|
5
|
+
:target: https://github.com/pygraphviz/pygraphviz/actions/workflows/test.yml
|
|
6
6
|
|
|
7
7
|
.. image:: https://codecov.io/gh/pygraphviz/pygraphviz/branch/main/graph/badge.svg
|
|
8
8
|
:target: https://app.codecov.io/gh/pygraphviz/pygraphviz/branch/main
|
|
@@ -50,3 +50,7 @@ Released under the 3-Clause BSD license (see ``LICENSE``)::
|
|
|
50
50
|
Aric Hagberg <aric.hagberg@gmail.gov>
|
|
51
51
|
Dan Schult <dschult@colgate.edu>
|
|
52
52
|
Manos Renieris
|
|
53
|
+
|
|
54
|
+
The binary wheels distributed on PyPI bundle the Graphviz libraries and
|
|
55
|
+
command-line tools, which are licensed separately under the Eclipse Public
|
|
56
|
+
License v2.0 (see ``LICENSE.graphviz``).
|
|
@@ -22,6 +22,7 @@ extensions = [
|
|
|
22
22
|
"sphinx.ext.imgconverter",
|
|
23
23
|
"sphinx_gallery.gen_gallery",
|
|
24
24
|
"numpydoc",
|
|
25
|
+
"myst_nb",
|
|
25
26
|
]
|
|
26
27
|
|
|
27
28
|
# General substitutions.
|
|
@@ -67,6 +68,12 @@ add_module_names = False
|
|
|
67
68
|
pygments_style = "sphinx"
|
|
68
69
|
|
|
69
70
|
|
|
71
|
+
def setup(app):
|
|
72
|
+
# Workaround to prevent duplicate file warnings from sphinx due to having
|
|
73
|
+
# both myst-nb and sphinx-gallery generating executable files
|
|
74
|
+
app.registry.source_suffix.pop(".ipynb")
|
|
75
|
+
|
|
76
|
+
|
|
70
77
|
# Options for HTML output
|
|
71
78
|
# -----------------------
|
|
72
79
|
|
|
@@ -39,7 +39,7 @@ Install from Source
|
|
|
39
39
|
|
|
40
40
|
Building PyGraphviz from source requires:
|
|
41
41
|
|
|
42
|
-
- Python (version 3.11, 3.12, 3.13 or 3.14)
|
|
42
|
+
- Python (version 3.10, 3.11, 3.12, 3.13 or 3.14)
|
|
43
43
|
- `Graphviz <https://www.graphviz.org/>`_ (version 2.46 or later)
|
|
44
44
|
- C/C++ compiler
|
|
45
45
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
pygraphviz 2.0rc4
|
|
2
|
+
=================
|
|
3
|
+
|
|
4
|
+
We're happy to announce the release of pygraphviz 2.0rc4!
|
|
5
|
+
|
|
6
|
+
Documentation
|
|
7
|
+
-------------
|
|
8
|
+
|
|
9
|
+
- DOC: Make tutorial executable, run as part of doc build (`#629 <https://github.com/pygraphviz/pygraphviz/pull/629>`_).
|
|
10
|
+
- DOC: Add DOT special characters to documentation (`#628 <https://github.com/pygraphviz/pygraphviz/pull/628>`_).
|
|
11
|
+
|
|
12
|
+
Maintenance
|
|
13
|
+
-----------
|
|
14
|
+
|
|
15
|
+
- DOC: Fix testing badge readme (`#626 <https://github.com/pygraphviz/pygraphviz/pull/626>`_).
|
|
16
|
+
- Add graphviz license to the wheel (`#627 <https://github.com/pygraphviz/pygraphviz/pull/627>`_).
|
|
17
|
+
|
|
18
|
+
Other
|
|
19
|
+
-----
|
|
20
|
+
|
|
21
|
+
- Add Python 3.10 support for 2.0 release (`#625 <https://github.com/pygraphviz/pygraphviz/pull/625>`_).
|
|
22
|
+
|
|
23
|
+
Contributors
|
|
24
|
+
------------
|
|
25
|
+
|
|
26
|
+
2 authors added to this release (alphabetically):
|
|
27
|
+
|
|
28
|
+
- Mridul Seth (`@MridulS <https://github.com/MridulS>`_)
|
|
29
|
+
- Ross Barnowski (`@rossbar <https://github.com/rossbar>`_)
|
|
30
|
+
|
|
31
|
+
3 reviewers added to this release (alphabetically):
|
|
32
|
+
|
|
33
|
+
- Dan Schult (`@dschult <https://github.com/dschult>`_)
|
|
34
|
+
- Mridul Seth (`@MridulS <https://github.com/MridulS>`_)
|
|
35
|
+
- Ross Barnowski (`@rossbar <https://github.com/rossbar>`_)
|
|
36
|
+
|
|
37
|
+
_These lists are automatically generated, and may not be complete or may contain
|
|
38
|
+
duplicates._
|
|
@@ -26,7 +26,16 @@ if sys.version_info >= (3, 8, 0) and sys.platform == "win32":
|
|
|
26
26
|
os.add_dll_directory(path)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
from ._graphviz import (
|
|
30
|
+
GRAPHVIZ_MAJOR_VERSION,
|
|
31
|
+
GRAPHVIZ_MINOR_VERSION,
|
|
32
|
+
GRAPHVIZ_PATCH_VERSION,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
__version__ = "2.0rc4"
|
|
36
|
+
__graphviz_version__ = (
|
|
37
|
+
f"{GRAPHVIZ_MAJOR_VERSION}.{GRAPHVIZ_MINOR_VERSION}.{GRAPHVIZ_PATCH_VERSION}"
|
|
38
|
+
)
|
|
30
39
|
|
|
31
40
|
from .agraph import AGraph, Attribute, DotError, Edge, ItemAttribute, Node
|
|
32
41
|
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
#include <string.h>
|
|
12
12
|
%}
|
|
13
13
|
|
|
14
|
+
#define GRAPHVIZ_MAJOR_VERSION GRAPHVIZ_VERSION_MAJOR
|
|
15
|
+
#define GRAPHVIZ_MINOR_VERSION GRAPHVIZ_VERSION_MINOR
|
|
16
|
+
#define GRAPHVIZ_PATCH_VERSION GRAPHVIZ_VERSION_PATCH
|
|
17
|
+
|
|
14
18
|
%typemap(in) FILE* input_file (int fd, PyObject *mode_obj, PyObject *mode_byte_obj, char *mode) {
|
|
15
19
|
if ($input == Py_None) { $1 = NULL; }
|
|
16
20
|
else {
|
|
@@ -58,6 +58,9 @@ class _SwigNonDynamicMeta(type):
|
|
|
58
58
|
__setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
GRAPHVIZ_MAJOR_VERSION = _graphviz.GRAPHVIZ_MAJOR_VERSION
|
|
62
|
+
GRAPHVIZ_MINOR_VERSION = _graphviz.GRAPHVIZ_MINOR_VERSION
|
|
63
|
+
GRAPHVIZ_PATCH_VERSION = _graphviz.GRAPHVIZ_PATCH_VERSION
|
|
61
64
|
|
|
62
65
|
def agopen(name, kind, disc):
|
|
63
66
|
return _graphviz.agopen(name, kind, disc)
|
|
@@ -1,7 +1,52 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
import pygraphviz as pgv
|
|
2
3
|
import pytest
|
|
3
4
|
|
|
4
5
|
|
|
6
|
+
def test_drawing_hex_colors(tmp_path):
|
|
7
|
+
"""Ensure hex colors are supported without warnings - see gh-351."""
|
|
8
|
+
# fmt: off
|
|
9
|
+
dotstr = """
|
|
10
|
+
digraph dag {
|
|
11
|
+
ratio=fill
|
|
12
|
+
node [style=filled,color="#444444",fillcolor="#ffed6f"]
|
|
13
|
+
edge [arrowhead=normal,arrowsize=1.0]
|
|
14
|
+
|
|
15
|
+
"ID0000001" [shape=ellipse,color="#000000",fillcolor="#1b9e77",label="preprocess\nID0000001"]
|
|
16
|
+
"ID0000002" [shape=ellipse,color="#000000",fillcolor="#d95f02",label="findrange\nID0000002"]
|
|
17
|
+
"ID0000003" [shape=ellipse,color="#000000",fillcolor="#d95f02",label="findrange\nID0000003"]
|
|
18
|
+
"ID0000004" [shape=ellipse,color="#000000",fillcolor="#7570b3",label="analyze\nID0000004"]
|
|
19
|
+
"f.a" [shape=rect,color="#000000",fillcolor="#ffed6f",label="f.a"]
|
|
20
|
+
"f.b1" [shape=rect,color="#000000",fillcolor="#ffed6f",label="f.b1"]
|
|
21
|
+
"f.b2" [shape=rect,color="#000000",fillcolor="#ffed6f",label="f.b2"]
|
|
22
|
+
"f.c1" [shape=rect,color="#000000",fillcolor="#ffed6f",label="f.c1"]
|
|
23
|
+
"f.c2" [shape=rect,color="#000000",fillcolor="#ffed6f",label="f.c2"]
|
|
24
|
+
"f.d" [shape=rect,color="#000000",fillcolor="#ffed6f",label="f.d"]
|
|
25
|
+
"ID0000001" -> "f.b1" [color="#000000"]
|
|
26
|
+
"ID0000001" -> "f.b2" [color="#000000"]
|
|
27
|
+
"ID0000001" -> "ID0000003" [color="#000000"]
|
|
28
|
+
"ID0000001" -> "ID0000002" [color="#000000"]
|
|
29
|
+
"ID0000002" -> "f.c1" [color="#000000"]
|
|
30
|
+
"ID0000002" -> "ID0000004" [color="#000000"]
|
|
31
|
+
"ID0000003" -> "f.c2" [color="#000000"]
|
|
32
|
+
"ID0000003" -> "ID0000004" [color="#000000"]
|
|
33
|
+
"ID0000004" -> "f.d" [color="#000000"]
|
|
34
|
+
"f.a" -> "ID0000001" [color="#000000"]
|
|
35
|
+
"f.b1" -> "ID0000002" [color="#000000"]
|
|
36
|
+
"f.b2" -> "ID0000003" [color="#000000"]
|
|
37
|
+
"f.c1" -> "ID0000004" [color="#000000"]
|
|
38
|
+
"f.c2" -> "ID0000004" [color="#000000"]
|
|
39
|
+
}
|
|
40
|
+
"""
|
|
41
|
+
# fmt: on
|
|
42
|
+
A = pgv.AGraph()
|
|
43
|
+
A.from_string(dotstr)
|
|
44
|
+
with warnings.catch_warnings(record=True) as rec:
|
|
45
|
+
A.layout("dot")
|
|
46
|
+
A.draw(str(tmp_path / "img.png"))
|
|
47
|
+
assert len(rec) == 0
|
|
48
|
+
|
|
49
|
+
|
|
5
50
|
def test_drawing_error():
|
|
6
51
|
with pytest.raises(AttributeError):
|
|
7
52
|
A = pgv.AGraph(name="test graph")
|
|
@@ -6,6 +6,14 @@ import pygraphviz as pgv
|
|
|
6
6
|
stringify = pgv.testing.stringify
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
def test_agraph_multiedges():
|
|
10
|
+
"""See gh-162"""
|
|
11
|
+
G = pgv.AGraph(strict=False)
|
|
12
|
+
G.add_edge("a", "b", "first")
|
|
13
|
+
G.add_edge("a", "b", "second")
|
|
14
|
+
assert sorted(G.edges(keys=True)) == [("a", "b", "first"), ("a", "b", "second")]
|
|
15
|
+
|
|
16
|
+
|
|
9
17
|
def test_tred():
|
|
10
18
|
A = pgv.AGraph(directed=True)
|
|
11
19
|
A.add_edges_from([(0, 1), (1, 2), (0, 2)])
|
|
@@ -35,11 +43,12 @@ def test_tred_cycle():
|
|
|
35
43
|
"""RuntimeWarning raised when cycle detected."""
|
|
36
44
|
A = pgv.AGraph(directed=True)
|
|
37
45
|
A.add_edges_from([(0, 1), (1, 2), (2, 0)]) # Directed 3-cycle
|
|
38
|
-
with warnings.catch_warnings(record=True
|
|
46
|
+
with warnings.catch_warnings(record=True) as rec:
|
|
39
47
|
A.tred()
|
|
40
48
|
# No transitive reduction possible on 3-cycle
|
|
41
49
|
assert A.edges() == [("0", "1"), ("1", "2"), ("2", "0")]
|
|
42
50
|
assert len(rec) == 1 # Expect 1 RuntimeWarning
|
|
51
|
+
assert rec[0].category == RuntimeWarning
|
|
43
52
|
assert "transitive reduction not unique" in str(rec[0].message)
|
|
44
53
|
|
|
45
54
|
|
|
@@ -565,3 +574,19 @@ def test_repr_on_incomplete_initialization():
|
|
|
565
574
|
in __repr__ when object initialization fails. See gh-519."""
|
|
566
575
|
with pytest.raises(TypeError, match="Unrecognized input"):
|
|
567
576
|
A = pgv.AGraph(object())
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
@pytest.mark.parametrize(
|
|
580
|
+
"node",
|
|
581
|
+
(
|
|
582
|
+
"Node D_0__Bacteria D_1__Cyanobacteria D_2__Chloroplast D_3__Bryum argenteum var. argenteum D_4__Bryum argenteum var. argenteum D_5__Bryum argenteum var. argenteum D_6__Bryum argenteum var", # Very long node name
|
|
583
|
+
"xxxxxx市中西医结合医疗健康集团xxxxx分院(xxx市xxxxxxxxxx镇卫生院、xxx市xxxxxxxxxxx镇社区卫生服务中心)(15094137051)", # with unicode
|
|
584
|
+
),
|
|
585
|
+
)
|
|
586
|
+
def test_long_node(node):
|
|
587
|
+
"""Test agnode doesn't fail when graph contains very long nodes. See gh-123."""
|
|
588
|
+
A = pgv.AGraph(directed=True)
|
|
589
|
+
A.add_nodes_from(list(range(5)) + [node])
|
|
590
|
+
A.layout() # Smoke test - should not raise
|
|
591
|
+
# Check each node was assigned a position
|
|
592
|
+
assert A.to_string().count("pos") == 6
|
|
@@ -3,6 +3,17 @@ import pytest
|
|
|
3
3
|
import pygraphviz as pgv
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
def test_sequential_layout_filehandles_windows():
|
|
7
|
+
"""See gh-483"""
|
|
8
|
+
# Check that a bunch of sequential layout calls doesn't bork windows
|
|
9
|
+
for _ in range(512):
|
|
10
|
+
A = pgv.AGraph()
|
|
11
|
+
A.layout()
|
|
12
|
+
# The existence of "node" in the graph is an indication that the layout
|
|
13
|
+
# was run successfully.
|
|
14
|
+
assert "node" in A.to_string()
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
def test_layout():
|
|
7
18
|
A = pgv.AGraph(name="test graph")
|
|
8
19
|
A.add_path([1, 2, 3, 4])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
import pygraphviz as pgv
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_graphviz_version():
|
|
7
|
+
"""Test to ensure package exports the __graphviz_version__ attribute, which
|
|
8
|
+
holds the version info for the packaged graphviz version."""
|
|
9
|
+
# Smoke test - the following lines will fail if e.g. __graphviz_version__
|
|
10
|
+
# is not present or the version string takes an unexpected form
|
|
11
|
+
graphviz_version = pgv.__graphviz_version__
|
|
12
|
+
vmaj, vmin, vpatch = graphviz_version.split(".")
|
|
13
|
+
assert int(vmaj) >= 2
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
import pytest
|
|
1
2
|
import pygraphviz as pgv
|
|
2
3
|
|
|
4
|
+
graphviz_major_version = int(pgv.__graphviz_version__.split(".")[0])
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@pytest.mark.skipif(graphviz_major_version < 13, reason="Graphviz version too old")
|
|
8
|
+
def test_multiple_reads_same_source_trailing_character(tmp_path):
|
|
9
|
+
"""Ensure multiple reads from the same text file with an unexpected trailing
|
|
10
|
+
character don't cause agread fails. See gh-171."""
|
|
11
|
+
fpath = tmp_path / "hello.gv.txt"
|
|
12
|
+
# Original bug was in the read-from-file code path
|
|
13
|
+
with open(fpath, "w") as fh:
|
|
14
|
+
fh.write('digraph G {Hello->World}"') # note the trailing "
|
|
15
|
+
|
|
16
|
+
# Smoke test: sequential reads from the same file via the AGraph constructor
|
|
17
|
+
# should not raise ValueError/DotError
|
|
18
|
+
A = pgv.AGraph(str(fpath))
|
|
19
|
+
B = pgv.AGraph(str(fpath))
|
|
20
|
+
assert A.to_string() == B.to_string()
|
|
21
|
+
|
|
3
22
|
|
|
4
23
|
def test_readwrite(tmp_path):
|
|
5
24
|
A = pgv.AGraph(name="test graph")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygraphviz
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0rc4
|
|
4
4
|
Summary: Python interface to Graphviz
|
|
5
5
|
Author: Manos Renieris
|
|
6
6
|
Author-email: Aric Hagberg <aric.hagberg@gmail.com>, Dan Schult <dschult@colgate.edu>
|
|
@@ -20,6 +20,7 @@ Classifier: Intended Audience :: Science/Research
|
|
|
20
20
|
Classifier: Programming Language :: C
|
|
21
21
|
Classifier: Programming Language :: Python
|
|
22
22
|
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
26
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -30,16 +31,17 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
30
31
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
31
32
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
32
33
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
33
|
-
Requires-Python: >=3.
|
|
34
|
+
Requires-Python: >=3.10
|
|
34
35
|
Description-Content-Type: text/x-rst
|
|
35
36
|
License-File: LICENSE
|
|
37
|
+
License-File: LICENSE.graphviz
|
|
36
38
|
Dynamic: license-file
|
|
37
39
|
|
|
38
40
|
PyGraphviz
|
|
39
41
|
==========
|
|
40
42
|
|
|
41
|
-
.. image:: https://github.com/pygraphviz/pygraphviz/workflows/test/badge.svg
|
|
42
|
-
:target: https://github.com/pygraphviz/pygraphviz/actions
|
|
43
|
+
.. image:: https://github.com/pygraphviz/pygraphviz/workflows/test/badge.svg
|
|
44
|
+
:target: https://github.com/pygraphviz/pygraphviz/actions/workflows/test.yml
|
|
43
45
|
|
|
44
46
|
.. image:: https://codecov.io/gh/pygraphviz/pygraphviz/branch/main/graph/badge.svg
|
|
45
47
|
:target: https://app.codecov.io/gh/pygraphviz/pygraphviz/branch/main
|
|
@@ -87,3 +89,7 @@ Released under the 3-Clause BSD license (see ``LICENSE``)::
|
|
|
87
89
|
Aric Hagberg <aric.hagberg@gmail.gov>
|
|
88
90
|
Dan Schult <dschult@colgate.edu>
|
|
89
91
|
Manos Renieris
|
|
92
|
+
|
|
93
|
+
The binary wheels distributed on PyPI bundle the Graphviz libraries and
|
|
94
|
+
command-line tools, which are licensed separately under the Eclipse Public
|
|
95
|
+
License v2.0 (see ``LICENSE.graphviz``).
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
INSTALL.txt
|
|
2
2
|
LICENSE
|
|
3
|
+
LICENSE.graphviz
|
|
3
4
|
MANIFEST.in
|
|
4
5
|
Makefile
|
|
5
6
|
README.rst
|
|
@@ -9,7 +10,6 @@ doc/Makefile
|
|
|
9
10
|
doc/source/conf.py
|
|
10
11
|
doc/source/index.rst
|
|
11
12
|
doc/source/install.rst
|
|
12
|
-
doc/source/tutorial.rst
|
|
13
13
|
doc/source/developer/contribute.rst
|
|
14
14
|
doc/source/developer/index.rst
|
|
15
15
|
doc/source/developer/release.rst
|
|
@@ -23,6 +23,7 @@ doc/source/release/release_1.12.rst
|
|
|
23
23
|
doc/source/release/release_1.13.rst
|
|
24
24
|
doc/source/release/release_1.14.rst
|
|
25
25
|
doc/source/release/release_dev.rst
|
|
26
|
+
examples/README.txt
|
|
26
27
|
examples/miles_dat.txt.gz
|
|
27
28
|
examples/plot_attributes.py
|
|
28
29
|
examples/plot_miles.py
|
|
@@ -51,6 +52,7 @@ pygraphviz/tests/test_graph.py
|
|
|
51
52
|
pygraphviz/tests/test_html.py
|
|
52
53
|
pygraphviz/tests/test_layout.py
|
|
53
54
|
pygraphviz/tests/test_node_attributes.py
|
|
55
|
+
pygraphviz/tests/test_pygraphviz.py
|
|
54
56
|
pygraphviz/tests/test_readwrite.py
|
|
55
57
|
pygraphviz/tests/test_repr_mimebundle.py
|
|
56
58
|
pygraphviz/tests/test_scraper.py
|
|
@@ -11,9 +11,9 @@ authors = [
|
|
|
11
11
|
]
|
|
12
12
|
description = "Python interface to Graphviz"
|
|
13
13
|
readme = "README.rst"
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.10"
|
|
15
15
|
license = "BSD-3-Clause"
|
|
16
|
-
license-files = ['LICENSE']
|
|
16
|
+
license-files = ['LICENSE', 'LICENSE.graphviz']
|
|
17
17
|
dynamic = ["version"]
|
|
18
18
|
keywords = [
|
|
19
19
|
"Networks",
|
|
@@ -29,6 +29,7 @@ classifiers = [
|
|
|
29
29
|
"Programming Language :: C",
|
|
30
30
|
"Programming Language :: Python",
|
|
31
31
|
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
32
33
|
"Programming Language :: Python :: 3.11",
|
|
33
34
|
"Programming Language :: Python :: 3.12",
|
|
34
35
|
"Programming Language :: Python :: 3.13",
|
|
@@ -23,11 +23,22 @@ if __name__ == "__main__":
|
|
|
23
23
|
"Graphviz must be installed to build pygraphviz from source.\n\n"
|
|
24
24
|
) from e
|
|
25
25
|
|
|
26
|
-
vm = re.match(r"dot - graphviz version
|
|
27
|
-
|
|
28
|
-
print(f"Detected Graphviz version {
|
|
26
|
+
vm = re.match(r"dot - graphviz version \d+(\.\d+)+", version_str.decode())
|
|
27
|
+
graphviz_version = vm.string[: vm.end()].split(" ")[-1]
|
|
28
|
+
print(f"Detected Graphviz version {graphviz_version}")
|
|
29
|
+
|
|
30
|
+
vmaj, vmin, vpatch = graphviz_version.split(".")
|
|
31
|
+
# NOTE: int() is not strictly necessary, but used as implicit validation of
|
|
32
|
+
# version string
|
|
33
|
+
graphviz_major_version = int(vmaj)
|
|
34
|
+
graphviz_minor_version = int(vmin)
|
|
35
|
+
graphviz_patch_version = int(vpatch)
|
|
29
36
|
# Pass version info into swig build
|
|
30
|
-
swig_options = [
|
|
37
|
+
swig_options = [
|
|
38
|
+
f"-DGRAPHVIZ_VERSION_MAJOR={graphviz_major_version}",
|
|
39
|
+
f"-DGRAPHVIZ_VERSION_MINOR={graphviz_minor_version}",
|
|
40
|
+
f"-DGRAPHVIZ_VERSION_PATCH={graphviz_patch_version}",
|
|
41
|
+
]
|
|
31
42
|
|
|
32
43
|
define_macros = [("SWIG_PYTHON_STRICT_BYTE_CHAR", None)]
|
|
33
44
|
if WINDOWS:
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
pygraphviz 2.0rc2
|
|
2
|
-
=================
|
|
3
|
-
|
|
4
|
-
We're happy to announce the release of pygraphviz 2.0rc2!
|
|
5
|
-
|
|
6
|
-
Documentation
|
|
7
|
-
-------------
|
|
8
|
-
|
|
9
|
-
- Update docs for 2.0 (`#609 <https://github.com/pygraphviz/pygraphviz/pull/609>`_).
|
|
10
|
-
|
|
11
|
-
Maintenance
|
|
12
|
-
-----------
|
|
13
|
-
|
|
14
|
-
- More 2.0 cleanups (`#610 <https://github.com/pygraphviz/pygraphviz/pull/610>`_).
|
|
15
|
-
- Update type of id param to IDTYPE in swig wrapper (`#611 <https://github.com/pygraphviz/pygraphviz/pull/611>`_).
|
|
16
|
-
- Add Python 3.11 support for 2.0 release (`#613 <https://github.com/pygraphviz/pygraphviz/pull/613>`_).
|
|
17
|
-
- CONF: escaped slashes in windows pathspec (`#614 <https://github.com/pygraphviz/pygraphviz/pull/614>`_).
|
|
18
|
-
- TST: Add tests for ``tred`` method (`#615 <https://github.com/pygraphviz/pygraphviz/pull/615>`_).
|
|
19
|
-
|
|
20
|
-
Contributors
|
|
21
|
-
------------
|
|
22
|
-
|
|
23
|
-
5 authors added to this release (alphabetically):
|
|
24
|
-
|
|
25
|
-
- Dan Schult (`@dschult <https://github.com/dschult>`_)
|
|
26
|
-
- Jarrod Millman (`@jarrodmillman <https://github.com/jarrodmillman>`_)
|
|
27
|
-
- Matthew Fernandez (`@Smattr <https://github.com/Smattr>`_)
|
|
28
|
-
- Mridul Seth (`@MridulS <https://github.com/MridulS>`_)
|
|
29
|
-
- Ross Barnowski (`@rossbar <https://github.com/rossbar>`_)
|
|
30
|
-
|
|
31
|
-
4 reviewers added to this release (alphabetically):
|
|
32
|
-
|
|
33
|
-
- Dan Schult (`@dschult <https://github.com/dschult>`_)
|
|
34
|
-
- Matthew Fernandez (`@Smattr <https://github.com/Smattr>`_)
|
|
35
|
-
- Mridul Seth (`@MridulS <https://github.com/MridulS>`_)
|
|
36
|
-
- Ross Barnowski (`@rossbar <https://github.com/rossbar>`_)
|
|
37
|
-
|
|
38
|
-
_These lists are automatically generated, and may not be complete or may contain
|
|
39
|
-
duplicates._
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
Tutorial
|
|
2
|
-
========
|
|
3
|
-
|
|
4
|
-
The API is very similar to that of NetworkX. Much of the
|
|
5
|
-
`NetworkX tutorial <https://networkx.org/documentation/latest/tutorial.html>`_
|
|
6
|
-
is applicable to PyGraphviz.
|
|
7
|
-
|
|
8
|
-
Start-up
|
|
9
|
-
--------
|
|
10
|
-
|
|
11
|
-
Import PyGraphviz with
|
|
12
|
-
|
|
13
|
-
>>> import pygraphviz as pgv
|
|
14
|
-
|
|
15
|
-
Graphs
|
|
16
|
-
------
|
|
17
|
-
|
|
18
|
-
To make an empty pygraphviz graph use the AGraph class:
|
|
19
|
-
|
|
20
|
-
>>> G = pgv.AGraph()
|
|
21
|
-
|
|
22
|
-
You can use the strict and directed keywords to control what type of
|
|
23
|
-
graph you want. The default is to create a strict graph
|
|
24
|
-
(no parallel edges or self-loops). To create a digraph with possible
|
|
25
|
-
parallel edges and self-loops use
|
|
26
|
-
|
|
27
|
-
>>> G = pgv.AGraph(strict=False, directed=True)
|
|
28
|
-
|
|
29
|
-
You may specify a dot format file to be read on initialization:
|
|
30
|
-
|
|
31
|
-
>>> G = pgv.AGraph("Petersen.dot") # doctest: +SKIP
|
|
32
|
-
|
|
33
|
-
Other options for initializing a graph are using a string,
|
|
34
|
-
|
|
35
|
-
>>> G = pgv.AGraph("graph {1 - 2}")
|
|
36
|
-
|
|
37
|
-
using a dict of dicts,
|
|
38
|
-
|
|
39
|
-
>>> d = {"1": {"2": None}, "2": {"1": None, "3": None}, "3": {"2": None}}
|
|
40
|
-
>>> A = pgv.AGraph(d)
|
|
41
|
-
|
|
42
|
-
or using a SWIG pointer to the AGraph datastructure,
|
|
43
|
-
|
|
44
|
-
>>> h = A.handle
|
|
45
|
-
>>> C = pgv.AGraph(h)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Nodes, and edges
|
|
49
|
-
----------------
|
|
50
|
-
|
|
51
|
-
Nodes and edges can be added one at a time
|
|
52
|
-
|
|
53
|
-
>>> G.add_node("a") # adds node 'a'
|
|
54
|
-
>>> G.add_edge("b", "c") # adds edge 'b'-'c' (and also nodes 'b', 'c')
|
|
55
|
-
|
|
56
|
-
or from lists or containers.
|
|
57
|
-
|
|
58
|
-
>>> nodelist = ["f", "g", "h"]
|
|
59
|
-
>>> G.add_nodes_from(nodelist)
|
|
60
|
-
|
|
61
|
-
If the node is not a string an attempt will be made to convert it
|
|
62
|
-
to a string
|
|
63
|
-
|
|
64
|
-
>>> G.add_node(1) # adds node '1'
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Attributes
|
|
68
|
-
----------
|
|
69
|
-
|
|
70
|
-
To set the default attributes for graphs, nodes, and edges use
|
|
71
|
-
the graph_attr, node_attr, and edge_attr dictionaries
|
|
72
|
-
|
|
73
|
-
>>> G.graph_attr["label"] = "Name of graph"
|
|
74
|
-
>>> G.node_attr["shape"] = "circle"
|
|
75
|
-
>>> G.edge_attr["color"] = "red"
|
|
76
|
-
|
|
77
|
-
Graph attributes can be set when initializing the graph
|
|
78
|
-
|
|
79
|
-
>>> G = pgv.AGraph(ranksep="0.1")
|
|
80
|
-
|
|
81
|
-
Attributes can be added when adding nodes or edges,
|
|
82
|
-
|
|
83
|
-
>>> G.add_node(1, color="red")
|
|
84
|
-
>>> G.add_edge("b", "c", color="blue")
|
|
85
|
-
|
|
86
|
-
or through the node or edge attr dictionaries,
|
|
87
|
-
|
|
88
|
-
>>> n = G.get_node(1)
|
|
89
|
-
>>> n.attr["shape"] = "box"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
>>> e = G.get_edge("b", "c")
|
|
93
|
-
>>> e.attr["color"] = "green"
|
|
94
|
-
|
|
95
|
-
Layout and Drawing
|
|
96
|
-
------------------
|
|
97
|
-
Pygraphviz provides several methods for layout and drawing of graphs.
|
|
98
|
-
|
|
99
|
-
To store and print the graph in dot format as a Python string use
|
|
100
|
-
|
|
101
|
-
>>> s = G.string()
|
|
102
|
-
|
|
103
|
-
To write to a file use
|
|
104
|
-
|
|
105
|
-
>>> G.write("file.dot")
|
|
106
|
-
|
|
107
|
-
To add positions to the nodes with a Graphviz layout algorithm
|
|
108
|
-
|
|
109
|
-
>>> G.layout() # default to neato
|
|
110
|
-
>>> G.layout(prog="dot") # use dot
|
|
111
|
-
|
|
112
|
-
To render the graph to an image
|
|
113
|
-
|
|
114
|
-
>>> G.draw("file.png") # write previously positioned graph to PNG file
|
|
115
|
-
>>> G.draw("file.ps", prog="circo") # use circo to position, write PS file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|