From 646d8b11b9383ce994618dc830d674b0acb1486d Mon Sep 17 00:00:00 2001 From: John Stilley Date: Sun, 1 Sep 2024 16:40:43 -0700 Subject: [PATCH 1/4] Adding license checker to CI --- .github/workflows/licensechecker.yaml | 9 +++++++++ .licenserc.json | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 .github/workflows/licensechecker.yaml create mode 100644 .licenserc.json diff --git a/.github/workflows/licensechecker.yaml b/.github/workflows/licensechecker.yaml new file mode 100644 index 00000000..abeee0e4 --- /dev/null +++ b/.github/workflows/licensechecker.yaml @@ -0,0 +1,9 @@ +name: Check License Lines +on: [push, pull_request] +jobs: + check-license-lines: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@master + - name: Check License Lines + uses: kt3k/license_checker@v1.0.6 diff --git a/.licenserc.json b/.licenserc.json new file mode 100644 index 00000000..a1038c88 --- /dev/null +++ b/.licenserc.json @@ -0,0 +1,3 @@ +{ + "**/*.py": "# Copyright " +} From e045463ce94241e87238dbf908eb70ac5270f883 Mon Sep 17 00:00:00 2001 From: John Stilley Date: Sun, 1 Sep 2024 16:43:28 -0700 Subject: [PATCH 2/4] Filling in missing copyright headers --- .github/workflows/licensechecker.yaml | 6 +++--- src/rai/rai/apps/__init__.py | 14 ++++++++++++++ src/rai/rai/cli/__init__.py | 14 ++++++++++++++ src/rai/rai/extensions/__init__.py | 14 ++++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.github/workflows/licensechecker.yaml b/.github/workflows/licensechecker.yaml index abeee0e4..c18e223b 100644 --- a/.github/workflows/licensechecker.yaml +++ b/.github/workflows/licensechecker.yaml @@ -4,6 +4,6 @@ jobs: check-license-lines: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@master - - name: Check License Lines - uses: kt3k/license_checker@v1.0.6 + - uses: actions/checkout@master + - name: Check License Lines + uses: kt3k/license_checker@v1.0.6 diff --git a/src/rai/rai/apps/__init__.py b/src/rai/rai/apps/__init__.py index e69de29b..f138f42a 100644 --- a/src/rai/rai/apps/__init__.py +++ b/src/rai/rai/apps/__init__.py @@ -0,0 +1,14 @@ +# Copyright (C) 2024 Robotec.AI +# +# 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. +# diff --git a/src/rai/rai/cli/__init__.py b/src/rai/rai/cli/__init__.py index e69de29b..f138f42a 100644 --- a/src/rai/rai/cli/__init__.py +++ b/src/rai/rai/cli/__init__.py @@ -0,0 +1,14 @@ +# Copyright (C) 2024 Robotec.AI +# +# 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. +# diff --git a/src/rai/rai/extensions/__init__.py b/src/rai/rai/extensions/__init__.py index e69de29b..f138f42a 100644 --- a/src/rai/rai/extensions/__init__.py +++ b/src/rai/rai/extensions/__init__.py @@ -0,0 +1,14 @@ +# Copyright (C) 2024 Robotec.AI +# +# 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 507197df5531bcecb38737999ab6442a65a6b9e7 Mon Sep 17 00:00:00 2001 From: John Stilley <1831479+john-science@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:33:37 -0700 Subject: [PATCH 3/4] Taking C++ improvements from adamdbrw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to @adamdbrw for the correction; I was only looking at the Python code. Co-authored-by: Adam DÄ…browski --- .licenserc.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.licenserc.json b/.licenserc.json index a1038c88..ca8a4db3 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -1,3 +1,12 @@ { - "**/*.py": "# Copyright " + "**/*.py": [ + "# Copyright ", + "#", + "# Licensed under the Apache License, Version 2.0 (the \"License\");" + ], + "**/*.{h,cpp,hpp}": [ + "// Copyright ", + "//", + "// Licensed under the Apache License, Version 2.0 (the \"License\");" + ] } From c09834eecd6d911437505532da20cc35e5f51d78 Mon Sep 17 00:00:00 2001 From: John Stilley Date: Tue, 3 Sep 2024 05:20:00 -0700 Subject: [PATCH 4/4] Fixing linting from suggestion --- .licenserc.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.licenserc.json b/.licenserc.json index ca8a4db3..519bdf2a 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -1,12 +1,12 @@ { "**/*.py": [ - "# Copyright ", - "#", - "# Licensed under the Apache License, Version 2.0 (the \"License\");" + "# Copyright ", + "#", + "# Licensed under the Apache License, Version 2.0 (the \"License\");" ], "**/*.{h,cpp,hpp}": [ - "// Copyright ", - "//", - "// Licensed under the Apache License, Version 2.0 (the \"License\");" + "// Copyright ", + "//", + "// Licensed under the Apache License, Version 2.0 (the \"License\");" ] }