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,36 +17,37 @@ http_interactions:
17
17
  content-type:
18
18
  - application/json; charset=utf-8
19
19
  date:
20
- - Thu, 28 Jun 2012 22:21:04 GMT
20
+ - Sat, 14 Jul 2012 15:12:40 GMT
21
21
  server:
22
22
  - nginx/1.0.12
23
23
  content-length:
24
- - '1281'
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
30
  "total_count": 1}, "objects": [{"category": 0, "code": 200, "content_type":
31
- "application/octet-stream", "created": "2012-06-28T22:25:11.161000", "credits":
32
- 0.0, "description": "", "fields": {"000000": {"column_number": 0, "name":
33
- "sepal length", "optype": "numeric"}, "000001": {"column_number": 1, "name":
34
- "sepal width", "optype": "numeric"}, "000002": {"column_number": 2, "name":
35
- "petal length", "optype": "numeric"}, "000003": {"column_number": 3, "name":
36
- "petal width", "optype": "numeric"}, "000004": {"column_number": 4, "name":
37
- "species", "optype": "categorical"}}, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
38
- "name": "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
39
- 0, "private": true, "resource": "source/4fecd9c7035d0741f40032a2", "size":
40
- 4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
41
- ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
42
- "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
43
- "\"", "separator": ","}, "status": {"code": 5, "elapsed": 291, "message":
44
- "The source has been created"}, "tags": [], "type": 0, "updated": "2012-06-28T22:26:03.787000"}]}'
31
+ "application/octet-stream", "created": "2012-07-14T15:19:12.300000", "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/50018df01552681edf000013", "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": 89, "message": "The source has been created"}, "tags":
45
+ [], "type": 0, "updated": "2012-07-14T15:18:12.267000"}]}'
45
46
  http_version: '1.1'
46
- recorded_at: Thu, 28 Jun 2012 22:25:50 GMT
47
+ recorded_at: Sat, 14 Jul 2012 15:18:43 GMT
47
48
  - request:
48
49
  method: delete
49
- uri: https://bigml.io/andromeda/source/4fecd9c7035d0741f40032a2?username=<USERNAME>&api_key=<API_KEY>
50
+ uri: https://bigml.io/dev/andromeda/source/50018df01552681edf000013?username=<USERNAME>&api_key=<API_KEY>
50
51
  body:
51
52
  encoding: US-ASCII
52
53
  string: ''
@@ -63,7 +64,7 @@ http_interactions:
63
64
  content-type:
64
65
  - text/html; charset=utf-8
65
66
  date:
66
- - Thu, 28 Jun 2012 22:23:41 GMT
67
+ - Sat, 14 Jul 2012 15:17:43 GMT
67
68
  server:
68
69
  - nginx/1.0.12
69
70
  connection:
@@ -72,10 +73,10 @@ http_interactions:
72
73
  encoding: US-ASCII
73
74
  string: ''
74
75
  http_version: '1.1'
75
- recorded_at: Thu, 28 Jun 2012 22:25:54 GMT
76
+ recorded_at: Sat, 14 Jul 2012 15:18:46 GMT
76
77
  - request:
77
78
  method: get
78
- 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>
79
80
  body:
80
81
  encoding: US-ASCII
81
82
  string: ''
@@ -90,7 +91,7 @@ http_interactions:
90
91
  content-type:
91
92
  - application/json; charset=utf-8
92
93
  date:
93
- - Thu, 28 Jun 2012 22:21:09 GMT
94
+ - Sat, 14 Jul 2012 15:12:44 GMT
94
95
  server:
95
96
  - nginx/1.0.12
96
97
  transfer-encoding:
@@ -102,10 +103,10 @@ http_interactions:
102
103
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
103
104
  "total_count": 0}, "objects": []}'
104
105
  http_version: '1.1'
105
- recorded_at: Thu, 28 Jun 2012 22:25:55 GMT
106
+ recorded_at: Sat, 14 Jul 2012 15:18:47 GMT
106
107
  - request:
107
108
  method: post
108
- uri: https://bigml.io/andromeda/source
109
+ uri: https://bigml.io/dev/andromeda/source
109
110
  body:
110
111
  encoding: US-ASCII
111
112
  string: ''
@@ -113,7 +114,7 @@ http_interactions:
113
114
  content-type:
114
115
  - multipart/form-data; boundary=-----------RubyMultipartPost
115
116
  content-length:
116
- - '5147'
117
+ - '5149'
117
118
  connection:
118
119
  - close
119
120
  response:
@@ -124,33 +125,33 @@ http_interactions:
124
125
  content-type:
125
126
  - application/json; charset=utf-8
126
127
  date:
127
- - Thu, 28 Jun 2012 22:23:44 GMT
128
+ - Sat, 14 Jul 2012 15:17:46 GMT
128
129
  location:
129
- - http://bigml.io/andromeda/source/4fecda0515526875f800331e
130
+ - http://bigml.io/andromeda/source/50018dfe1552681ee400000b
130
131
  server:
131
132
  - nginx/1.0.12
132
133
  content-length:
133
- - '567'
134
+ - '580'
134
135
  connection:
135
136
  - Close
136
137
  body:
137
138
  encoding: US-ASCII
138
139
  string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
139
- "created": "2012-06-28T22:26:13.480564", "credits": 0.0, "description": "",
140
- "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
141
- "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
142
- 0, "private": true, "resource": "source/4fecda0515526875f800331e", "size":
140
+ "created": "2012-07-14T15:19:26.085501", "credits": 0.0, "description": "",
141
+ "dev": true, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
142
+ "name": "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
143
+ 0, "private": true, "resource": "source/50018dfe1552681ee400000b", "size":
143
144
  4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
144
145
  been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
145
- "2012-06-28T22:26:13.480593"}'
146
+ "2012-07-14T15:19:26.085523"}'
146
147
  http_version: '1.1'
147
- recorded_at: Thu, 28 Jun 2012 22:25:57 GMT
148
+ recorded_at: Sat, 14 Jul 2012 15:18:49 GMT
148
149
  - request:
149
150
  method: post
150
- uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
151
+ uri: https://bigml.io/dev/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
151
152
  body:
152
153
  encoding: UTF-8
153
- string: ! '{"source":"source/4fecda0515526875f800331e"}'
154
+ string: ! '{"source":"source/50018dfe1552681ee400000b"}'
154
155
  headers:
155
156
  content-type:
156
157
  - application/json
@@ -164,34 +165,34 @@ http_interactions:
164
165
  content-type:
165
166
  - application/json; charset=utf-8
166
167
  date:
167
- - Thu, 28 Jun 2012 22:21:12 GMT
168
+ - Sat, 14 Jul 2012 15:12:47 GMT
168
169
  location:
169
- - http://bigml.io/andromeda/dataset/4fecd9d6035d0741f100330c
170
+ - http://bigml.io/andromeda/dataset/50018dff155268794e000014
170
171
  server:
171
172
  - nginx/1.0.12
172
173
  content-length:
173
- - '921'
174
+ - '934'
174
175
  connection:
175
176
  - Close
176
177
  body:
177
178
  encoding: US-ASCII
178
- string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:25:26.332888",
179
- "credits": 0.00439453125, "description": "", "fields": {"000000": {"column_number":
180
- 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
181
- 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
182
- 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
183
- 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
184
- 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
185
- "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
186
- true, "resource": "dataset/4fecd9d6035d0741f100330c", "rows": 0, "size": 4608,
187
- "source": "source/4fecda0515526875f800331e", "source_status": true, "status":
188
- {"code": 1, "message": "The dataset is being processed and will be created
189
- soon"}, "tags": [], "updated": "2012-06-28T22:25:26.332907"}'
179
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-07-14T15:19:27.569704",
180
+ "credits": 0.00439453125, "description": "", "dev": true, "fields": {"000000":
181
+ {"column_number": 0, "name": "sepal length", "optype": "numeric"}, "000001":
182
+ {"column_number": 1, "name": "sepal width", "optype": "numeric"}, "000002":
183
+ {"column_number": 2, "name": "petal length", "optype": "numeric"}, "000003":
184
+ {"column_number": 3, "name": "petal width", "optype": "numeric"}, "000004":
185
+ {"column_number": 4, "name": "species", "optype": "categorical"}}, "locale":
186
+ "en_US", "name": "iris'' dataset", "number_of_models": 0, "number_of_predictions":
187
+ 0, "private": true, "resource": "dataset/50018dff155268794e000014", "rows":
188
+ 0, "size": 4608, "source": "source/50018dfe1552681ee400000b", "source_status":
189
+ true, "status": {"code": 1, "message": "The dataset is being processed and
190
+ will be created soon"}, "tags": [], "updated": "2012-07-14T15:19:27.569738"}'
190
191
  http_version: '1.1'
191
- recorded_at: Thu, 28 Jun 2012 22:25:59 GMT
192
+ recorded_at: Sat, 14 Jul 2012 15:18:50 GMT
192
193
  - request:
193
194
  method: delete
194
- uri: https://bigml.io/andromeda/dataset/4fecd9d6035d0741f100330c?username=<USERNAME>&api_key=<API_KEY>
195
+ uri: https://bigml.io/dev/andromeda/dataset/50018dff155268794e000014?username=<USERNAME>&api_key=<API_KEY>
195
196
  body:
196
197
  encoding: US-ASCII
197
198
  string: ''
@@ -208,7 +209,7 @@ http_interactions:
208
209
  content-type:
209
210
  - text/html; charset=utf-8
210
211
  date:
211
- - Thu, 28 Jun 2012 22:23:48 GMT
212
+ - Sat, 14 Jul 2012 15:17:49 GMT
212
213
  server:
213
214
  - nginx/1.0.12
214
215
  connection:
@@ -217,10 +218,10 @@ http_interactions:
217
218
  encoding: US-ASCII
218
219
  string: ''
219
220
  http_version: '1.1'
220
- recorded_at: Thu, 28 Jun 2012 22:26:01 GMT
221
+ recorded_at: Sat, 14 Jul 2012 15:18:52 GMT
221
222
  - request:
222
223
  method: get
223
- uri: https://bigml.io/andromeda/dataset/4fecd9d6035d0741f100330c?username=<USERNAME>&api_key=<API_KEY>
224
+ uri: https://bigml.io/dev/andromeda/dataset/50018dff155268794e000014?username=<USERNAME>&api_key=<API_KEY>
224
225
  body:
225
226
  encoding: US-ASCII
226
227
  string: ''
@@ -235,23 +236,23 @@ http_interactions:
235
236
  content-type:
236
237
  - application/json; charset=utf-8
237
238
  date:
238
- - Thu, 28 Jun 2012 22:21:16 GMT
239
+ - Sat, 14 Jul 2012 15:12:50 GMT
239
240
  server:
240
241
  - nginx/1.0.12
241
- content-length:
242
- - '170'
242
+ transfer-encoding:
243
+ - chunked
243
244
  connection:
244
245
  - Close
245
246
  body:
246
247
  encoding: US-ASCII
247
248
  string: ! '{"code": 404, "status": {"code": -1201, "extra": ["Couldn''t find
248
- an instance of ''Dataset'' which matched ''pk=4fecd9d6035d0741f100330c''."],
249
+ an instance of ''Dataset'' which matched ''pk=50018dff155268794e000014''."],
249
250
  "message": "Id does not exist"}}'
250
251
  http_version: '1.1'
251
- recorded_at: Thu, 28 Jun 2012 22:26:02 GMT
252
+ recorded_at: Sat, 14 Jul 2012 15:18:53 GMT
252
253
  - request:
253
254
  method: get
254
- uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
255
+ uri: https://bigml.io/dev/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
255
256
  body:
256
257
  encoding: US-ASCII
257
258
  string: ''
@@ -266,7 +267,7 @@ http_interactions:
266
267
  content-type:
267
268
  - application/json; charset=utf-8
268
269
  date:
269
- - Thu, 28 Jun 2012 22:23:50 GMT
270
+ - Sat, 14 Jul 2012 15:17:51 GMT
270
271
  server:
271
272
  - nginx/1.0.12
272
273
  content-length:
@@ -278,5 +279,5 @@ http_interactions:
278
279
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
279
280
  "total_count": 0}, "objects": []}'
280
281
  http_version: '1.1'
281
- recorded_at: Thu, 28 Jun 2012 22:26:03 GMT
282
+ recorded_at: Sat, 14 Jul 2012 15:18:54 GMT
282
283
  recorded_with: VCR 2.2.2