You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by jo...@apache.org on 2021/04/18 17:41:58 UTC

[arrow-rs] branch ci-fix updated (445fe62 -> cbf8ed2)

This is an automated email from the ASF dual-hosted git repository.

jorgecarleitao pushed a change to branch ci-fix
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git.


 discard 445fe62  Fixed Linting.
     new cbf8ed2  Fixed Linting.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (445fe62)
            \
             N -- N -- N   refs/heads/ci-fix (cbf8ed2)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/dev.yml  |  2 +-
 .github/workflows/rust.yml | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

[arrow-rs] 01/01: Fixed Linting.

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jorgecarleitao pushed a commit to branch ci-fix
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git

commit cbf8ed2b92deaa6c4a7ed1c21abcba52430b8d7f
Author: Jorge C. Leitao <jo...@gmail.com>
AuthorDate: Sun Apr 18 17:35:17 2021 +0000

    Fixed Linting.
---
 .github/workflows/dev.yml           |   2 +-
 .github/workflows/rust.yml          |  14 +++++
 .gitignore                          |   3 +
 arrow/src/util/test_util.rs         |   5 +-
 dev/.gitignore                      |   2 +
 dev/archery/archery/cli.py          |   4 ++
 dev/archery/archery/utils/lint.py   |   4 --
 dev/archery/archery/utils/source.py |   8 +--
 dev/release/rat_exclude_files.txt   | 113 ++----------------------------------
 9 files changed, 32 insertions(+), 123 deletions(-)

diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 12888a6..9d8146a 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -40,4 +40,4 @@ jobs:
       - name: Setup Archery
         run: pip install -e dev/archery[docker]
       - name: Lint
-        run: archery lint --rat --rust
+        run: archery lint --rat
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 9ab74f5..d19dd93 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -269,6 +269,20 @@ jobs:
           # Ignore MIRI errors until we can get a clean run
           cargo miri test || true
 
+  lint:
+    name: Lint
+    runs-on: ubuntu-latest
+    container:
+      image: amd64/rust
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup toolchain
+        run: |
+          rustup toolchain install stable
+          rustup default stable
+          rustup component add rustfmt
+      - name: Run
+        run: cargo fmt --all -- --check
   coverage:
     name: Coverage
     runs-on: ubuntu-latest
diff --git a/.gitignore b/.gitignore
index 389f4ab..5b3bf6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,6 @@ target
 rusty-tags.vi
 .history
 .flatbuffers/
+
+.vscode
+venv/*
diff --git a/arrow/src/util/test_util.rs b/arrow/src/util/test_util.rs
index cfbec03..261b245 100644
--- a/arrow/src/util/test_util.rs
+++ b/arrow/src/util/test_util.rs
@@ -98,10 +98,7 @@ pub fn arrow_test_data() -> String {
 /// assert!(std::path::PathBuf::from(filename).exists());
 /// ```
 pub fn parquet_test_data() -> String {
-    match get_data_dir(
-        "PARQUET_TEST_DATA",
-        "../parquet-testing/data",
-    ) {
+    match get_data_dir("PARQUET_TEST_DATA", "../parquet-testing/data") {
         Ok(pb) => pb.display().to_string(),
         Err(err) => panic!("failed to get parquet data dir: {}", err),
     }
diff --git a/dev/.gitignore b/dev/.gitignore
index b079293..c03a7c7 100644
--- a/dev/.gitignore
+++ b/dev/.gitignore
@@ -18,3 +18,5 @@
 # Python virtual environments for dev tools
 .venv*/
 
+__pycache__
+*.egg-info
diff --git a/dev/archery/archery/cli.py b/dev/archery/archery/cli.py
index 1dfdaaf..4bbde75 100644
--- a/dev/archery/archery/cli.py
+++ b/dev/archery/archery/cli.py
@@ -289,6 +289,8 @@ def decorate_lint_command(cmd):
 
 
 @archery.command(short_help="Check Arrow source tree for errors")
+@click.option("--src", metavar="<arrow_src>", default=".",
+              help="Specify Arrow source directory")
 @click.option("--fix", is_flag=True, type=BOOL, default=False,
               help="Toggle fixing the lint errors if the linter supports it.")
 @click.option("--iwyu_all", is_flag=True, type=BOOL, default=False,
@@ -298,6 +300,8 @@ def decorate_lint_command(cmd):
 @decorate_lint_command
 @click.pass_context
 def lint(ctx, src, fix, iwyu_all, **checks):
+    src = ArrowSources(src)
+
     if checks.pop('all'):
         # "--all" is given => enable all non-selected checks
         for k, v in checks.items():
diff --git a/dev/archery/archery/utils/lint.py b/dev/archery/archery/utils/lint.py
index 3b94d01..e81d6ac 100644
--- a/dev/archery/archery/utils/lint.py
+++ b/dev/archery/archery/utils/lint.py
@@ -265,10 +265,6 @@ def rat_linter(src, root):
     """Run apache-rat license linter."""
     logger.info("Running apache-rat linter")
 
-    if src.git_dirty:
-        logger.warn("Due to the usage of git-archive, uncommitted files will"
-                    " not be checked for rat violations. ")
-
     exclusion = exclusion_from_globs(
         os.path.join(src.dev, "release", "rat_exclude_files.txt"))
 
diff --git a/dev/archery/archery/utils/source.py b/dev/archery/archery/utils/source.py
index d30b4f1..1ae0fe0 100644
--- a/dev/archery/archery/utils/source.py
+++ b/dev/archery/archery/utils/source.py
@@ -45,13 +45,7 @@ class ArrowSources:
         ----------
         path : src
         """
-        path = Path(path)
-        # validate by checking a specific path in the arrow source tree
-        if not (path / 'cpp' / 'CMakeLists.txt').exists():
-            raise InvalidArrowSource(
-                "No Arrow C++ sources found in {}.".format(path)
-            )
-        self.path = path
+        self.path = Path(path)
 
     @property
     def archery(self):
diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt
index 68f5668..58f937f 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -12,37 +12,6 @@ ci/etc/rprofile
 ci/etc/*.patch
 ci/vcpkg/*.patch
 CHANGELOG.md
-cpp/CHANGELOG_PARQUET.md
-cpp/src/arrow/io/mman.h
-cpp/src/arrow/util/random.h
-cpp/src/arrow/status.cc
-cpp/src/arrow/status.h
-cpp/src/arrow/vendored/*
-cpp/build-support/asan_symbolize.py
-cpp/build-support/cpplint.py
-cpp/build-support/lint_exclusions.txt
-cpp/build-support/iwyu/*
-cpp/cmake_modules/FindPythonLibsNew.cmake
-cpp/cmake_modules/SnappyCMakeLists.txt
-cpp/cmake_modules/SnappyConfig.h
-cpp/examples/parquet/parquet-arrow/cmake_modules/FindArrow.cmake
-cpp/src/parquet/.parquetcppversion
-cpp/src/generated/parquet_constants.cpp
-cpp/src/generated/parquet_constants.h
-cpp/src/generated/parquet_types.cpp
-cpp/src/generated/parquet_types.h
-cpp/src/plasma/thirdparty/ae/ae.c
-cpp/src/plasma/thirdparty/ae/ae.h
-cpp/src/plasma/thirdparty/ae/ae_epoll.c
-cpp/src/plasma/thirdparty/ae/ae_evport.c
-cpp/src/plasma/thirdparty/ae/ae_kqueue.c
-cpp/src/plasma/thirdparty/ae/ae_select.c
-cpp/src/plasma/thirdparty/ae/config.h
-cpp/src/plasma/thirdparty/ae/zmalloc.h
-cpp/src/plasma/thirdparty/dlmalloc.c
-cpp/thirdparty/flatbuffers/include/flatbuffers/base.h
-cpp/thirdparty/flatbuffers/include/flatbuffers/flatbuffers.h
-cpp/thirdparty/flatbuffers/include/flatbuffers/stl_emulation.h
 dev/requirements*.txt
 dev/archery/MANIFEST.in
 dev/archery/requirements*.txt
@@ -115,56 +84,11 @@ dev/tasks/linux-packages/apache-arrow/debian/source/format
 dev/tasks/linux-packages/apache-arrow/debian/watch
 dev/tasks/requirements*.txt
 dev/tasks/conda-recipes/*
-docs/requirements.txt
-go/arrow/flight/Flight_grpc.pb.go
-go/arrow/go.sum
-go/arrow/Gopkg.lock
-go/arrow/flight/Flight.pb.go
-go/arrow/flight/Flight_grpc.pb.go
-go/arrow/internal/cpu/*
-go/arrow/type_string.go
-go/*.tmpldata
-go/*.s
-go/parquet/go.sum
-go/parquet/internal/gen-go/parquet/GoUnusedProtection__.go
-go/parquet/internal/gen-go/parquet/parquet-consts.go
-go/parquet/internal/gen-go/parquet/parquet.go
-js/.npmignore
-js/closure-compiler-scripts/*
-js/src/fb/*.ts
-js/yarn.lock
-js/.eslintignore
-python/cmake_modules
-python/cmake_modules/FindPythonLibsNew.cmake
-python/cmake_modules/SnappyCMakeLists.txt
-python/cmake_modules/SnappyConfig.h
-python/MANIFEST.in
-python/manylinux1/.dockerignore
-python/pyarrow/includes/__init__.pxd
-python/pyarrow/tests/__init__.py
-python/pyarrow/vendored/*
-python/requirements*.txt
 pax_global_header
 MANIFEST.in
 __init__.pxd
 __init__.py
 requirements.txt
-csharp/.gitattributes
-csharp/dummy.git/*
-csharp/src/Apache.Arrow/Flatbuf/*
-csharp/Apache.Arrow.sln
-csharp/examples/FluentBuilderExample/FluentBuilderExample.csproj
-csharp/examples/Examples.sln
-csharp/src/Apache.Arrow/Apache.Arrow.csproj
-csharp/src/Apache.Arrow/Properties/Resources.Designer.cs
-csharp/src/Apache.Arrow/Properties/Resources.resx
-csharp/test/Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj
-csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
-csharp/test/Apache.Arrow.Tests/app.config
-csharp/src/Apache.Arrow.Flight/Apache.Arrow.Flight.csproj
-csharp/test/Apache.Arrow.Flight.Tests/Apache.Arrow.Flight.Tests.csproj
-csharp/test/Apache.Arrow.Flight.TestWeb/Apache.Arrow.Flight.TestWeb.csproj
-csharp/src/Apache.Arrow.Flight.AspNetCore/Apache.Arrow.Flight.AspNetCore.csproj
 *.html
 *.sgml
 *.css
@@ -173,35 +97,10 @@ csharp/src/Apache.Arrow.Flight.AspNetCore/Apache.Arrow.Flight.AspNetCore.csproj
 *.svg
 *.devhelp2
 *.scss
-r/R/arrowExports.R
-r/src/arrowExports.cpp
-r/DESCRIPTION
-r/LICENSE.md
-r/NAMESPACE
-r/.Rbuildignore
-r/arrow.Rproj
-r/README.md
-r/README.Rmd
-r/man/*.Rd
-r/cran-comments.md
-r/vignettes/*.Rmd
-r/tests/testthat/test-*.txt
-r/inst/include/cpp11.hpp
-r/inst/include/cpp11/*.hpp
 .gitattributes
-ruby/red-arrow/.yardopts
-rust/arrow/test/data/*.csv
-rust/rust-toolchain
-rust/arrow-flight/src/arrow.flight.protocol.rs
-julia/Arrow/Project.toml
-julia/Arrow/README.md
-julia/Arrow/docs/Manifest.toml
-julia/Arrow/docs/Project.toml
-julia/Arrow/docs/make.jl
-julia/Arrow/docs/mkdocs.yml
-julia/Arrow/docs/src/index.md
-julia/Arrow/docs/src/manual.md
-julia/Arrow/docs/src/reference.md
-rust/ballista/rust/benchmarks/tpch/queries/q*.sql
-rust/ballista/rust/scheduler/testdata/*
-rust/ballista/ui/scheduler/yarn.lock
+arrow/test/data/*.csv
+rust-toolchain
+arrow-flight/src/arrow.flight.protocol.rs
+ballista/rust/benchmarks/tpch/queries/q*.sql
+ballista/rust/scheduler/testdata/*
+ballista/ui/scheduler/yarn.lock