You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2021/10/04 01:28:03 UTC
[incubator-sedona] branch doc-refactor updated: Add file header
check and missing file headers
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch doc-refactor
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git
The following commit(s) were added to refs/heads/doc-refactor by this push:
new 73ee9b4 Add file header check and missing file headers
73ee9b4 is described below
commit 73ee9b4d88972e38d37130de042fea4f96c872da
Author: Jia Yu <ji...@apache.org>
AuthorDate: Sun Oct 3 18:27:54 2021 -0700
Add file header check and missing file headers
---
R/generate-docs.R | 17 +++++++++++++++++
R/tests/testthat.R | 17 +++++++++++++++++
R/tests/testthat/helper-initialize.R | 17 +++++++++++++++++
R/tests/testthat/test-apply-spatial-partitioner.R | 17 +++++++++++++++++
R/tests/testthat/test-bounding-box.R | 17 +++++++++++++++++
R/tests/testthat/test-build-index.R | 17 +++++++++++++++++
R/tests/testthat/test-crs-transform.R | 17 +++++++++++++++++
R/tests/testthat/test-data-interface.R | 17 +++++++++++++++++
R/tests/testthat/test-dbplyr-integration.R | 17 +++++++++++++++++
R/tests/testthat/test-init.R | 17 +++++++++++++++++
R/tests/testthat/test-sdf-interface.R | 17 +++++++++++++++++
R/tests/testthat/test-spatial-join.R | 17 +++++++++++++++++
R/tests/testthat/test-spatial-queries.R | 17 +++++++++++++++++
R/tests/testthat/test-spatial-rdd-aggregation-fns.R | 17 +++++++++++++++++
R/tests/testthat/test-viz.R | 17 +++++++++++++++++
docs/download/publish.md | 16 ++++++++++++++++
16 files changed, 271 insertions(+)
diff --git a/R/generate-docs.R b/R/generate-docs.R
index 0d4f246..d723cb8 100644
--- a/R/generate-docs.R
+++ b/R/generate-docs.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# Install all dependencies if they are not installed
# Pandoc needs to be installed: brew install pandoc
list.of.packages <- c("sparklyr", "roxygen2", "tools")
diff --git a/R/tests/testthat.R b/R/tests/testthat.R
index d378a50..999122d 100644
--- a/R/tests/testthat.R
+++ b/R/tests/testthat.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
library(sparklyr)
library(apache.sedona)
library(testthat)
diff --git a/R/tests/testthat/helper-initialize.R b/R/tests/testthat/helper-initialize.R
index ed4a1bc..4ca1eef 100644
--- a/R/tests/testthat/helper-initialize.R
+++ b/R/tests/testthat/helper-initialize.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
testthat_spark_connection <- function(conn_retry_interval_s = 2) {
conn_key <- ".testthat_spark_connection"
if (!exists(conn_key, envir = .GlobalEnv)) {
diff --git a/R/tests/testthat/test-apply-spatial-partitioner.R b/R/tests/testthat/test-apply-spatial-partitioner.R
index 6722e37..c50eb93 100644
--- a/R/tests/testthat/test-apply-spatial-partitioner.R
+++ b/R/tests/testthat/test-apply-spatial-partitioner.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("apply spatial partition")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-bounding-box.R b/R/tests/testthat/test-bounding-box.R
index f03f5d6..5743e67 100644
--- a/R/tests/testthat/test-bounding-box.R
+++ b/R/tests/testthat/test-bounding-box.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("bounding box")
test_that("bounding box object works as expected", {
diff --git a/R/tests/testthat/test-build-index.R b/R/tests/testthat/test-build-index.R
index 15ca5f2..674d07f 100644
--- a/R/tests/testthat/test-build-index.R
+++ b/R/tests/testthat/test-build-index.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("build index")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-crs-transform.R b/R/tests/testthat/test-crs-transform.R
index 4ca66e9..3056486 100644
--- a/R/tests/testthat/test-crs-transform.R
+++ b/R/tests/testthat/test-crs-transform.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("CRS transform")
test_that("crs_transform() works as expected", {
diff --git a/R/tests/testthat/test-data-interface.R b/R/tests/testthat/test-data-interface.R
index 34127fd..1f908d9 100644
--- a/R/tests/testthat/test-data-interface.R
+++ b/R/tests/testthat/test-data-interface.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("data interface")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-dbplyr-integration.R b/R/tests/testthat/test-dbplyr-integration.R
index d0d13e2..c5223dd 100644
--- a/R/tests/testthat/test-dbplyr-integration.R
+++ b/R/tests/testthat/test-dbplyr-integration.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("dbplyr integration")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-init.R b/R/tests/testthat/test-init.R
index 0b2161c..0f0ea76 100644
--- a/R/tests/testthat/test-init.R
+++ b/R/tests/testthat/test-init.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("initialization")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-sdf-interface.R b/R/tests/testthat/test-sdf-interface.R
index 4e5b4dc..9131a5c 100644
--- a/R/tests/testthat/test-sdf-interface.R
+++ b/R/tests/testthat/test-sdf-interface.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("sdf interface")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-spatial-join.R b/R/tests/testthat/test-spatial-join.R
index a3569a7..863739e 100644
--- a/R/tests/testthat/test-spatial-join.R
+++ b/R/tests/testthat/test-spatial-join.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("spatial join")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-spatial-queries.R b/R/tests/testthat/test-spatial-queries.R
index 8825f1f..1520688 100644
--- a/R/tests/testthat/test-spatial-queries.R
+++ b/R/tests/testthat/test-spatial-queries.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("spatial queries")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-spatial-rdd-aggregation-fns.R b/R/tests/testthat/test-spatial-rdd-aggregation-fns.R
index af9e010..16c8a63 100644
--- a/R/tests/testthat/test-spatial-rdd-aggregation-fns.R
+++ b/R/tests/testthat/test-spatial-rdd-aggregation-fns.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("spatial RDD aggregation functions")
sc <- testthat_spark_connection()
diff --git a/R/tests/testthat/test-viz.R b/R/tests/testthat/test-viz.R
index 434839f..8ed95f6 100644
--- a/R/tests/testthat/test-viz.R
+++ b/R/tests/testthat/test-viz.R
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
context("visualization")
sc <- testthat_spark_connection()
diff --git a/docs/download/publish.md b/docs/download/publish.md
index 99cb226..8935bb6 100644
--- a/docs/download/publish.md
+++ b/docs/download/publish.md
@@ -1,5 +1,21 @@
# Publish Sedona
+## Check ASF copyright in all file headers
+
+1. Download [Apache Rat binary (.jar file)](https://creadur.apache.org/rat/download_rat.cgi).
+2. Run the following terminal script:
+```bash
+#!/bin/bash
+git clone --shared --branch master https://github.com/apache/incubator-sedona.git sedona-src
+java -jar apache-rat-0.13.jar -d sedona-src > report.txt
+```
+3. Read the generated report.txt file and make sure all source code files have ASF header.
+4. Delete the generated report and cloned files
+```
+rm -rf sedona-src
+rm report.txt
+```
+
## Publish the doc website
1. Run `mkdocs build` in Sedona root directory. Copy all content in the `site` folder.