From 929f84ca6fa6d282ff6e76198d6d843498d6e75d Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 24 Jan 2024 15:31:00 -0500 Subject: [PATCH] chore: updates source file header and adds corresponding documentation (#154) * chore: removes shebangs from files with no main function Standardize the inclusion of shebang to be more explicit. They are only needed on files that will be executed directly. Signed-off-by: Jennifer Power * chore: updates licensing terms in files to SPDX identifier Using the longer format to specifiy licensing terms contributes to larger diff and overall makes the core logic less readble. Switching to SPDX Identifier makes this more concise and easy to update. Signed-off-by: Jennifer Power * docs: updates CONTRIBUTING.md to include guidance on license text Signed-off-by: Jennifer Power --------- Signed-off-by: Jennifer Power --- CONTRIBUTING.md | 9 +++++++++ scripts/update_action_readmes.py | 16 ++-------------- tests/__init__.py | 16 ++-------------- tests/conftest.py | 18 +++--------------- tests/e2e/test_e2e_compdef.py | 16 ++-------------- tests/e2e/test_e2e_ssp.py | 18 +++--------------- tests/testutils.py | 18 +++--------------- tests/trestlebot/__init__.py | 16 ++-------------- tests/trestlebot/entrypoints/__init__.py | 16 ++-------------- tests/trestlebot/entrypoints/test_autosync.py | 18 +++--------------- .../entrypoints/test_entrypoint_base.py | 18 +++--------------- .../entrypoints/test_sync_upstreams.py | 18 +++--------------- tests/trestlebot/tasks/__init__.py | 16 ++-------------- tests/trestlebot/tasks/authored/__init__.py | 16 ++-------------- .../trestlebot/tasks/authored/test_compdef.py | 18 +++--------------- .../trestlebot/tasks/authored/test_profile.py | 18 +++--------------- tests/trestlebot/tasks/authored/test_ssp.py | 18 +++--------------- tests/trestlebot/tasks/authored/test_types.py | 18 +++--------------- tests/trestlebot/tasks/test_assemble_task.py | 18 +++--------------- tests/trestlebot/tasks/test_base_task.py | 16 ++-------------- tests/trestlebot/tasks/test_regenerate_task.py | 18 +++--------------- .../tasks/test_rule_transform_task.py | 18 +++--------------- .../tasks/test_sync_upstream_task.py | 18 +++--------------- tests/trestlebot/test_bot.py | 18 +++--------------- tests/trestlebot/test_github.py | 18 +++--------------- tests/trestlebot/test_gitlab.py | 18 +++--------------- tests/trestlebot/transformers/__init__.py | 16 ++-------------- .../transformers/test_csv_transformer.py | 18 +++--------------- .../transformers/test_validations.py | 18 +++--------------- .../transformers/test_yaml_transformer.py | 18 +++--------------- tests/workflows/__init__.py | 16 ++-------------- .../workflows/test_rules_transform_workflow.py | 18 +++--------------- trestlebot/__init__.py | 16 ++-------------- trestlebot/__main__.py | 16 ++-------------- trestlebot/bot.py | 18 +++--------------- trestlebot/const.py | 18 +++--------------- trestlebot/entrypoints/__init__.py | 16 ++-------------- trestlebot/entrypoints/autosync.py | 15 ++------------- trestlebot/entrypoints/create_cd.py | 16 +++------------- trestlebot/entrypoints/entrypoint_base.py | 17 ++--------------- trestlebot/entrypoints/log.py | 18 +++--------------- trestlebot/entrypoints/rule_transform.py | 16 +++------------- trestlebot/entrypoints/sync_upstreams.py | 16 +++------------- trestlebot/github.py | 18 +++--------------- trestlebot/gitlab.py | 18 +++--------------- trestlebot/provider.py | 18 +++--------------- trestlebot/tasks/__init__.py | 16 ++-------------- trestlebot/tasks/assemble_task.py | 16 ++-------------- trestlebot/tasks/authored/__init__.py | 16 ++-------------- trestlebot/tasks/authored/base_authored.py | 18 +++--------------- trestlebot/tasks/authored/catalog.py | 16 ++-------------- trestlebot/tasks/authored/compdef.py | 18 +++--------------- trestlebot/tasks/authored/profile.py | 18 +++--------------- trestlebot/tasks/authored/ssp.py | 18 +++--------------- trestlebot/tasks/authored/types.py | 16 ++-------------- trestlebot/tasks/base_task.py | 18 +++--------------- trestlebot/tasks/regenerate_task.py | 16 ++-------------- trestlebot/tasks/rule_transform_task.py | 18 +++--------------- trestlebot/tasks/sync_upstreams_task.py | 18 +++--------------- trestlebot/transformers/__init__.py | 16 ++-------------- trestlebot/transformers/base_transformer.py | 18 +++--------------- trestlebot/transformers/csv_transformer.py | 18 +++--------------- trestlebot/transformers/trestle_rule.py | 18 +++--------------- trestlebot/transformers/validations.py | 18 +++--------------- trestlebot/transformers/yaml_transformer.py | 18 +++--------------- 65 files changed, 179 insertions(+), 932 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39e66a35..84e942ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,6 +17,7 @@ Before you start contributing, please take a moment to read through the guide be - [Code structure](#code-structure) - [Documentation](#documentation) - [Update the `actions` files](#update-the-actions-files) + - [License Text in Files](#license-text-in-files) - [Tools](#tools) - [Format and Styling](#format-and-styling) - [Type Hints and Static Type Checking](#type-hints-and-static-type-checking) @@ -86,6 +87,14 @@ Each `README.md` under the `actions` directory have an Actions Inputs and Action make update-action-readmes ``` +### License Text in Files + +Please use the SPDX license identifier in all source files. + +``` +# SPDX-License-Identifier: Apache-2.0 +``` + ### Tools #### Format and Styling diff --git a/scripts/update_action_readmes.py b/scripts/update_action_readmes.py index ff6cbf54..71ca23f0 100755 --- a/scripts/update_action_readmes.py +++ b/scripts/update_action_readmes.py @@ -1,19 +1,7 @@ #!/usr/bin/python -# Copyright 2023 Red Hat, Inc. -# -# 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. - +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. """ Find every action.yml file in the repo and README.md next to it diff --git a/tests/__init__.py b/tests/__init__.py index 74f70778..a7ca3d71 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test package.""" diff --git a/tests/conftest.py b/tests/conftest.py index a7b88a6b..9736397f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Common test fixtures.""" diff --git a/tests/e2e/test_e2e_compdef.py b/tests/e2e/test_e2e_compdef.py index cc9d84a9..45fc88ff 100644 --- a/tests/e2e/test_e2e_compdef.py +++ b/tests/e2e/test_e2e_compdef.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """E2E tests for commands for component definition authoring.""" diff --git a/tests/e2e/test_e2e_ssp.py b/tests/e2e/test_e2e_ssp.py index 658fec34..a28d4347 100644 --- a/tests/e2e/test_e2e_ssp.py +++ b/tests/e2e/test_e2e_ssp.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """ E2E tests for SSP creation and autosync workflow. diff --git a/tests/testutils.py b/tests/testutils.py index b49c6c5b..0bcafe8d 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Helper functions for unit test setup and teardown.""" diff --git a/tests/trestlebot/__init__.py b/tests/trestlebot/__init__.py index d0f44b5c..d031fd31 100644 --- a/tests/trestlebot/__init__.py +++ b/tests/trestlebot/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test package for trestlebot top-level logic.""" diff --git a/tests/trestlebot/entrypoints/__init__.py b/tests/trestlebot/entrypoints/__init__.py index 104f95c4..a9c9939a 100644 --- a/tests/trestlebot/entrypoints/__init__.py +++ b/tests/trestlebot/entrypoints/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test package for entrypoints.""" diff --git a/tests/trestlebot/entrypoints/test_autosync.py b/tests/trestlebot/entrypoints/test_autosync.py index 736e90a3..911cab8e 100644 --- a/tests/trestlebot/entrypoints/test_autosync.py +++ b/tests/trestlebot/entrypoints/test_autosync.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Autosync CLI""" diff --git a/tests/trestlebot/entrypoints/test_entrypoint_base.py b/tests/trestlebot/entrypoints/test_entrypoint_base.py index 51bdf146..87618c42 100644 --- a/tests/trestlebot/entrypoints/test_entrypoint_base.py +++ b/tests/trestlebot/entrypoints/test_entrypoint_base.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Entrypoint Base""" diff --git a/tests/trestlebot/entrypoints/test_sync_upstreams.py b/tests/trestlebot/entrypoints/test_sync_upstreams.py index e1802de9..67271172 100644 --- a/tests/trestlebot/entrypoints/test_sync_upstreams.py +++ b/tests/trestlebot/entrypoints/test_sync_upstreams.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2024 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024 Red Hat, Inc. + """Test for Sync Upstreams CLI""" diff --git a/tests/trestlebot/tasks/__init__.py b/tests/trestlebot/tasks/__init__.py index 5f0c523a..1da3745d 100644 --- a/tests/trestlebot/tasks/__init__.py +++ b/tests/trestlebot/tasks/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test tasks package.""" diff --git a/tests/trestlebot/tasks/authored/__init__.py b/tests/trestlebot/tasks/authored/__init__.py index 1f6d92c3..6446f18a 100644 --- a/tests/trestlebot/tasks/authored/__init__.py +++ b/tests/trestlebot/tasks/authored/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test authored package.""" diff --git a/tests/trestlebot/tasks/authored/test_compdef.py b/tests/trestlebot/tasks/authored/test_compdef.py index e90de24d..3f63b076 100644 --- a/tests/trestlebot/tasks/authored/test_compdef.py +++ b/tests/trestlebot/tasks/authored/test_compdef.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Trestle Bot Authored Compdef.""" diff --git a/tests/trestlebot/tasks/authored/test_profile.py b/tests/trestlebot/tasks/authored/test_profile.py index 73521b94..b96b4aff 100644 --- a/tests/trestlebot/tasks/authored/test_profile.py +++ b/tests/trestlebot/tasks/authored/test_profile.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Trestle Bot Authored Profile.""" diff --git a/tests/trestlebot/tasks/authored/test_ssp.py b/tests/trestlebot/tasks/authored/test_ssp.py index b8b1d582..d07cd4ac 100644 --- a/tests/trestlebot/tasks/authored/test_ssp.py +++ b/tests/trestlebot/tasks/authored/test_ssp.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Trestle Bot Authored SSP.""" diff --git a/tests/trestlebot/tasks/authored/test_types.py b/tests/trestlebot/tasks/authored/test_types.py index 5068a452..0c0888cd 100644 --- a/tests/trestlebot/tasks/authored/test_types.py +++ b/tests/trestlebot/tasks/authored/test_types.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test author types for Trestlebot""" diff --git a/tests/trestlebot/tasks/test_assemble_task.py b/tests/trestlebot/tasks/test_assemble_task.py index 5e3a19c7..eb0d46da 100644 --- a/tests/trestlebot/tasks/test_assemble_task.py +++ b/tests/trestlebot/tasks/test_assemble_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Trestle Bot assemble task""" diff --git a/tests/trestlebot/tasks/test_base_task.py b/tests/trestlebot/tasks/test_base_task.py index 67462786..16b22793 100644 --- a/tests/trestlebot/tasks/test_base_task.py +++ b/tests/trestlebot/tasks/test_base_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test workspace filtering logic.""" diff --git a/tests/trestlebot/tasks/test_regenerate_task.py b/tests/trestlebot/tasks/test_regenerate_task.py index f697338f..7977d33b 100644 --- a/tests/trestlebot/tasks/test_regenerate_task.py +++ b/tests/trestlebot/tasks/test_regenerate_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Trestle Bot regenerate task""" diff --git a/tests/trestlebot/tasks/test_rule_transform_task.py b/tests/trestlebot/tasks/test_rule_transform_task.py index 0ea23344..d2a262ec 100644 --- a/tests/trestlebot/tasks/test_rule_transform_task.py +++ b/tests/trestlebot/tasks/test_rule_transform_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Trestle Bot rule transform task.""" diff --git a/tests/trestlebot/tasks/test_sync_upstream_task.py b/tests/trestlebot/tasks/test_sync_upstream_task.py index 32dd2e16..70a5cb8a 100644 --- a/tests/trestlebot/tasks/test_sync_upstream_task.py +++ b/tests/trestlebot/tasks/test_sync_upstream_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2024 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024 Red Hat, Inc. + """Test for Trestle Bot sync upstreams task""" diff --git a/tests/trestlebot/test_bot.py b/tests/trestlebot/test_bot.py index c0489064..9c59a84f 100644 --- a/tests/trestlebot/test_bot.py +++ b/tests/trestlebot/test_bot.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for top-level Trestle Bot logic.""" diff --git a/tests/trestlebot/test_github.py b/tests/trestlebot/test_github.py index 78b6d21c..36536864 100644 --- a/tests/trestlebot/test_github.py +++ b/tests/trestlebot/test_github.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for GitHub provider logic""" diff --git a/tests/trestlebot/test_gitlab.py b/tests/trestlebot/test_gitlab.py index 57e81110..f6267b58 100644 --- a/tests/trestlebot/test_gitlab.py +++ b/tests/trestlebot/test_gitlab.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for GitLab provider logic""" diff --git a/tests/trestlebot/transformers/__init__.py b/tests/trestlebot/transformers/__init__.py index 3a9f81ee..75cb9c62 100644 --- a/tests/trestlebot/transformers/__init__.py +++ b/tests/trestlebot/transformers/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Test transformers package.""" diff --git a/tests/trestlebot/transformers/test_csv_transformer.py b/tests/trestlebot/transformers/test_csv_transformer.py index 61f617eb..133fd49d 100644 --- a/tests/trestlebot/transformers/test_csv_transformer.py +++ b/tests/trestlebot/transformers/test_csv_transformer.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for CSV Transformer.""" diff --git a/tests/trestlebot/transformers/test_validations.py b/tests/trestlebot/transformers/test_validations.py index 1362a682..83eef03d 100644 --- a/tests/trestlebot/transformers/test_validations.py +++ b/tests/trestlebot/transformers/test_validations.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for Validations.""" from typing import Any, Dict diff --git a/tests/trestlebot/transformers/test_yaml_transformer.py b/tests/trestlebot/transformers/test_yaml_transformer.py index 71a5c645..d8bd6b68 100644 --- a/tests/trestlebot/transformers/test_yaml_transformer.py +++ b/tests/trestlebot/transformers/test_yaml_transformer.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test for YAML Transformer.""" diff --git a/tests/workflows/__init__.py b/tests/workflows/__init__.py index 37bacefe..493ba222 100644 --- a/tests/workflows/__init__.py +++ b/tests/workflows/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Tests that validate workflow outcomes by model type.""" diff --git a/tests/workflows/test_rules_transform_workflow.py b/tests/workflows/test_rules_transform_workflow.py index 470396ff..a850256b 100644 --- a/tests/workflows/test_rules_transform_workflow.py +++ b/tests/workflows/test_rules_transform_workflow.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Test the rules transformation workflow.""" diff --git a/trestlebot/__init__.py b/trestlebot/__init__.py index 27164e59..9319638b 100644 --- a/trestlebot/__init__.py +++ b/trestlebot/__init__.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """ trestlebot - A python library and command line utility for that performs opinionated actions using the `compliance-trestle` (https://ibm.github.io/compliance-trestle/) library to manage content diff --git a/trestlebot/__main__.py b/trestlebot/__main__.py index a8e9c8d2..5a11fc15 100644 --- a/trestlebot/__main__.py +++ b/trestlebot/__main__.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. # Default entrypoint for trestlebot is autosync mode when run with python -m trestlebot diff --git a/trestlebot/bot.py b/trestlebot/bot.py index bd5884c0..0ea6a84c 100644 --- a/trestlebot/bot.py +++ b/trestlebot/bot.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """This module implements functions for the Trestle Bot.""" diff --git a/trestlebot/const.py b/trestlebot/const.py index 7219d566..66fcb939 100644 --- a/trestlebot/const.py +++ b/trestlebot/const.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Global constants""" diff --git a/trestlebot/entrypoints/__init__.py b/trestlebot/entrypoints/__init__.py index c3788c1c..d728ea6c 100644 --- a/trestlebot/entrypoints/__init__.py +++ b/trestlebot/entrypoints/__init__.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """ A collection of entrypoints for Trestlebot. """ diff --git a/trestlebot/entrypoints/autosync.py b/trestlebot/entrypoints/autosync.py index 81b486bf..eded0854 100644 --- a/trestlebot/entrypoints/autosync.py +++ b/trestlebot/entrypoints/autosync.py @@ -1,18 +1,7 @@ #!/usr/bin/python -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. """ diff --git a/trestlebot/entrypoints/create_cd.py b/trestlebot/entrypoints/create_cd.py index e1eed527..e45dee70 100644 --- a/trestlebot/entrypoints/create_cd.py +++ b/trestlebot/entrypoints/create_cd.py @@ -1,18 +1,8 @@ #!/usr/bin/python -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """ Entrypoint for component definition bootstrapping. diff --git a/trestlebot/entrypoints/entrypoint_base.py b/trestlebot/entrypoints/entrypoint_base.py index e6a36c9f..1a54be83 100644 --- a/trestlebot/entrypoints/entrypoint_base.py +++ b/trestlebot/entrypoints/entrypoint_base.py @@ -1,18 +1,5 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. """ diff --git a/trestlebot/entrypoints/log.py b/trestlebot/entrypoints/log.py index e5e11da0..3503c1ba 100644 --- a/trestlebot/entrypoints/log.py +++ b/trestlebot/entrypoints/log.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Configure logger for trestlebot and trestle.""" diff --git a/trestlebot/entrypoints/rule_transform.py b/trestlebot/entrypoints/rule_transform.py index d2f420ac..53cf30b5 100644 --- a/trestlebot/entrypoints/rule_transform.py +++ b/trestlebot/entrypoints/rule_transform.py @@ -1,16 +1,6 @@ -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Entrypoint for component definition rules transformation.""" diff --git a/trestlebot/entrypoints/sync_upstreams.py b/trestlebot/entrypoints/sync_upstreams.py index c5d0394c..ff77ea8c 100644 --- a/trestlebot/entrypoints/sync_upstreams.py +++ b/trestlebot/entrypoints/sync_upstreams.py @@ -1,18 +1,8 @@ #!/usr/bin/python -# Copyright 2024 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024 Red Hat, Inc. + """ Entrypoint for synchronizing content from upstreams git sources. diff --git a/trestlebot/github.py b/trestlebot/github.py index 03f06f93..66c760d5 100644 --- a/trestlebot/github.py +++ b/trestlebot/github.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """GitHub related functions for the Trestle Bot.""" diff --git a/trestlebot/gitlab.py b/trestlebot/gitlab.py index 0fcc905e..65a8c326 100644 --- a/trestlebot/gitlab.py +++ b/trestlebot/gitlab.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """GitLab related functions for the Trestle Bot.""" diff --git a/trestlebot/provider.py b/trestlebot/provider.py index 040626c5..7fdef153 100644 --- a/trestlebot/provider.py +++ b/trestlebot/provider.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Base Git Provider class for the Trestle Bot.""" diff --git a/trestlebot/tasks/__init__.py b/trestlebot/tasks/__init__.py index 850ce54f..8c63a0d0 100644 --- a/trestlebot/tasks/__init__.py +++ b/trestlebot/tasks/__init__.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """ Trestlebot tasks module. diff --git a/trestlebot/tasks/assemble_task.py b/trestlebot/tasks/assemble_task.py index aed2b7fe..fca1f915 100644 --- a/trestlebot/tasks/assemble_task.py +++ b/trestlebot/tasks/assemble_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Trestle Bot Assembly Tasks""" diff --git a/trestlebot/tasks/authored/__init__.py b/trestlebot/tasks/authored/__init__.py index 68615dad..6a0efbdb 100644 --- a/trestlebot/tasks/authored/__init__.py +++ b/trestlebot/tasks/authored/__init__.py @@ -1,16 +1,4 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Tasks for single instances of an authored OSCAL model.""" diff --git a/trestlebot/tasks/authored/base_authored.py b/trestlebot/tasks/authored/base_authored.py index 9fdbf51a..75eb88d0 100644 --- a/trestlebot/tasks/authored/base_authored.py +++ b/trestlebot/tasks/authored/base_authored.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Bot base authored object""" diff --git a/trestlebot/tasks/authored/catalog.py b/trestlebot/tasks/authored/catalog.py index 4a3b5bc5..cd4811df 100644 --- a/trestlebot/tasks/authored/catalog.py +++ b/trestlebot/tasks/authored/catalog.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Trestle Bot functions for catalog authoring""" diff --git a/trestlebot/tasks/authored/compdef.py b/trestlebot/tasks/authored/compdef.py index 07dee5d8..66c28af3 100644 --- a/trestlebot/tasks/authored/compdef.py +++ b/trestlebot/tasks/authored/compdef.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Bot functions for component definition authoring""" diff --git a/trestlebot/tasks/authored/profile.py b/trestlebot/tasks/authored/profile.py index 637a7efb..f4499663 100644 --- a/trestlebot/tasks/authored/profile.py +++ b/trestlebot/tasks/authored/profile.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Bot functions for profile authoring""" diff --git a/trestlebot/tasks/authored/ssp.py b/trestlebot/tasks/authored/ssp.py index 0f052d7b..c263120d 100644 --- a/trestlebot/tasks/authored/ssp.py +++ b/trestlebot/tasks/authored/ssp.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Bot functions for SSP authoring""" diff --git a/trestlebot/tasks/authored/types.py b/trestlebot/tasks/authored/types.py index e38df2df..2fc9a975 100644 --- a/trestlebot/tasks/authored/types.py +++ b/trestlebot/tasks/authored/types.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Trestle Bot authoring type information""" diff --git a/trestlebot/tasks/base_task.py b/trestlebot/tasks/base_task.py index edbb1057..0e886982 100644 --- a/trestlebot/tasks/base_task.py +++ b/trestlebot/tasks/base_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Bot base task for extensible bot pre-tasks""" diff --git a/trestlebot/tasks/regenerate_task.py b/trestlebot/tasks/regenerate_task.py index b6b6d75f..8b05cb36 100644 --- a/trestlebot/tasks/regenerate_task.py +++ b/trestlebot/tasks/regenerate_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """Trestle Bot Regenerate Tasks""" diff --git a/trestlebot/tasks/rule_transform_task.py b/trestlebot/tasks/rule_transform_task.py index f416d87e..a69663a6 100644 --- a/trestlebot/tasks/rule_transform_task.py +++ b/trestlebot/tasks/rule_transform_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Bot Rule Transform Tasks""" diff --git a/trestlebot/tasks/sync_upstreams_task.py b/trestlebot/tasks/sync_upstreams_task.py index 35a2ca7b..0464123e 100644 --- a/trestlebot/tasks/sync_upstreams_task.py +++ b/trestlebot/tasks/sync_upstreams_task.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2024 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024 Red Hat, Inc. + """Trestle Bot Sync Upstreams Tasks""" diff --git a/trestlebot/transformers/__init__.py b/trestlebot/transformers/__init__.py index d160aa73..3f3bec18 100644 --- a/trestlebot/transformers/__init__.py +++ b/trestlebot/transformers/__init__.py @@ -1,18 +1,6 @@ -#!/usr/bin/python +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. -# Copyright 2023 Red Hat, Inc. -# -# 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. """ Trestlebot transformers. diff --git a/trestlebot/transformers/base_transformer.py b/trestlebot/transformers/base_transformer.py index 4e3dbc0d..726ec275 100644 --- a/trestlebot/transformers/base_transformer.py +++ b/trestlebot/transformers/base_transformer.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Base transformer for rules.""" diff --git a/trestlebot/transformers/csv_transformer.py b/trestlebot/transformers/csv_transformer.py index 5fd004db..e2e647a8 100644 --- a/trestlebot/transformers/csv_transformer.py +++ b/trestlebot/transformers/csv_transformer.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """CSV Transformer for rule authoring.""" diff --git a/trestlebot/transformers/trestle_rule.py b/trestlebot/transformers/trestle_rule.py index ae30c605..645e35d9 100644 --- a/trestlebot/transformers/trestle_rule.py +++ b/trestlebot/transformers/trestle_rule.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """Trestle Rule class with pydantic.""" diff --git a/trestlebot/transformers/validations.py b/trestlebot/transformers/validations.py index c475a4a2..6d45ec02 100644 --- a/trestlebot/transformers/validations.py +++ b/trestlebot/transformers/validations.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """ Trestle Validation for rule authoring. diff --git a/trestlebot/transformers/yaml_transformer.py b/trestlebot/transformers/yaml_transformer.py index 58568f86..9fd9be49 100644 --- a/trestlebot/transformers/yaml_transformer.py +++ b/trestlebot/transformers/yaml_transformer.py @@ -1,18 +1,6 @@ -#!/usr/bin/python - -# Copyright 2023 Red Hat, Inc. -# -# 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 Red Hat, Inc. + """YAML transformer for rule authoring.""" import logging