graphviz-perl / graphviz2 Goto Github PK
View Code? Open in Web Editor NEWA wrapper for AT&T's Graphviz
License: Other
A wrapper for AT&T's Graphviz
License: Other
On some of my smokers all test files fail like this:
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Odd number of elements in anonymous hash at /home/cpansand/.cpan/build/2020101303/GraphViz2-2.55-0/blib/lib/GraphViz2.pm line 194, <DATA> line 2066.
Error: '->' is not a valid attribute in the 'global' context at /home/cpansand/.cpan/build/2020101303/GraphViz2-2.55-0/blib/lib/GraphViz2.pm line 499, <DATA> line 2066.
t/gen.anonymous.t ..........
Dubious, test returned 9 (wstat 2304, 0x900)
No subtests run
... (etc) ...
This seems to be the case on my Fedora & CentOS 7+8 smokers. Debian, Ubuntu and FreeBSD is not affected.
Hi folks.
When trying to use the class
attribute for a node, we receive an error that it is not a valid attribute in the 'node' context.
The attribute is valid according to Graphviz - https://graphviz.org/docs/attrs/class/
I've poked around in the GraphViz2 commit history and found a commit (f254bac) where 5 new items (including class
) were added to the data/attributes.dat
file, but they have not yet been added in the lib/GraphViz2.pm
file (and so they are not treated as valid).
I think all that's needed to add support for these new attributes is to add the same new lines to lib/GraphViz2.pm
? (I could be wrong.)
Below is the list of lines which are present in data/attributes.dat
and not yet added to the @@ common_attribute
section of GraphViz2.pm:
_background => graph
class => edge, node, cluster, graph
imagepos => node
newrank => graph
notranslate => graph
Could these newer attributes be added?
If it would help, I can put together a pull request adding these lines to the module file.
Thanks for your work on this module.
The code below (Line #804) assumes that the user has provided only the filename without any path information
my($temp_file) = File::Spec -> catfile($temp_dir, "$output_file.gv");
this results in the following error message when output_file is set to /prj/web/public/graphs/GraphSzybt.png
Can't open(> /tmp/temp.wVXt//prj/web/public/graphs/GraphSzybt.png.gv): No such file or directory at /usr/local/share/perl/5.22.1/GraphViz2.pm
Changing the line to
my(undef,$temp_file) = tempfile('temp.XXXX', DIR => $temp_dir, SUFFIX=>".gv");
and the use statement to
use File::Temp qw(tempfile); # For newdir().
can resolve this issue.
Just curious if there'd by any interest it adding functionality or documentation around using gvpr
as a step in Perl programs. I think I'm in this exact situation: https://stackoverflow.com/questions/7355241/pruning-large-graphs-of-stray-nodes
And it might be cool to have method(s) or doc(s) for how I can trivially run arbitrary gvpr
scripts against the $graph
I've built up in Perl, and then happily continue doing my thing in Perl space?
For "non-core features" I mean modules like GraphViz2::DBI and GraphViz2::Parse::X. Now this GraphViz2 distribution has a lot dependencies, installing GraphViz2 gets a lot packages installed. That is IMHO suboptimal for users who just want the core GraphViz2 module not GraphViz2::DBI or GraphViz2::Parse::X...
From the Graphviz document at
http://www.graphviz.org/doc/info/output.html#d:cmapx
For client-side maps, one again generates two output files:
dot -Tcmapx -ox.map -Tgif -ox.gif x.gv
Dot takes two sets of format and output files one for the image and the other for the imagemap
Looking at the code of Graphviz2.pm I see that the call to run3 on line 752 takes only one format and the output goes to STDOUT.
Is it possible to change the functionality to support multiple outputs?
Using:
macOS 10.15.7 19H2
Xcode 12.0.1 12A7300
MacPorts perl 5.30.3
# Failed test 'dot file'
# at t/gen.Heawood.t line 72.
# @@ -1,7 +1,7 @@
# 'graph Heawood {
# graph [ rankdir="TB" ]
# edge [ color="black" ]
# - node [ color="black" fontname="Arial" height="0.500000" label="\\N" shape="circle" width="0.50000" ]
# + node [ color="black" fontname="ArialMT" height="0.500000" label="\\N" shape="circle" width="0.50000" ]
# "0"
# "1"
# "0" -- "1"
# Looks like you failed 1 test of 1.
t/gen.Heawood.t ............
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.