big_ml 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. data/README.md +2 -1
  2. data/big_ml.gemspec +1 -1
  3. data/lib/big_ml/util/client.rb +7 -2
  4. data/lib/big_ml/util/config.rb +7 -2
  5. data/lib/big_ml/version.rb +1 -1
  6. data/spec/spec_helper.rb +2 -2
  7. data/spec/units/client_spec.rb +37 -6
  8. data/spec/vcr_cassettes/BigML_Dataset/no_dataset/_all/must_be_empty.yml +16 -95
  9. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/can_be_converted_in_a_model.yml +69 -67
  10. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_deleted_using_the_destroy_method.yml +72 -71
  11. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_find_using_the_reference.yml +104 -103
  12. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_remove_the_dataset.yml +66 -65
  13. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name.yml +148 -147
  14. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name_from_the_instance.yml +147 -146
  15. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_only_one_item.yml +83 -80
  16. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_the_same_file_name.yml +119 -74
  17. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/was_created_successfully.yml +36 -36
  18. data/spec/vcr_cassettes/BigML_Model/no_model/_all/must_be_empty.yml +89 -87
  19. data/spec/vcr_cassettes/BigML_Model/one_model/can_be_converted_in_a_prediction.yml +101 -99
  20. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_be_deleted_using_the_destroy_method.yml +91 -89
  21. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_be_find_using_the_reference.yml +191 -200
  22. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_remove_the_model.yml +109 -231
  23. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name.yml +272 -252
  24. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name_from_the_instance.yml +126 -252
  25. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_only_one_item.yml +117 -113
  26. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_the_same_size.yml +158 -120
  27. data/spec/vcr_cassettes/BigML_Model/one_model/was_created_successfully.yml +101 -56
  28. data/spec/vcr_cassettes/BigML_Prediction/no_prediction/_all/must_be_empty.yml +96 -94
  29. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_deleted_using_the_destroy_method.yml +126 -124
  30. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_find_using_the_reference.yml +147 -145
  31. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_remove_the_prediction.yml +141 -139
  32. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name.yml +159 -157
  33. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name_from_the_instance.yml +161 -159
  34. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_only_one_item.yml +145 -143
  35. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_the_same_name.yml +148 -146
  36. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/was_created_successfully.yml +75 -74
  37. data/spec/vcr_cassettes/BigML_Source/no_source/_all/must_be_empty.yml +25 -24
  38. data/spec/vcr_cassettes/BigML_Source/one_source/can_be_converted_in_a_dataset.yml +32 -32
  39. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_deleted_using_the_destroy_method.yml +21 -21
  40. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_find_using_the_reference.yml +48 -47
  41. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_remove_the_source.yml +43 -42
  42. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name.yml +77 -76
  43. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name_from_the_instance.yml +78 -77
  44. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_only_one_item.yml +53 -51
  45. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_the_same_file_name.yml +52 -50
  46. data/spec/vcr_cassettes/BigML_Source/one_source/was_created_successfully.yml +14 -14
  47. metadata +5 -5
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://bigml.io/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
5
+ uri: https://bigml.io/dev/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -17,22 +17,66 @@ http_interactions:
17
17
  content-type:
18
18
  - application/json; charset=utf-8
19
19
  date:
20
- - Thu, 28 Jun 2012 22:21:44 GMT
20
+ - Sat, 14 Jul 2012 15:24:04 GMT
21
21
  server:
22
22
  - nginx/1.0.12
23
23
  content-length:
24
- - '101'
24
+ - '1293'
25
25
  connection:
26
26
  - Close
27
27
  body:
28
28
  encoding: US-ASCII
29
29
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
- "total_count": 0}, "objects": []}'
30
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "content_type":
31
+ "application/octet-stream", "created": "2012-07-14T15:27:41.327000", "credits":
32
+ 0.0, "description": "", "dev": true, "fields": {"000000": {"column_number":
33
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
34
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
35
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
36
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
37
+ 4, "name": "species", "optype": "categorical"}}, "file_name": "iris.csv",
38
+ "md5": "d1175c032e1042bec7f974c91e4a65ae", "name": "iris.csv", "number_of_datasets":
39
+ 0, "number_of_models": 0, "number_of_predictions": 0, "private": true, "resource":
40
+ "source/50018fed035d07569b00000b", "size": 4608, "source_parser": {"header":
41
+ true, "locale": "en_US", "missing_tokens": ["", "N/A", "n/a", "NULL", "null",
42
+ "-", "#DIV/0", "#REF!", "#NAME?", "NIL", "nil", "NA", "na", "#VALUE!", "#NULL!",
43
+ "NaN", "#N/A", "#NUM!", "?"], "quote": "\"", "separator": ","}, "status":
44
+ {"code": 5, "elapsed": 75, "message": "The source has been created"}, "tags":
45
+ [], "type": 0, "updated": "2012-07-14T15:30:37.222000"}]}'
31
46
  http_version: '1.1'
32
- recorded_at: Thu, 28 Jun 2012 22:26:30 GMT
47
+ recorded_at: Sat, 14 Jul 2012 15:30:07 GMT
48
+ - request:
49
+ method: delete
50
+ uri: https://bigml.io/dev/andromeda/source/50018fed035d07569b00000b?username=<USERNAME>&api_key=<API_KEY>
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ connection:
56
+ - close
57
+ response:
58
+ status:
59
+ code: 204
60
+ message: NO CONTENT
61
+ headers:
62
+ content-length:
63
+ - '0'
64
+ content-type:
65
+ - text/html; charset=utf-8
66
+ date:
67
+ - Sat, 14 Jul 2012 15:29:07 GMT
68
+ server:
69
+ - nginx/1.0.12
70
+ connection:
71
+ - Close
72
+ body:
73
+ encoding: US-ASCII
74
+ string: ''
75
+ http_version: '1.1'
76
+ recorded_at: Sat, 14 Jul 2012 15:30:10 GMT
33
77
  - request:
34
78
  method: get
35
- uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
79
+ uri: https://bigml.io/dev/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
36
80
  body:
37
81
  encoding: US-ASCII
38
82
  string: ''
@@ -47,7 +91,7 @@ http_interactions:
47
91
  content-type:
48
92
  - application/json; charset=utf-8
49
93
  date:
50
- - Thu, 28 Jun 2012 22:24:18 GMT
94
+ - Sat, 14 Jul 2012 15:24:08 GMT
51
95
  server:
52
96
  - nginx/1.0.12
53
97
  content-length:
@@ -59,10 +103,10 @@ http_interactions:
59
103
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
60
104
  "total_count": 0}, "objects": []}'
61
105
  http_version: '1.1'
62
- recorded_at: Thu, 28 Jun 2012 22:26:31 GMT
106
+ recorded_at: Sat, 14 Jul 2012 15:30:11 GMT
63
107
  - request:
64
108
  method: get
65
- uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
109
+ uri: https://bigml.io/dev/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
66
110
  body:
67
111
  encoding: US-ASCII
68
112
  string: ''
@@ -77,11 +121,11 @@ http_interactions:
77
121
  content-type:
78
122
  - application/json; charset=utf-8
79
123
  date:
80
- - Thu, 28 Jun 2012 22:21:46 GMT
124
+ - Sat, 14 Jul 2012 15:29:09 GMT
81
125
  server:
82
126
  - nginx/1.0.12
83
- content-length:
84
- - '101'
127
+ transfer-encoding:
128
+ - chunked
85
129
  connection:
86
130
  - Close
87
131
  body:
@@ -89,10 +133,10 @@ http_interactions:
89
133
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
90
134
  "total_count": 0}, "objects": []}'
91
135
  http_version: '1.1'
92
- recorded_at: Thu, 28 Jun 2012 22:26:33 GMT
136
+ recorded_at: Sat, 14 Jul 2012 15:30:12 GMT
93
137
  - request:
94
138
  method: post
95
- uri: https://bigml.io/andromeda/source
139
+ uri: https://bigml.io/dev/andromeda/source
96
140
  body:
97
141
  encoding: US-ASCII
98
142
  string: ''
@@ -100,7 +144,7 @@ http_interactions:
100
144
  content-type:
101
145
  - multipart/form-data; boundary=-----------RubyMultipartPost
102
146
  content-length:
103
- - '5147'
147
+ - '5149'
104
148
  connection:
105
149
  - close
106
150
  response:
@@ -111,33 +155,33 @@ http_interactions:
111
155
  content-type:
112
156
  - application/json; charset=utf-8
113
157
  date:
114
- - Thu, 28 Jun 2012 22:24:21 GMT
158
+ - Sat, 14 Jul 2012 15:24:10 GMT
115
159
  location:
116
- - http://bigml.io/andromeda/source/4fecd9fa035d0741ed0032f8
160
+ - http://bigml.io/andromeda/source/500190aa1552681edf000035
117
161
  server:
118
162
  - nginx/1.0.12
119
163
  content-length:
120
- - '567'
164
+ - '580'
121
165
  connection:
122
166
  - Close
123
167
  body:
124
168
  encoding: US-ASCII
125
169
  string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
126
- "created": "2012-06-28T22:26:02.354683", "credits": 0.0, "description": "",
127
- "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
128
- "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
129
- 0, "private": true, "resource": "source/4fecd9fa035d0741ed0032f8", "size":
170
+ "created": "2012-07-14T15:30:50.846509", "credits": 0.0, "description": "",
171
+ "dev": true, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
172
+ "name": "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
173
+ 0, "private": true, "resource": "source/500190aa1552681edf000035", "size":
130
174
  4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
131
175
  been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
132
- "2012-06-28T22:26:02.354705"}'
176
+ "2012-07-14T15:30:50.846547"}'
133
177
  http_version: '1.1'
134
- recorded_at: Thu, 28 Jun 2012 22:26:35 GMT
178
+ recorded_at: Sat, 14 Jul 2012 15:30:13 GMT
135
179
  - request:
136
180
  method: post
137
- uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
181
+ uri: https://bigml.io/dev/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
138
182
  body:
139
183
  encoding: UTF-8
140
- string: ! '{"source":"source/4fecd9fa035d0741ed0032f8"}'
184
+ string: ! '{"source":"source/500190aa1552681edf000035"}'
141
185
  headers:
142
186
  content-type:
143
187
  - application/json
@@ -151,37 +195,37 @@ http_interactions:
151
195
  content-type:
152
196
  - application/json; charset=utf-8
153
197
  date:
154
- - Thu, 28 Jun 2012 22:21:50 GMT
198
+ - Sat, 14 Jul 2012 15:29:13 GMT
155
199
  location:
156
- - http://bigml.io/andromeda/dataset/4fecda2c15526875f50032f6
200
+ - http://bigml.io/andromeda/dataset/5001906c035d0741ca00002a
157
201
  server:
158
202
  - nginx/1.0.12
159
203
  content-length:
160
- - '921'
204
+ - '934'
161
205
  connection:
162
206
  - Close
163
207
  body:
164
208
  encoding: US-ASCII
165
- string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:26:52.750941",
166
- "credits": 0.00439453125, "description": "", "fields": {"000000": {"column_number":
167
- 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
168
- 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
169
- 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
170
- 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
171
- 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
172
- "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
173
- true, "resource": "dataset/4fecda2c15526875f50032f6", "rows": 0, "size": 4608,
174
- "source": "source/4fecd9fa035d0741ed0032f8", "source_status": true, "status":
175
- {"code": 1, "message": "The dataset is being processed and will be created
176
- soon"}, "tags": [], "updated": "2012-06-28T22:26:52.750974"}'
209
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-07-14T15:29:48.713936",
210
+ "credits": 0.00439453125, "description": "", "dev": true, "fields": {"000000":
211
+ {"column_number": 0, "name": "sepal length", "optype": "numeric"}, "000001":
212
+ {"column_number": 1, "name": "sepal width", "optype": "numeric"}, "000002":
213
+ {"column_number": 2, "name": "petal length", "optype": "numeric"}, "000003":
214
+ {"column_number": 3, "name": "petal width", "optype": "numeric"}, "000004":
215
+ {"column_number": 4, "name": "species", "optype": "categorical"}}, "locale":
216
+ "en_US", "name": "iris'' dataset", "number_of_models": 0, "number_of_predictions":
217
+ 0, "private": true, "resource": "dataset/5001906c035d0741ca00002a", "rows":
218
+ 0, "size": 4608, "source": "source/500190aa1552681edf000035", "source_status":
219
+ true, "status": {"code": 1, "message": "The dataset is being processed and
220
+ will be created soon"}, "tags": [], "updated": "2012-07-14T15:29:48.713966"}'
177
221
  http_version: '1.1'
178
- recorded_at: Thu, 28 Jun 2012 22:26:36 GMT
222
+ recorded_at: Sat, 14 Jul 2012 15:30:16 GMT
179
223
  - request:
180
224
  method: post
181
- uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
225
+ uri: https://bigml.io/dev/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
182
226
  body:
183
227
  encoding: UTF-8
184
- string: ! '{"dataset":"dataset/4fecda2c15526875f50032f6"}'
228
+ string: ! '{"dataset":"dataset/5001906c035d0741ca00002a"}'
185
229
  headers:
186
230
  content-type:
187
231
  - application/json
@@ -195,25 +239,26 @@ http_interactions:
195
239
  content-type:
196
240
  - application/json; charset=utf-8
197
241
  date:
198
- - Thu, 28 Jun 2012 22:24:25 GMT
242
+ - Sat, 14 Jul 2012 15:24:14 GMT
199
243
  location:
200
- - http://bigml.io/andromeda/model/4fecda2e15526875f70033ca
244
+ - http://bigml.io/andromeda/model/5001906e035d0741ca00002c
201
245
  server:
202
246
  - nginx/1.0.12
203
247
  content-length:
204
- - '691'
248
+ - '704'
205
249
  connection:
206
250
  - Close
207
251
  body:
208
252
  encoding: US-ASCII
209
- string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:26:54.543520",
210
- "credits": 0.017578125, "dataset": "dataset/4fecda2c15526875f50032f6", "dataset_status":
211
- true, "description": "", "holdout": 0.0, "input_fields": [], "locale": "en_US",
212
- "max_columns": 5, "max_rows": 150, "name": "iris'' dataset model", "number_of_predictions":
213
- 0, "objective_fields": [], "private": true, "range": [1, 150], "resource":
214
- "model/4fecda2e15526875f70033ca", "rows": 150, "size": 4608, "source": "source/4fecd9fa035d0741ed0032f8",
215
- "source_status": true, "status": {"code": 1, "message": "The model is being
216
- processed and will be created soon"}, "tags": [], "updated": "2012-06-28T22:26:54.543548"}'
253
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-07-14T15:29:50.570803",
254
+ "credits": 0.017578125, "dataset": "dataset/5001906c035d0741ca00002a", "dataset_status":
255
+ true, "description": "", "dev": true, "holdout": 0.0, "input_fields": [],
256
+ "locale": "en_US", "max_columns": 5, "max_rows": 150, "name": "iris'' dataset
257
+ model", "number_of_predictions": 0, "objective_fields": [], "private": true,
258
+ "range": [1, 150], "resource": "model/5001906e035d0741ca00002c", "rows": 150,
259
+ "size": 4608, "source": "source/500190aa1552681edf000035", "source_status":
260
+ true, "status": {"code": 1, "message": "The model is being processed and will
261
+ be created soon"}, "tags": [], "updated": "2012-07-14T15:29:50.570827"}'
217
262
  http_version: '1.1'
218
- recorded_at: Thu, 28 Jun 2012 22:26:38 GMT
263
+ recorded_at: Sat, 14 Jul 2012 15:30:17 GMT
219
264
  recorded_with: VCR 2.2.2