SciRuby / daru

Data Analysis in RUby
BSD 2-Clause "Simplified" License
1.04k stars 139 forks source link

failing tests due to changes in method set #448

Closed rohitner closed 6 years ago

rohitner commented 6 years ago

Replacing def set indexes, val with def set *indexes, val for the method set in vector.rb leads to 43 failing tests. The change was intended for handling multiple index assignment and works. The failing tests are listed below.

Failed examples:

rspec ./spec/dataframe_spec.rb:65 # Daru::DataFrame.rows Daru::Index creates a DataFrame from Vector rows
rspec ./spec/dataframe_spec.rb:81 # Daru::DataFrame.rows Daru::Index derives index & order from vectors
rspec ./spec/dataframe_spec.rb:88 # Daru::DataFrame.rows Daru::Index behaves, when rows are repeated
rspec ./spec/dataframe_spec.rb:95 # Daru::DataFrame.rows Daru::Index behaves, when vectors are unnamed
rspec ./spec/dataframe_spec.rb:134 # Daru::DataFrame.rows Daru::MultiIndex creates a DataFrame from Vector rows
rspec ./spec/dataframe_spec.rb:749 # Daru::DataFrame#row[]= Daru::Index assigns specified row when Array
rspec ./spec/dataframe_spec.rb:757 # Daru::DataFrame#row[]= Daru::Index assigns specified row when DV
rspec ./spec/dataframe_spec.rb:763 # Daru::DataFrame#row[]= Daru::Index assigns correct elements when Vector of different index
rspec ./spec/dataframe_spec.rb:769 # Daru::DataFrame#row[]= Daru::Index creates a new row from an Array
rspec ./spec/dataframe_spec.rb:775 # Daru::DataFrame#row[]= Daru::Index creates a new row from a DV
rspec ./spec/dataframe_spec.rb:781 # Daru::DataFrame#row[]= Daru::Index creates a new row from numeric row index and named DV
rspec ./spec/dataframe_spec.rb:787 # Daru::DataFrame#row[]= Daru::Index correctly aligns assigned DV by index
rspec ./spec/dataframe_spec.rb:793 # Daru::DataFrame#row[]= Daru::Index correctlu aligns assinged DV by index for new rows
rspec ./spec/dataframe_spec.rb:799 # Daru::DataFrame#row[]= Daru::Index inserts nils for indexes that dont exist in the DataFrame
rspec ./spec/dataframe_spec.rb:805 # Daru::DataFrame#row[]= Daru::Index correctly inserts row of a different length by matching indexes
rspec ./spec/dataframe_spec.rb:838 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row single category index should eq #<Daru::CategoricalIndex(5): {a, 1, a, 1, c}>
rspec ./spec/dataframe_spec.rb:840 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row single category a.to_a should eq ["x", "b", "x", "d", "e"]
rspec ./spec/dataframe_spec.rb:841 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row single category b.to_a should eq ["y", 2, "y", 4, 5]
rspec ./spec/dataframe_spec.rb:849 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row multiple categories index should eq #<Daru::CategoricalIndex(5): {a, 1, a, 1, c}>
rspec ./spec/dataframe_spec.rb:851 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row multiple categories a.to_a should eq ["x", "x", "x", "x", "e"]
rspec ./spec/dataframe_spec.rb:852 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row multiple categories b.to_a should eq ["y", "y", "y", "y", 5]
rspec ./spec/dataframe_spec.rb:860 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row positional index index should eq #<Daru::CategoricalIndex(5): {a, 1, a, 1, c}>
rspec ./spec/dataframe_spec.rb:862 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row positional index a.to_a should eq ["x", "b", "x", "d", "e"]
rspec ./spec/dataframe_spec.rb:863 # Daru::DataFrame#row[]= Daru::CategoricalIndex modify exiting row positional index b.to_a should eq ["y", 2, "y", 4, 5]
rspec ./spec/dataframe_spec.rb:1399 # Daru::DataFrame#row[] Daru::Index creates an index for assignment if not already specified
rspec ./spec/dataframe_spec.rb:1606 # Daru::DataFrame#add_row allows adding rows after making empty DF by specfying only order
rspec ./spec/dataframe_spec.rb:1569 # Daru::DataFrame#add_row named should eq #<Daru::DataFrame(6x3)>
           a     b     c
   one     1    11    11
   two     2    12    22
 three     3    13    33
  four     4    14    44
  five     5    15    55
   six   100   200   300
rspec ./spec/dataframe_spec.rb:1582 # Daru::DataFrame#add_row unnamed should eq #<Daru::DataFrame(6x3)>
           a     b     c
   one     1    11    11
   two     2    12    22
 three     3    13    33
  four     4    14    44
  five     5    15    55
     5   100   200   300
rspec ./spec/dataframe_spec.rb:1599 # Daru::DataFrame#add_row with mulitiindex DF 
rspec ./spec/dataframe_spec.rb:2042 # Daru::DataFrame#recode maps over the rows of a DataFrame and returns a DataFrame
rspec ./spec/dataframe_spec.rb:2059 # Daru::DataFrame#recode maps over the rows of a DataFrame with DateTimeIndex and returns a DataFrame with DateTimeIndex
rspec ./spec/dataframe_spec.rb:2129 # Daru::DataFrame#map! destructively maps over the rows and changes the DF
rspec ./spec/dataframe_spec.rb:2755 # Daru::DataFrame#reindex re indexes and aligns accordingly
rspec ./spec/dataframe_spec.rb:3216 # Daru::DataFrame#merge merges one dataframe with another
rspec ./spec/dataframe_spec.rb:3242 # Daru::DataFrame#merge preserves type of vector names 
rspec ./spec/dataframe_spec.rb:3243 # Daru::DataFrame#merge preserves type of vector names 
rspec ./spec/dataframe_spec.rb:3244 # Daru::DataFrame#merge preserves type of vector names 
rspec ./spec/dataframe_spec.rb:3253 # Daru::DataFrame#merge preserves indices for dataframes with same index index 
rspec ./spec/dataframe_spec.rb:3499 # Daru::DataFrame#one_to_many should eq #<Daru::DataFrame(5x4)>
              id _col_id   color   value
       0       1       1     red    ... 1   green      15
       3       2       2  orange      30
       4       2       3   white      20
rspec ./spec/date_time/data_spec.rb:175 # Daru::DataFrame#row[]= assigns one row Vector when complete index
rspec ./spec/date_time/data_spec.rb:180 # Daru::DataFrame#row[]= assigns one row Vector when complete index as DateTime
rspec ./spec/date_time/data_spec.rb:186 # Daru::DataFrame#row[]= assigns multiple rows when incomplete index
rspec ./spec/io/io_spec.rb:230 # Daru::IO Daru::DataFrame.from_activerecord with ActiveRecord::Relation with specifying field names in parameters loads data from an AR::Relation object
v0dro commented 6 years ago

Why would you open an issue for a breaking change that you introduced yourself? Investigate the problem.

Also next time you post an error report include the stack traces not the failure reports.