[arrow] branch master updated: ARROW-2409: [Rust] Deny warnings in CI.
This is an automated email from the ASF dual-hosted git repository. paddyhoran pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git The following commit(s) were added to refs/heads/master by this push: new 78105f9 ARROW-2409: [Rust] Deny warnings in CI. 78105f9 is described below commit 78105f90d4bd5c1e7b1d85a75e4fcd5e978201ef Author: Owen Nelson AuthorDate: Sat Mar 9 20:22:11 2019 -0500 ARROW-2409: [Rust] Deny warnings in CI. [ARROW-2409](https://issues.apache.org/jira/browse/ARROW-2409) asks that we prevent warnings from entering the codebase in order to maintain a more strict level of hygine. There are a couple ways to cause rustc to _bail_ when warnings are encountered, the most straightforward of which might be to put `#![deny(warnings)]` in each crate root. Still, it struck me as doing this would cause undue friction on contributors and maintainers. An alternative, noted by the [rust patterns] guide, is to use `RUSTFLAGS` to opt-in to this behavior at build time. For example, with an extraneous import added to a module: ```text $ RUSTFLAGS="-D warnings" cargo build Compiling arrow v0.13.0-SNAPSHOT (/home/owen/projects/arrow/rust/arrow) error: unused import: `std::io` --> arrow/src/datatypes.rs:36:5 | 36 | use std::io; | ^^^ | = note: `-D unused-imports` implied by `-D warnings` error: aborting due to previous error error: Could not compile `arrow`. To learn more, run the command again with --verbose. ``` Adding this env var to the coverage collection should allow travis to report warnings as failures in CI while letting developers continue to work as normal. This approach is also sort of nice since it will enforce the rule across all crates in the workspace as new sub-crates are added without having to remember to annotate the crate root each time. [rust patterns]: https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md Author: Owen Nelson Closes #3852 from onelson/deny-warnings-ci and squashes the following commits: 6d68b33b ARROW-2409: Deny warnings in CI. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ddf6fcc..afddeea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -348,7 +348,7 @@ matrix: - pushd ${TRAVIS_BUILD_DIR}/rust # Run coverage for codecov.io - mkdir -p target/kcov -- RUST_BACKTRACE=1 RUSTUP_TOOLCHAIN=nightly cargo coverage --verbose +- RUST_BACKTRACE=1 RUSTUP_TOOLCHAIN=nightly RUSTFLAGS="-D warnings" cargo coverage --verbose - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" - name: Go language: go
[arrow] branch master updated: ARROW-4813: [Ruby] Add tests for == and !=
This is an automated email from the ASF dual-hosted git repository. shiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git The following commit(s) were added to refs/heads/master by this push: new 0ad791e ARROW-4813: [Ruby] Add tests for == and != 0ad791e is described below commit 0ad791e64759e4bbc69aad195b7d31aeb92f0cf9 Author: Kouhei Sutou AuthorDate: Sun Mar 10 10:09:22 2019 +0900 ARROW-4813: [Ruby] Add tests for == and != Author: Kouhei Sutou Closes #3853 from kou/ruby-equal-test and squashes the following commits: 7b8c52bc Add tests for == and != --- ruby/red-arrow/red-arrow.gemspec | 2 +- ruby/red-arrow/test/test-array.rb | 14 ++ .../test/{test-array.rb => test-buffer.rb} | 37 +-- ruby/red-arrow/test/test-chunked-array.rb | 22 + ruby/red-arrow/test/test-column.rb | 24 ++ ruby/red-arrow/test/test-data-type.rb | 20 .../test/{test-array.rb => test-decimal128.rb} | 45 +- ruby/red-arrow/test/test-field.rb | 20 ruby/red-arrow/test/test-record-batch.rb | 14 ++ ruby/red-arrow/test/test-schema.rb | 14 ++ ruby/red-arrow/test/test-table.rb | 14 ++ .../test/{test-array.rb => test-tensor.rb} | 53 -- 12 files changed, 204 insertions(+), 75 deletions(-) diff --git a/ruby/red-arrow/red-arrow.gemspec b/ruby/red-arrow/red-arrow.gemspec index 2d417f0..121f567 100644 --- a/ruby/red-arrow/red-arrow.gemspec +++ b/ruby/red-arrow/red-arrow.gemspec @@ -45,7 +45,7 @@ Gem::Specification.new do |spec| spec.test_files += Dir.glob("test/**/*") spec.extensions = ["dependency-check/Rakefile"] - spec.add_runtime_dependency("gobject-introspection", ">= 3.3.1") + spec.add_runtime_dependency("gobject-introspection", ">= 3.3.5") spec.add_runtime_dependency("pkg-config") spec.add_runtime_dependency("native-package-installer") diff --git a/ruby/red-arrow/test/test-array.rb b/ruby/red-arrow/test/test-array.rb index 3dd7635..793a262 100644 --- a/ruby/red-arrow/test/test-array.rb +++ b/ruby/red-arrow/test/test-array.rb @@ -49,5 +49,19 @@ class ArrayTest < Test::Unit::TestCase @array[-1]) end end + +sub_test_case("#==") do + test("Arrow::Array") do +assert do + @array == @array +end + end + + test("not Arrow::Array") do +assert do + not (@array == 29) +end + end +end end end diff --git a/ruby/red-arrow/test/test-array.rb b/ruby/red-arrow/test/test-buffer.rb similarity index 54% copy from ruby/red-arrow/test/test-array.rb copy to ruby/red-arrow/test/test-buffer.rb index 3dd7635..64f1907 100644 --- a/ruby/red-arrow/test/test-array.rb +++ b/ruby/red-arrow/test/test-buffer.rb @@ -15,38 +15,23 @@ # specific language governing permissions and limitations # under the License. -class ArrayTest < Test::Unit::TestCase - sub_test_case(".new") do -test("Boolean") do - array = Arrow::BooleanArray.new([true, false, true]) - assert_equal([true, false, true], - array.to_a) -end - end - +class BufferTest < Test::Unit::TestCase sub_test_case("instance methods") do def setup - @values = [true, false, nil, true] - @array = Arrow::BooleanArray.new(@values) + @buffer = Arrow::Buffer.new("Hello") end -test("#each") do - assert_equal(@values, @array.to_a) -end - -sub_test_case("#[]") do - test("valid range") do -assert_equal(@values, - @array.length.times.collect {|i| @array[i]}) - end - - test("out of range") do -assert_nil(@array[@array.length]) +sub_test_case("#==") do + test("Arrow::Buffer") do +assert do + @buffer == @buffer +end end - test("negative index") do -assert_equal(@values.last, - @array[-1]) + test("not Arrow::Buffer") do +assert do + not (@buffer == 29) +end end end end diff --git a/ruby/red-arrow/test/test-chunked-array.rb b/ruby/red-arrow/test/test-chunked-array.rb index 2344d80..853922a 100644 --- a/ruby/red-arrow/test/test-chunked-array.rb +++ b/ruby/red-arrow/test/test-chunked-array.rb @@ -62,4 +62,26 @@ class ChunkedArrayTest < Test::Unit::TestCase ]) end end + + sub_test_case("#==") do +def setup + arrays = [ +Arrow::BooleanArray.new([true]), +Arrow::BooleanArray.new([false, true]), + ] + @chunked_array = Arrow::ChunkedArray.new(arrays) +end + +test("Arrow::ChunkedArray") do + assert do +@chunked_array == @chunked_array + end +end + +test("not Arrow::ChunkedArray") do + assert do +not
[arrow] branch master updated: ARROW-4801: [GLib] Suppress Meson warnings
This is an automated email from the ASF dual-hosted git repository. shiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git The following commit(s) were added to refs/heads/master by this push: new 17500f7 ARROW-4801: [GLib] Suppress Meson warnings 17500f7 is described below commit 17500f781282f21a68ea818d21a9006df3ee0d42 Author: Kouhei Sutou AuthorDate: Sun Mar 10 09:32:15 2019 +0900 ARROW-4801: [GLib] Suppress Meson warnings Messages: arrow-glib/meson.build:211: DEPRECATION: Library arrow-glib was passed to the "libraries" keyword argument of a previous call to generate() method instead of first positional argument. Adding arrow-glib to "Requires" field, but this is a deprecated behaviour that will change in a future version of Meson. Please report the issue if this warning cannot be avoided in your case. arrow-cuda-glib/meson.build:53: DEPRECATION: Library arrow-cuda-glib was passed to the "libraries" keyword argument of a previous call to generate() method instead of first positional argument. Adding arrow-cuda-glib to "Requires" field, but this is a deprecated behaviour that will change in a future version of Meson. Please report the issue if this warning cannot be avoided in your case. Author: Kouhei Sutou Closes #3840 from kou/glib-meson-suppress-warning and squashes the following commits: 3c0b0bbc Suppress Meson warnings --- c_glib/arrow-cuda-glib/meson.build | 6 +++--- c_glib/arrow-glib/meson.build | 6 +++--- c_glib/gandiva-glib/meson.build| 6 +++--- c_glib/parquet-glib/meson.build| 12 ++-- c_glib/plasma-glib/meson.build | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/c_glib/arrow-cuda-glib/meson.build b/c_glib/arrow-cuda-glib/meson.build index e5b9f47..a29f12b 100644 --- a/c_glib/arrow-cuda-glib/meson.build +++ b/c_glib/arrow-cuda-glib/meson.build @@ -50,12 +50,12 @@ arrow_cuda_glib = declare_dependency(link_with: libarrow_cuda_glib, include_directories: base_include_directories, dependencies: dependencies) -pkgconfig.generate(filebase: 'arrow-cuda-glib', +pkgconfig.generate(libarrow_cuda_glib, + filebase: 'arrow-cuda-glib', name: 'Apache Arrow CUDA GLib', description: 'C API for Apache Arrow CUDA based on GLib', version: version, - requires: ['arrow-glib', 'arrow-cuda'], - libraries: [libarrow_cuda_glib]) + requires: ['arrow-glib', 'arrow-cuda']) gir_dependencies = [ declare_dependency(sources: arrow_glib_gir), diff --git a/c_glib/arrow-glib/meson.build b/c_glib/arrow-glib/meson.build index 14126be..4e8e1cc 100644 --- a/c_glib/arrow-glib/meson.build +++ b/c_glib/arrow-glib/meson.build @@ -208,12 +208,12 @@ arrow_glib = declare_dependency(link_with: libarrow_glib, dependencies: dependencies, sources: enums_header) -pkgconfig.generate(filebase: meson.project_name(), +pkgconfig.generate(libarrow_glib, + filebase: meson.project_name(), name: 'Apache Arrow GLib', description: 'C API for Apache Arrow based on GLib', version: version, - requires: ['gio-2.0', 'arrow'], - libraries: [libarrow_glib]) + requires: ['gio-2.0', 'arrow']) if have_arrow_orc pkgconfig.generate(filebase: 'arrow-orc-glib', name: 'Apache Arrow GLib ORC', diff --git a/c_glib/gandiva-glib/meson.build b/c_glib/gandiva-glib/meson.build index 7c288e4..11ef8d6 100644 --- a/c_glib/gandiva-glib/meson.build +++ b/c_glib/gandiva-glib/meson.build @@ -58,12 +58,12 @@ gandiva_glib = declare_dependency(link_with: libgandiva_glib, dependencies: dependencies, sources: enums_header) -pkgconfig.generate(filebase: project_name, +pkgconfig.generate(libgandiva_glib, + filebase: project_name, name: 'Apache Arrow Gandiva GLib', description: 'C API for Apache Arrow Gandiva based on GLib', version: version, - requires: ['gandiva', 'arrow-glib'], - libraries: [libgandiva_glib]) + requires: ['gandiva', 'arrow-glib']) gnome.generate_gir(libgandiva_glib, dependencies: declare_dependency(sources: arrow_glib_gir), diff --git a/c_glib/parquet-glib/meson.build b/c_glib/parquet-glib/meson.build index afa6d21..a52b328 100644 --- a/c_glib/parquet-glib/meson.build +++ b/c_glib/parquet-glib/meson.build @@ -56,12 +56,12 @@ parquet_glib = declare_dependency(link_with: libparquet_glib,