igrigorik / decisiontree

ID3-based implementation of the ML Decision Tree algorithm
1.44k stars 130 forks source link

graph/graphviz_dot not installed, graphing functionality not included #1

Closed heaven closed 9 years ago

heaven commented 12 years ago

Hi, can you please mute this error message?

louismullie commented 12 years ago

@igrigorik I just released Robert Feld's original graph classes as a gem: https://github.com/louismullie/graphr. I have left the API and the class structure intact. Perhaps this could be added as a dependency in the gemspec? This would eliminate the need for users to manually download and install these useful classes. At the same time, this solves the warning problem described above, and eliminates the need for an odd require-check.

Basically, in addition to adding "graphr" to the gemspec,


begin
  require 'graph/graphviz_dot'
rescue LoadError
  STDERR.puts "graph/graphviz_dot not installed, graphing functionality not included."
end

would simply become:

require 'graph/graphviz_dot'

I can submit a pull request if you agree with this.

igrigorik commented 12 years ago

That makes sense to me - make a quick pull request?