Giter Site home page Giter Site logo

graphviz2's People

Contributors

asb-capfan avatar eserte avatar manwar avatar mohawk2 avatar ronsavage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

graphviz2's Issues

Error: '->' is not a valid attribute in the 'global' context

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.

Newer attributes not considered valid

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.

Why do unconnected vertices disappear?

use Graph::Directed;
use GraphViz2;
my $g = Graph::Directed->new;
$g->add_edges(1, 2);
$g->add_vertex(3);
GraphViz2->from_graph($g)->run(format => 'png', output_file => 'demo3.png');

demo3

Assumption about output_file being in same folder

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.

better to split non-core features out to separate distributions?

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

Client side Image maps.

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?

GraphViz2 2.51: test t/gen.Heawood.t fails on darwin19 (macOS 10.15 Catalina)

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 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.