vatlab / sos-ruby

SoS Notebook extension for ruby
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Failed to pass dataframe under linux #8

Closed BoPeng closed 6 years ago

BoPeng commented 6 years ago

image

image

HenryLeongStat commented 6 years ago

You have to install daru and nmatrix first.

$ gem install daru $ gem install nmatrix

I am working on the documentation and will include them there.

BoPeng commented 6 years ago

Thanks. I will update .travis.yml for this. I have also updated features page, and you will have to update installation instruction.

HenryLeongStat commented 6 years ago

Will do!! 😄

HenryLeongStat commented 6 years ago

Btw, Professor, you can install iruby on linux machine? I failed to do so on my ubuntu machine this morning...

BoPeng commented 6 years ago

Ok. They pass, but

image

BoPeng commented 6 years ago

Check your linux version, you will have to compile czmq from source according to iruby instruction if you are using 14.4, not version 17 of Ubuntu.

HenryLeongStat commented 6 years ago

It works fine on my end...?

screen shot 2018-07-19 at 5 27 07 pm
BoPeng commented 6 years ago

Test on a linux machine then...

If you want complete control over a linux machine, install vmware player or virtualbox and download existing vms from https://www.osboxes.org/vmware-images/.

HenryLeongStat commented 6 years ago

That's weird, all the int fail on your end... What Ruby and iruby versions are installed on your machine? Mine are 2.5.1

screen shot 2018-07-19 at 5 30 20 pm
BoPeng commented 6 years ago

I am 2.3.1

image

HenryLeongStat commented 6 years ago

Check your linux version, you will have to compile czmq from source according to iruby instruction if you are using 14.4, not version 17 of Ubuntu.

I guess I need to compile it from source.

ml69@henry:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
BoPeng commented 6 years ago

Changing all instance_of to is_a fixes the problem.... does it make sense to do it?

https://stackoverflow.com/questions/3893278/ruby-kind-of-vs-instance-of-vs-is-a

BoPeng commented 6 years ago

Ruby test passes on travis!

https://travis-ci.org/vatlab/sos-ruby

HenryLeongStat commented 6 years ago

Changing all instance_of to is_a fixes the problem.... does it make sense to do it? https://stackoverflow.com/questions/3893278/ruby-kind-of-vs-instance-of-vs-is-a

Let me try... I used is_a? before, but I remember I chose instance_of? instead of is_a? because is_a? failed me couple times.

Ruby test passes on travis! https://travis-ci.org/vatlab/sos-ruby

Awesome!!! 🥂

HenryLeongStat commented 6 years ago

If only Integer fails, how about we just use is_a? for integer?

BoPeng commented 6 years ago

instance_of is very strict and does not accept subclasses, is_a is better but it is easier to get related objects with different types to both return true, thus the order of is_a is important (test less general case first).

HenryLeongStat commented 6 years ago

I see your point. People seem to like define their own objects which might be subclasses of the general parent classes. Maybe it is better to use is_a? instead... Let me try on my end!

BoPeng commented 6 years ago

I changed instance_of to is_a because otherwise the tests would be pass on my linux box. This could be due to ruby version but supporting an older version does not hurt.

I have just released sos-ruby 0.9.15.0, which is our first public release. Please keep working on the documentation etc and we will release 0.9.15.1 etc when we encounter any bug.

HenryLeongStat commented 6 years ago

OK! I think is_a works!

screen shot 2018-07-19 at 5 52 53 pm screen shot 2018-07-19 at 5 52 58 pm screen shot 2018-07-19 at 5 53 02 pm
BoPeng commented 6 years ago

Congratulations on the first release of sos-ruby and many thanks for your great work!

HenryLeongStat commented 6 years ago

I always learnt A LOT from you, Professor!! And enjoy working with you so much! 😄

Are there any other tasks that I can help?