red-datasets-arrow 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca91b18a3c0cccfdadaf81630a5d594d77b9d6283725d1975c75a882de91bd53
4
- data.tar.gz: c3d965ca2a62f1a71c4aa0fb1f0c0baecb69e491bbca5bc36d2fc467b69fdee2
3
+ metadata.gz: 3d1959eefda9562bfd7270e9d2ec552e4579de6f3f53649313517f29d11f7bdf
4
+ data.tar.gz: 9c0f5dc06f874726f4946e6b7c3358a1becbdc36470168344e94b80950a0d6d2
5
5
  SHA512:
6
- metadata.gz: 8b46c2cf657a7933bacac1d09fb01c016605c1cdabf5751d9fd633df2895661f5b8c0716eb76127bd21261233a8f17fbc8b4323d26dd3f31bacbe5e9a83fbe54
7
- data.tar.gz: 5084816d34f194c4f0da00e976eecf39328139caf756892fbac46c2e059260f5ff0a3480487c1e9fe692a1aa6c14ee1294c638bd00d77ce55ecafc2f90e5cc31
6
+ metadata.gz: d0b3e741be4d17e593f0ea976b79a08c184c645e8d5421478f98aba9b0d8b1703fddb070e96763081781d51ae38e5e9ae85c81135d4536fd81219ae55a68df34
7
+ data.tar.gz: f35d9c2c768dccfc19a2c71245d86b0cd981acc0c9a214a158c61630e91fe7ee33721731430fe648189c3f166880f8bb6f33d32729a25cf961cbe82c3fafa183
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 0.0.3 - 2021-08-18
4
+
5
+ ### Improvements
6
+
7
+ * Created cache directory automatically when it doesn't exist.
8
+
3
9
  ## 0.0.2 - 2018-03-27
4
10
 
5
11
  ### Improvements
@@ -12,6 +12,8 @@ module DatasetsArrow
12
12
  raw_table[name] = Arrow::ArrayBuilder.build(values)
13
13
  end
14
14
  table = Arrow::Table.new(raw_table)
15
+ directory = data_path.parent
16
+ directory.mkpath unless directory.exist?
15
17
  table.save(data_path)
16
18
  table
17
19
  end
@@ -1,3 +1,3 @@
1
1
  module DatasetsArrow
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/test/test-iris.rb CHANGED
@@ -5,7 +5,7 @@ class IrisTest < Test::Unit::TestCase
5
5
 
6
6
  test("#to_arrow") do
7
7
  assert_equal(<<-TABLE, @dataset.to_arrow.to_s)
8
- sepal_length sepal_width petal_length petal_width class
8
+ sepal_length sepal_width petal_length petal_width label
9
9
  0 5.100000 3.500000 1.400000 0.200000 Iris-setosa
10
10
  1 4.900000 3.000000 1.400000 0.200000 Iris-setosa
11
11
  2 4.700000 3.200000 1.300000 0.200000 Iris-setosa
@@ -32,11 +32,121 @@ class IrisTest < Test::Unit::TestCase
32
32
 
33
33
  test("#each_record_batch") do
34
34
  assert_equal([<<-RECORD_BATCH], @dataset.each_record_batch.collect(&:to_s))
35
- sepal_length: [5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6, 5, 4.4, 4.9, 5.4, 4.8, 4.8, 4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5.4, 5.1, 4.6, 5.1, 4.8, 5, 5, 5.2, 5.2, 4.7, 4.8, 5.4, 5.2, 5.5, 4.9, 5, 5.5, 4.9, 4.4, 5.1, 5, 4.5, 4.4, 5, 5.1, 4.8, 5.1, 4.6, 5.3, 5, 7, 6.4, 6.9, 5.5, 6.5, 5.7, 6.3, 4.9, 6.6, 5.2, 5, 5.9, 6, 6.1, 5.6, 6.7, 5.6, 5.8, 6.2, 5.6, 5.9, 6.1, 6.3, 6.1, 6.4, 6.6, 6.8, 6.7, 6, 5.7, 5.5, 5.5, 5.8, 6, 5.4, 6, 6.7, 6.3, 5.6, 5.5, 5.5, 6.1, 5.8, 5, 5.6, 5.7, 5.7, 6.2, 5.1, 5.7, 6.3, 5.8, 7.1, 6.3, 6.5, 7.6, 4.9, 7.3, 6.7, 7.2, 6.5, 6.4, 6.8, 5.7, 5.8, 6.4, 6.5, 7.7, 7.7, 6, 6.9, 5.6, 7.7,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3, 1.3, 1.1, 1.3, 2.5, 1.9, 2.1, 1.8, 2.2, 2.1, 1.7, 1.8, 1.8, 2.5, 2, 1.9, 2.1, 2, 2.4, 2.3, 1.8, 2.2, 2.3, 1.5, 2.3, 2, 2, 1.8, 2.1, 1.8, 1.8, 1.8, 2.1, 1.6, 1.9, 2, 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9, 2.3, 2.5, 2.3, 1.9, 2, 2.3, 1.8]
39
- class: ["Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-versicolor", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica", "Iris-virginica"]
35
+ sepal_length: [
36
+ 5.1,
37
+ 4.9,
38
+ 4.7,
39
+ 4.6,
40
+ 5,
41
+ 5.4,
42
+ 4.6,
43
+ 5,
44
+ 4.4,
45
+ 4.9,
46
+ ...
47
+ 6.7,
48
+ 6.9,
49
+ 5.8,
50
+ 6.8,
51
+ 6.7,
52
+ 6.7,
53
+ 6.3,
54
+ 6.5,
55
+ 6.2,
56
+ 5.9
57
+ ]
58
+ sepal_width: [
59
+ 3.5,
60
+ 3,
61
+ 3.2,
62
+ 3.1,
63
+ 3.6,
64
+ 3.9,
65
+ 3.4,
66
+ 3.4,
67
+ 2.9,
68
+ 3.1,
69
+ ...
70
+ 3.1,
71
+ 3.1,
72
+ 2.7,
73
+ 3.2,
74
+ 3.3,
75
+ 3,
76
+ 2.5,
77
+ 3,
78
+ 3.4,
79
+ 3
80
+ ]
81
+ petal_length: [
82
+ 1.4,
83
+ 1.4,
84
+ 1.3,
85
+ 1.5,
86
+ 1.4,
87
+ 1.7,
88
+ 1.4,
89
+ 1.5,
90
+ 1.4,
91
+ 1.5,
92
+ ...
93
+ 5.6,
94
+ 5.1,
95
+ 5.1,
96
+ 5.9,
97
+ 5.7,
98
+ 5.2,
99
+ 5,
100
+ 5.2,
101
+ 5.4,
102
+ 5.1
103
+ ]
104
+ petal_width: [
105
+ 0.2,
106
+ 0.2,
107
+ 0.2,
108
+ 0.2,
109
+ 0.2,
110
+ 0.4,
111
+ 0.3,
112
+ 0.2,
113
+ 0.2,
114
+ 0.1,
115
+ ...
116
+ 2.4,
117
+ 2.3,
118
+ 1.9,
119
+ 2.3,
120
+ 2.5,
121
+ 2.3,
122
+ 1.9,
123
+ 2,
124
+ 2.3,
125
+ 1.8
126
+ ]
127
+ label: [
128
+ "Iris-setosa",
129
+ "Iris-setosa",
130
+ "Iris-setosa",
131
+ "Iris-setosa",
132
+ "Iris-setosa",
133
+ "Iris-setosa",
134
+ "Iris-setosa",
135
+ "Iris-setosa",
136
+ "Iris-setosa",
137
+ "Iris-setosa",
138
+ ...
139
+ "Iris-virginica",
140
+ "Iris-virginica",
141
+ "Iris-virginica",
142
+ "Iris-virginica",
143
+ "Iris-virginica",
144
+ "Iris-virginica",
145
+ "Iris-virginica",
146
+ "Iris-virginica",
147
+ "Iris-virginica",
148
+ "Iris-virginica"
149
+ ]
40
150
  RECORD_BATCH
41
151
  end
42
152
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-datasets-arrow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: red-arrow
@@ -112,7 +112,7 @@ description: 'Red Datasets Arrow adds `#to_arrow` method to each dataset in Red
112
112
  You can get dataset as `Arrow::Table` object. `Arrow::Table` is provided by [Red
113
113
  Arrow](http://github.com/red-data-tools/red-arrow).
114
114
 
115
- '
115
+ '
116
116
  email:
117
117
  - kou@clear-code.com
118
118
  executables: []
@@ -151,13 +151,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.7.6
154
+ rubygems_version: 3.3.0.dev
156
155
  signing_key:
157
156
  specification_version: 4
158
157
  summary: Red Datasets Arrow adds [Apache Arrow](http://arrow.apache.org/) object export
159
158
  feature to Red Datasets.
160
159
  test_files:
161
- - test/test-iris.rb
162
160
  - test/helper.rb
163
161
  - test/run-test.rb
162
+ - test/test-iris.rb