From 236f750ff9899002501202aeca514114aaa52ae8 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 20:58:32 +0800 Subject: [PATCH 01/13] ci: add license check --- .github/actions/check/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/check/action.yml b/.github/actions/check/action.yml index 088290378..6cb2a3f04 100644 --- a/.github/actions/check/action.yml +++ b/.github/actions/check/action.yml @@ -7,6 +7,10 @@ inputs: runs: using: "composite" steps: + + - name: Check Apache License Header + uses: korandoru/hawkeye@v3 + - name: Typos uses: crate-ci/typos@master From e70b724f936eb5ceb378aa080b14d3d048685522 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:00:01 +0800 Subject: [PATCH 02/13] z --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 960ce0db6..7db1efb6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} build: + needs: check runs-on: ${{ matrix.os }}-latest name: build-${{ matrix.os }}-${{ matrix.arch }} strategy: @@ -40,6 +41,7 @@ jobs: - run: cargo build unit: + needs: check runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -49,6 +51,7 @@ jobs: - run: cargo test --all-features --lib -- --show-output integration: + needs: check runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 4a47fa7ffafce77f508741c91fa4d7cb00587b40 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:05:05 +0800 Subject: [PATCH 03/13] z --- licenserc.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenserc.toml b/licenserc.toml index fbb01071c..6ae2bdce8 100644 --- a/licenserc.toml +++ b/licenserc.toml @@ -1,5 +1,7 @@ baseDir = "." +headerPath = "Apache-2.0.txt" + excludes = [ # hidden files ".cargo", From 9c21e1ac9a12e0b597ba6e390b8e4e9b31a65d29 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:05:09 +0800 Subject: [PATCH 04/13] z --- licenses/Apache-2.0.txt | 201 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 licenses/Apache-2.0.txt diff --git a/licenses/Apache-2.0.txt b/licenses/Apache-2.0.txt new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/licenses/Apache-2.0.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. From 3d4bad21391309bf1ec600d066c295c6580da0f6 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:08:41 +0800 Subject: [PATCH 05/13] z --- bindings/python/src/asyncio.rs | 2 +- cli/src/ast/mod.rs | 2 +- core/tests/core/stage.rs | 2 +- driver/src/flight_sql.rs | 2 +- driver/tests/driver/select_iter.rs | 2 +- licenserc.toml | 3 +++ 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bindings/python/src/asyncio.rs b/bindings/python/src/asyncio.rs index c3b3cbc52..248a1e69e 100644 --- a/bindings/python/src/asyncio.rs +++ b/bindings/python/src/asyncio.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/ast/mod.rs b/cli/src/ast/mod.rs index 95143c8d1..fcdd9c037 100644 --- a/cli/src/ast/mod.rs +++ b/cli/src/ast/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/tests/core/stage.rs b/core/tests/core/stage.rs index c9671e882..42de5f504 100644 --- a/core/tests/core/stage.rs +++ b/core/tests/core/stage.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/flight_sql.rs b/driver/src/flight_sql.rs index 364b5c783..2026068e8 100644 --- a/driver/src/flight_sql.rs +++ b/driver/src/flight_sql.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/tests/driver/select_iter.rs b/driver/tests/driver/select_iter.rs index f5d3aafa6..42c9c3dd0 100644 --- a/driver/tests/driver/select_iter.rs +++ b/driver/tests/driver/select_iter.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/licenserc.toml b/licenserc.toml index 6ae2bdce8..7d21e16d0 100644 --- a/licenserc.toml +++ b/licenserc.toml @@ -29,6 +29,9 @@ excludes = [ "**/*.yapf", "**/*.test", "**/*.txt", + + # test files + "cli/tests/**", ] [properties] From f48758032d8e242b5d079c2823ead9344379a95d Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:10:39 +0800 Subject: [PATCH 06/13] z --- scripts/bump.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/bump.sh b/scripts/bump.sh index abec28d93..7f6e5c809 100755 --- a/scripts/bump.sh +++ b/scripts/bump.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright 2021 Datafuse Labs +# +# Licensed 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. + VERSION=$1 if [ -z "$VERSION" ]; then From 80d0c0482a45527ec7af5b6c4d72af9c3f45da22 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:11:09 +0800 Subject: [PATCH 07/13] z --- bindings/python/tests/steps/binding.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/tests/steps/binding.py b/bindings/python/tests/steps/binding.py index 5eeba945c..f5bf9fcec 100644 --- a/bindings/python/tests/steps/binding.py +++ b/bindings/python/tests/steps/binding.py @@ -1,4 +1,4 @@ -# Copyright 2023 Datafuse Labs. +# Copyright 2021 Datafuse Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ # 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. + import os from behave import given, when, then From b977ee9f41500290a0fb44cf73049bc4b141ec46 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:13:13 +0800 Subject: [PATCH 08/13] z --- bindings/python/src/lib.rs | 2 +- bindings/python/tests/binding.feature | 2 +- bindings/tests/features/binding.feature | 2 +- cli/build.rs | 2 +- cli/src/ast/tokenizer.rs | 2 +- cli/src/config.rs | 2 +- cli/src/display.rs | 2 +- cli/src/helper.rs | 2 +- cli/src/main.rs | 2 +- cli/src/session.rs | 2 +- cli/test.sh | 14 ++++++++++++++ core/src/client.rs | 2 +- core/src/error.rs | 2 +- core/src/lib.rs | 2 +- core/src/request.rs | 2 +- core/src/response.rs | 2 +- core/tests/core/common/mod.rs | 2 +- core/tests/core/main.rs | 2 +- core/tests/core/simple.rs | 2 +- driver/src/conn.rs | 2 +- driver/src/error.rs | 2 +- driver/src/lib.rs | 2 +- driver/src/rest_api.rs | 2 +- driver/src/rows.rs | 2 +- driver/src/schema.rs | 2 +- driver/src/value.rs | 2 +- driver/tests/driver/common/mod.rs | 2 +- driver/tests/driver/connection.rs | 2 +- driver/tests/driver/main.rs | 2 +- driver/tests/driver/select_simple.rs | 2 +- driver/tests/driver/stream_load.rs | 2 +- 31 files changed, 44 insertions(+), 30 deletions(-) diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index 7b142e20a..bfe8221bc 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/bindings/python/tests/binding.feature b/bindings/python/tests/binding.feature index 5f4696ed0..6eff9b761 100644 --- a/bindings/python/tests/binding.feature +++ b/bindings/python/tests/binding.feature @@ -1,4 +1,4 @@ -# Copyright 2023 Datafuse Labs. +# Copyright 2021 Datafuse Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/bindings/tests/features/binding.feature b/bindings/tests/features/binding.feature index a38bdba6c..44227e252 100644 --- a/bindings/tests/features/binding.feature +++ b/bindings/tests/features/binding.feature @@ -1,4 +1,4 @@ -# Copyright 2021 Datafuse Labs. +# Copyright 2021 Datafuse Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cli/build.rs b/cli/build.rs index 8bc977333..0a2a793fb 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/ast/tokenizer.rs b/cli/src/ast/tokenizer.rs index 28f5cc9bb..f4b6e7b16 100644 --- a/cli/src/ast/tokenizer.rs +++ b/cli/src/ast/tokenizer.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/config.rs b/cli/src/config.rs index 18803a287..92bfab87b 100644 --- a/cli/src/config.rs +++ b/cli/src/config.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/display.rs b/cli/src/display.rs index 8f5a79151..cad2bee4b 100644 --- a/cli/src/display.rs +++ b/cli/src/display.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/helper.rs b/cli/src/helper.rs index 00c88f03f..76543499f 100644 --- a/cli/src/helper.rs +++ b/cli/src/helper.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/main.rs b/cli/src/main.rs index b56bf56e8..61afce938 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/src/session.rs b/cli/src/session.rs index 1409cd203..c56cc5690 100644 --- a/cli/src/session.rs +++ b/cli/src/session.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cli/test.sh b/cli/test.sh index 9e0617ebb..8850e226d 100755 --- a/cli/test.sh +++ b/cli/test.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright 2021 Datafuse Labs +# +# Licensed 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. + set -e CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-./target} diff --git a/core/src/client.rs b/core/src/client.rs index b69b52751..cba01ff09 100644 --- a/core/src/client.rs +++ b/core/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/src/error.rs b/core/src/error.rs index d23279c58..a5981571d 100644 --- a/core/src/error.rs +++ b/core/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/src/lib.rs b/core/src/lib.rs index 22396b53d..5bb5cda7c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/src/request.rs b/core/src/request.rs index fe140a15b..6557e72c2 100644 --- a/core/src/request.rs +++ b/core/src/request.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/src/response.rs b/core/src/response.rs index d23b84354..1716b2df5 100644 --- a/core/src/response.rs +++ b/core/src/response.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/tests/core/common/mod.rs b/core/tests/core/common/mod.rs index 6f663e582..3e236be46 100644 --- a/core/tests/core/common/mod.rs +++ b/core/tests/core/common/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/tests/core/main.rs b/core/tests/core/main.rs index 9326e0471..b27b098f2 100644 --- a/core/tests/core/main.rs +++ b/core/tests/core/main.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/core/tests/core/simple.rs b/core/tests/core/simple.rs index 0f1dfc320..aa9e6065c 100644 --- a/core/tests/core/simple.rs +++ b/core/tests/core/simple.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/conn.rs b/driver/src/conn.rs index fb681afd2..14e022dcb 100644 --- a/driver/src/conn.rs +++ b/driver/src/conn.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/error.rs b/driver/src/error.rs index 05ae8b01d..2f92ae89b 100644 --- a/driver/src/error.rs +++ b/driver/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/lib.rs b/driver/src/lib.rs index 09dfc3ef0..ee6c719a8 100644 --- a/driver/src/lib.rs +++ b/driver/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/rest_api.rs b/driver/src/rest_api.rs index 23380c928..47d1f362f 100644 --- a/driver/src/rest_api.rs +++ b/driver/src/rest_api.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/rows.rs b/driver/src/rows.rs index fb9261d83..c5e87dad4 100644 --- a/driver/src/rows.rs +++ b/driver/src/rows.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/schema.rs b/driver/src/schema.rs index 2eeec8eba..a6b225eee 100644 --- a/driver/src/schema.rs +++ b/driver/src/schema.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/src/value.rs b/driver/src/value.rs index 5ed70990c..a3bdc0b40 100644 --- a/driver/src/value.rs +++ b/driver/src/value.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/tests/driver/common/mod.rs b/driver/tests/driver/common/mod.rs index 6f663e582..3e236be46 100644 --- a/driver/tests/driver/common/mod.rs +++ b/driver/tests/driver/common/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/tests/driver/connection.rs b/driver/tests/driver/connection.rs index 489cd7744..27b8fb81b 100644 --- a/driver/tests/driver/connection.rs +++ b/driver/tests/driver/connection.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/tests/driver/main.rs b/driver/tests/driver/main.rs index 9dd5e1d89..8fcba920c 100644 --- a/driver/tests/driver/main.rs +++ b/driver/tests/driver/main.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/tests/driver/select_simple.rs b/driver/tests/driver/select_simple.rs index 4a6449246..22f69cf32 100644 --- a/driver/tests/driver/select_simple.rs +++ b/driver/tests/driver/select_simple.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/driver/tests/driver/stream_load.rs b/driver/tests/driver/stream_load.rs index 25ac7ce31..955535362 100644 --- a/driver/tests/driver/stream_load.rs +++ b/driver/tests/driver/stream_load.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Datafuse Labs. +// Copyright 2021 Datafuse Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 40960c3c536525daa575082ee417755b5390de4f Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:15:18 +0800 Subject: [PATCH 09/13] z --- licenserc.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/licenserc.toml b/licenserc.toml index 7d21e16d0..1aab0bad8 100644 --- a/licenserc.toml +++ b/licenserc.toml @@ -10,6 +10,8 @@ excludes = [ ".gitignore", ".gitattributes", ".editorconfig", + ".npmignore", + ".prettierignore", "LICENSE", "Makefile", @@ -31,6 +33,8 @@ excludes = [ "**/*.txt", # test files + "core/tests/**", + "driver/tests/**", "cli/tests/**", ] From 75c5749f9a27555f393c3fac2f171cba2e6f4e0f Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:17:57 +0800 Subject: [PATCH 10/13] z --- bindings/nodejs/generated.js | 28 ++++++++++++++-------------- bindings/nodejs/index.d.ts | 28 ++++++++++++++-------------- bindings/nodejs/scripts/header.js | 28 ++++++++++++++-------------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/bindings/nodejs/generated.js b/bindings/nodejs/generated.js index 5d3114dc9..ecf2cb1af 100644 --- a/bindings/nodejs/generated.js +++ b/bindings/nodejs/generated.js @@ -1,18 +1,18 @@ /* - * Copyright 2021 Datafuse Labs - * - * Licensed 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. - */ + * Copyright 2021 Datafuse Labs + * + * Licensed 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. + */ /* tslint:disable */ /* eslint-disable */ diff --git a/bindings/nodejs/index.d.ts b/bindings/nodejs/index.d.ts index a06522490..2c63b9d2e 100644 --- a/bindings/nodejs/index.d.ts +++ b/bindings/nodejs/index.d.ts @@ -1,18 +1,18 @@ /* - * Copyright 2021 Datafuse Labs - * - * Licensed 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. - */ + * Copyright 2021 Datafuse Labs + * + * Licensed 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. + */ /* tslint:disable */ /* eslint-disable */ diff --git a/bindings/nodejs/scripts/header.js b/bindings/nodejs/scripts/header.js index 0fd1580fd..162445109 100644 --- a/bindings/nodejs/scripts/header.js +++ b/bindings/nodejs/scripts/header.js @@ -23,20 +23,20 @@ for (path of files) { fs.writeFileSync( path, `/* - * Copyright 2021 Datafuse Labs - * - * Licensed 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. - */ + * Copyright 2021 Datafuse Labs + * + * Licensed 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. + */ ` + data ); From 904fd781cc8cce29e703cee652aedd0b19be7df8 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:18:48 +0800 Subject: [PATCH 11/13] z --- .../python/python/databend_driver/__init__.py | 16 +++++++++++++++- bindings/python/test.sh | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/bindings/python/python/databend_driver/__init__.py b/bindings/python/python/databend_driver/__init__.py index 66ffa5d7a..eb8125d91 100644 --- a/bindings/python/python/databend_driver/__init__.py +++ b/bindings/python/python/databend_driver/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2021 Datafuse Labs +# +# Licensed 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. + from ._databend_driver import * -__all__ = _databend_driver.__all__ \ No newline at end of file +__all__ = _databend_driver.__all__ diff --git a/bindings/python/test.sh b/bindings/python/test.sh index e67f97e0e..197ce428c 100755 --- a/bindings/python/test.sh +++ b/bindings/python/test.sh @@ -1,7 +1,20 @@ #!/bin/bash -set -e +# Copyright 2021 Datafuse Labs +# +# Licensed 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. +set -e python -m venv venv source venv/bin/activate @@ -9,4 +22,4 @@ pip install maturin pip install behave maturin develop -behave tests \ No newline at end of file +behave tests From f660322254c6b6910ad4b6d5c8e188b95ce7cf27 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:20:08 +0800 Subject: [PATCH 12/13] z --- bindings/python/Cargo.toml | 17 ----------------- bindings/python/pyproject.toml | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 0bf214590..ba5f63ef5 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -1,20 +1,3 @@ -# 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. - [package] name = "databend-python" publish = false diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index d7acdaab4..d5c716759 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -1,20 +1,3 @@ -# 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. - [build-system] build-backend = "maturin" requires = ["maturin>=0.14.16,<0.15"] From 44b0fbbce6632c0cfbabd760c55ac702386a078f Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 15 Jul 2023 21:21:23 +0800 Subject: [PATCH 13/13] z --- driver/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/driver/src/lib.rs b/driver/src/lib.rs index ee6c719a8..3ac8cae36 100644 --- a/driver/src/lib.rs +++ b/driver/src/lib.rs @@ -11,6 +11,7 @@ // 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. + mod conn; mod error; #[cfg(feature = "flight-sql")]