clbustos / statsample

A suite for basic and advanced statistics on Ruby.
http://github.com/clbustos/statsample
BSD 3-Clause "New" or "Revised" License
403 stars 96 forks source link

Break statsample into smaller chunks #41

Open IsmailM opened 9 years ago

IsmailM commented 9 years ago

I think it would be nice if statsample could be restructured into many extensions...

so if you simply the wilcoxon test, you do the following:

require 'statsample/wilcoxon_test'

I believe that this would mean that dependencies are only installed when needed...

agarie commented 9 years ago

Hey @IsmailM, that's a good idea. In fact, we started doing it with statsample-glm and statsample-timeseries, but still didn't get around to rework the whole library. I'll work on this for the next releases! :+1:

By the way, can you reopen this issue in SciRuby's fork? We're centralizing statsample (and lots of other gems) development there. It'll be a lot easier for me to work on issues this way. Just copy/pasting the issue is OK.

IsmailM commented 9 years ago

Thanks for the swift reply...

I've raised the issue in the SciRuby fork...

The reason I raised the issue was due to the fact that travis has been failing [GeneValidator]() as it's unable to install statsample.

Thus I was wondering if you could help me with this. I've pasted the Error Message below:

Building native extensions.  This could take a while...
ERROR:  Error installing statsample:
    ERROR: Failed to build gem native extension.

    /Users/ismailm/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150410-17233-vdl0pz.rb extconf.rb
*** ERROR: missing required library to compile this module: No such file or directory - gsl-config
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/ismailm/.rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)
    --with-gsl-version

extconf failed, exit code 1

Gem files will remain installed in /Users/ismailm/.rvm/gems/ruby-2.2.1/gems/rb-gsl-1.16.0.4 for inspection.
Results logged to /Users/ismailm/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/rb-gsl-1.16.0.4/gem_make.out

So the problem seems to be the GSL library - I didn't think I need GSL for the wilcoxon test (I understand that it's only needed for Factorial analysis and polychorical correlation)... Is there currently any way of installing Statsample without having to install GSL?

agarie commented 9 years ago

@IsmailM for the time being, you could try adding GSL installation to your Travis script so it will (at least) install statsample. I'm thinking about how to remove dependencies as much as possible to help you with this.

Please take a look at statsample's travis.yml to see how to do this. Look at the SciRuby fork, not this repository.

IsmailM commented 9 years ago

@agarie,

Thanks, that is what I ended up doing....

The confusing thing is that a month a ago, statsample used to work perfectly without GSL... But recently an update somewhere meant that statsample would now try compiling something dependant on the GSL... I suspect that this is probably because of the open ended dependencies...

In fact, restarting travis builds from a month ago (that passed then) now fail because of this.

We would really appreciate it if there were fewer dependencies (especially prerequisites like GSL), since more dependencies would typically make it harder for end-users to install our bioinformatics tool (especially those without sudo who will now need to compile GSL)....

Many thanks for all your help in this...

agarie commented 9 years ago

Alright @IsmailM, let's keep working on this issue on the SciRuby tracker. OK?