From 2dbb7214ff4bb409dc7412a271ae8caa6d03749e Mon Sep 17 00:00:00 2001 From: pem70 Date: Thu, 18 Jul 2024 14:43:46 -0400 Subject: [PATCH 1/5] Update for license header Signed-off-by: pem70 --- .github/workflows/sdk-build.yml | 2 + CHANGELOG.md | 2 + scripts/license_header.py | 54 +++++++++++++++++++ src/_version.py | 11 ++++ src/core/setup.py | 11 ++++ src/core/zowe/core_for_zowe_sdk/__init__.py | 11 ++++ .../zowe/core_for_zowe_sdk/custom_warnings.py | 11 ++++ src/core/zowe/core_for_zowe_sdk/logger.py | 11 ++++ .../zowe/secrets_for_zowe_sdk/__init__.py | 11 ++++ src/setup.py | 11 ++++ src/zos_console/setup.py | 11 ++++ .../zowe/zos_console_for_zowe_sdk/__init__.py | 11 ++++ .../zowe/zos_console_for_zowe_sdk/console.py | 11 ++++ src/zos_files/setup.py | 11 ++++ .../zowe/zos_files_for_zowe_sdk/__init__.py | 11 ++++ src/zos_jobs/setup.py | 11 ++++ .../zowe/zos_jobs_for_zowe_sdk/__init__.py | 11 ++++ src/zos_tso/setup.py | 11 ++++ .../zowe/zos_tso_for_zowe_sdk/__init__.py | 11 ++++ src/zosmf/setup.py | 11 ++++ src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py | 11 ++++ src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py | 11 ++++ 22 files changed, 267 insertions(+) create mode 100644 scripts/license_header.py diff --git a/.github/workflows/sdk-build.yml b/.github/workflows/sdk-build.yml index 9bf6caac..21fcbb88 100644 --- a/.github/workflows/sdk-build.yml +++ b/.github/workflows/sdk-build.yml @@ -34,6 +34,8 @@ jobs: run: pydoclint --exclude='.*/build/.*' src - name: Lint with pylint run: pylint src --disable=all --enable=C0103 --ignore=build + - name: Check and add license headers + run: python scripts/license_header.py src - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/CHANGELOG.md b/CHANGELOG.md index ec8b9312..f33e528d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ All notable changes to the Zowe Client Python SDK will be documented in this fil - *Breaking*: Revised function names in `Logger` class and `files` class into snake_case. Supported for function case enforcer [#315] (https://github.com/zowe/zowe-client-python-sdk/issues/315) +- Added checks and auto addition for license headers on workflow. [#293] (https://github.com/zowe/zowe-client-python-sdk/issues/293) + ### Bug Fixes - Fixed a bug on `create` in `Datasets` where the target dataset gets created with a different block size when `like` is specified [#295] (https://github.com/zowe/zowe-client-python-sdk/issues/295) diff --git a/scripts/license_header.py b/scripts/license_header.py new file mode 100644 index 00000000..6d6c4604 --- /dev/null +++ b/scripts/license_header.py @@ -0,0 +1,54 @@ +import os +import sys + +# Define the license header you expect in each file +LICENSE_HEADER = '''"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +"""''' + + +def check_and_add_license_header(file_path): + with open(file_path, "r+", encoding="utf-8") as file: + content = file.read() + if LICENSE_HEADER not in content: + print(f"Adding license header to: {file_path}") + file.seek(0, 0) + file.write(LICENSE_HEADER + "\n" + content) + return False + return True + + +def main(): + if len(sys.argv) != 2: + print("Usage: python check_license_header.py ") + sys.exit(1) + + directory = sys.argv[1] + all_files_passed = True + + for root, _, files in os.walk(directory): + if "build" in root.split(os.path.sep): + continue + for file in files: + if file.endswith(".py"): + file_path = os.path.join(root, file) + if not check_and_add_license_header(file_path): + print(f"License header missing in: {file_path}") + all_files_passed = False + + if not all_files_passed: + sys.exit(1) + else: + print("All files have the correct license header.") + + +if __name__ == "__main__": + main() diff --git a/src/_version.py b/src/_version.py index aba3acc9..543b60c6 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1 +1,12 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" __version__ = "1.0.0.dev17" diff --git a/src/core/setup.py b/src/core/setup.py index 98bd524d..b92b2a5b 100644 --- a/src/core/setup.py +++ b/src/core/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import sys from setuptools import find_namespace_packages, setup diff --git a/src/core/zowe/core_for_zowe_sdk/__init__.py b/src/core/zowe/core_for_zowe_sdk/__init__.py index 55bf9068..726e0902 100644 --- a/src/core/zowe/core_for_zowe_sdk/__init__.py +++ b/src/core/zowe/core_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - Core package """ diff --git a/src/core/zowe/core_for_zowe_sdk/custom_warnings.py b/src/core/zowe/core_for_zowe_sdk/custom_warnings.py index 23b14a73..e31a5f51 100644 --- a/src/core/zowe/core_for_zowe_sdk/custom_warnings.py +++ b/src/core/zowe/core_for_zowe_sdk/custom_warnings.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """A public module for custom warnings.""" diff --git a/src/core/zowe/core_for_zowe_sdk/logger.py b/src/core/zowe/core_for_zowe_sdk/logger.py index 0cb5a804..fc1d956e 100644 --- a/src/core/zowe/core_for_zowe_sdk/logger.py +++ b/src/core/zowe/core_for_zowe_sdk/logger.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Logger module for handling application logging. diff --git a/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py b/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py index f80fb08b..57218d69 100644 --- a/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py +++ b/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - Client Secrets package """ diff --git a/src/setup.py b/src/setup.py index 32d9596d..4b0d4767 100644 --- a/src/setup.py +++ b/src/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import os.path import uuid diff --git a/src/zos_console/setup.py b/src/zos_console/setup.py index 8eb2c191..0336d0a7 100644 --- a/src/zos_console/setup.py +++ b/src/zos_console/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import sys from setuptools import find_namespace_packages, setup diff --git a/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py b/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py index 80a76493..23f4ad65 100644 --- a/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py +++ b/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - z/OS Console package """ diff --git a/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py b/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py index 4deb850c..f9d9948e 100644 --- a/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py +++ b/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """Public module for class Console.""" from typing import Optional diff --git a/src/zos_files/setup.py b/src/zos_files/setup.py index 6f1ea48d..a4cf3ea3 100644 --- a/src/zos_files/setup.py +++ b/src/zos_files/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import sys from setuptools import find_namespace_packages, setup diff --git a/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py b/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py index 1f695830..a67d9200 100644 --- a/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py +++ b/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - z/OS Files package """ diff --git a/src/zos_jobs/setup.py b/src/zos_jobs/setup.py index 72eeb803..c885b8ae 100644 --- a/src/zos_jobs/setup.py +++ b/src/zos_jobs/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import sys from setuptools import find_namespace_packages, setup diff --git a/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py b/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py index e72a812f..24324dc3 100644 --- a/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py +++ b/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - z/OS Jobs package """ diff --git a/src/zos_tso/setup.py b/src/zos_tso/setup.py index fc4ea7dc..46d96344 100644 --- a/src/zos_tso/setup.py +++ b/src/zos_tso/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import sys from setuptools import find_namespace_packages, setup diff --git a/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py b/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py index c560ceb0..f9f2e9a1 100644 --- a/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py +++ b/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - z/OS TSO package """ diff --git a/src/zosmf/setup.py b/src/zosmf/setup.py index 57d65522..644192c1 100644 --- a/src/zosmf/setup.py +++ b/src/zosmf/setup.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" import sys from setuptools import find_namespace_packages, setup diff --git a/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py b/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py index 4f058d65..211ca8eb 100644 --- a/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py +++ b/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py @@ -1,3 +1,14 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" """ Zowe Python SDK - z/OSMF package """ diff --git a/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py b/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py index ed956d20..fd88e263 100644 --- a/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py +++ b/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py @@ -7,6 +7,17 @@ SPDX-License-Identifier: EPL-2.0 +Copyright Contributors to the Zowe Project. +""" +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + Copyright Contributors to the Zowe project. """ From 4860ef2dc11693ced74f068da695868a7939b92f Mon Sep 17 00:00:00 2001 From: pem70 Date: Fri, 19 Jul 2024 10:48:11 -0400 Subject: [PATCH 2/5] Update _version.py Signed-off-by: pem70 --- src/_version.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/_version.py b/src/_version.py index 26238316..715fc168 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1 +1,12 @@ +"""Zowe Python Client SDK. + +This program and the accompanying materials are made available under the terms of the +Eclipse Public License v2.0 which accompanies this distribution, and is available at + +https://www.eclipse.org/legal/epl-v20.html + +SPDX-License-Identifier: EPL-2.0 + +Copyright Contributors to the Zowe Project. +""" __version__ = "1.0.0-dev18" From e1105154cb65314f3b54d50358667db11af38546 Mon Sep 17 00:00:00 2001 From: pem70 Date: Mon, 22 Jul 2024 14:30:52 -0400 Subject: [PATCH 3/5] Update sdk-build.yml Signed-off-by: pem70 --- .github/workflows/sdk-build.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/sdk-build.yml b/.github/workflows/sdk-build.yml index b585fcf5..895a608d 100644 --- a/.github/workflows/sdk-build.yml +++ b/.github/workflows/sdk-build.yml @@ -33,23 +33,11 @@ jobs: - name: Lint with pydoclint run: pydoclint --exclude='.*/build/.*' src - name: Lint with pylint -<<<<<<< HEAD - run: pylint src --disable=all --enable=C0103 --ignore=build - - name: Check and add license headers - run: python scripts/license_header.py src - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 ./src --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 ./src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics -======= run: | # check for Python errors pylint src --errors-only --disable=E0401,E0611 --ignore=build # check for lint pylint ./src --disable=all --enable=C0103,C0301 --ignore=build --max-line-length=127 ->>>>>>> function_case - name: Test with pytest run: | coverage run -m pytest ./tests/unit From b31ed304ec959046ff5610b52924dd30517cadb1 Mon Sep 17 00:00:00 2001 From: pem70 Date: Mon, 22 Jul 2024 15:02:20 -0400 Subject: [PATCH 4/5] Update workflow and remove duplicate headers Signed-off-by: pem70 --- .github/workflows/sdk-build.yml | 2 ++ scripts/license_header.py | 16 +++++++++------- src/core/zowe/core_for_zowe_sdk/__init__.py | 5 +---- src/core/zowe/core_for_zowe_sdk/config_file.py | 1 - .../zowe/core_for_zowe_sdk/custom_warnings.py | 1 - src/core/zowe/core_for_zowe_sdk/logger.py | 6 ------ .../zowe/zos_console_for_zowe_sdk/__init__.py | 3 --- .../zowe/zos_console_for_zowe_sdk/console.py | 1 - .../zowe/zos_files_for_zowe_sdk/__init__.py | 3 --- .../zowe/zos_jobs_for_zowe_sdk/__init__.py | 3 --- .../zowe/zos_tso_for_zowe_sdk/__init__.py | 3 --- src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py | 11 ----------- 12 files changed, 12 insertions(+), 43 deletions(-) diff --git a/.github/workflows/sdk-build.yml b/.github/workflows/sdk-build.yml index 895a608d..5c8798b6 100644 --- a/.github/workflows/sdk-build.yml +++ b/.github/workflows/sdk-build.yml @@ -38,6 +38,8 @@ jobs: pylint src --errors-only --disable=E0401,E0611 --ignore=build # check for lint pylint ./src --disable=all --enable=C0103,C0301 --ignore=build --max-line-length=127 + - name: Check license headers + run: python scripts/license_header.py src - name: Test with pytest run: | coverage run -m pytest ./tests/unit diff --git a/scripts/license_header.py b/scripts/license_header.py index 6d6c4604..be195de6 100644 --- a/scripts/license_header.py +++ b/scripts/license_header.py @@ -15,23 +15,25 @@ """''' -def check_and_add_license_header(file_path): +def check_and_add_license_header(file_path, write_header): with open(file_path, "r+", encoding="utf-8") as file: content = file.read() if LICENSE_HEADER not in content: - print(f"Adding license header to: {file_path}") - file.seek(0, 0) - file.write(LICENSE_HEADER + "\n" + content) + if write_header: + print(f"Adding license header to: {file_path}") + file.seek(0, 0) + file.write(LICENSE_HEADER + "\n" + content) return False return True def main(): - if len(sys.argv) != 2: - print("Usage: python check_license_header.py ") + if len(sys.argv) > 3: + print("Usage: python check_license_header.py optional(W)") sys.exit(1) directory = sys.argv[1] + write_header = True if len(sys.argv) == 3 and sys.argv[2] == "W" else False all_files_passed = True for root, _, files in os.walk(directory): @@ -40,7 +42,7 @@ def main(): for file in files: if file.endswith(".py"): file_path = os.path.join(root, file) - if not check_and_add_license_header(file_path): + if not check_and_add_license_header(file_path, write_header): print(f"License header missing in: {file_path}") all_files_passed = False diff --git a/src/core/zowe/core_for_zowe_sdk/__init__.py b/src/core/zowe/core_for_zowe_sdk/__init__.py index 726e0902..798c95d9 100644 --- a/src/core/zowe/core_for_zowe_sdk/__init__.py +++ b/src/core/zowe/core_for_zowe_sdk/__init__.py @@ -9,19 +9,16 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - Core package -""" from .config_file import ConfigFile from .connection import ApiConnection from .constants import constants from .credential_manager import CredentialManager from .exceptions import * +from .logger import Log from .profile_manager import ProfileManager from .request_handler import RequestHandler from .sdk_api import SdkApi from .session import Session from .session_constants import * from .zosmf_profile import ZosmfProfile -from .logger import Log \ No newline at end of file diff --git a/src/core/zowe/core_for_zowe_sdk/config_file.py b/src/core/zowe/core_for_zowe_sdk/config_file.py index bd12a91b..62e4ca18 100644 --- a/src/core/zowe/core_for_zowe_sdk/config_file.py +++ b/src/core/zowe/core_for_zowe_sdk/config_file.py @@ -9,7 +9,6 @@ Copyright Contributors to the Zowe Project. """ - import json import os.path import re diff --git a/src/core/zowe/core_for_zowe_sdk/custom_warnings.py b/src/core/zowe/core_for_zowe_sdk/custom_warnings.py index e31a5f51..12f7f567 100644 --- a/src/core/zowe/core_for_zowe_sdk/custom_warnings.py +++ b/src/core/zowe/core_for_zowe_sdk/custom_warnings.py @@ -9,7 +9,6 @@ Copyright Contributors to the Zowe Project. """ -"""A public module for custom warnings.""" class ProfileNotFoundWarning(Warning): diff --git a/src/core/zowe/core_for_zowe_sdk/logger.py b/src/core/zowe/core_for_zowe_sdk/logger.py index 4004b5cf..c3f2cd7c 100644 --- a/src/core/zowe/core_for_zowe_sdk/logger.py +++ b/src/core/zowe/core_for_zowe_sdk/logger.py @@ -9,12 +9,6 @@ Copyright Contributors to the Zowe Project. """ -""" -Logger module for handling application logging. - -This module provides the `Log` class which allows for registering, -setting levels, opening, and closing loggers. -""" import logging import os diff --git a/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py b/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py index 23f4ad65..e119b351 100644 --- a/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py +++ b/src/zos_console/zowe/zos_console_for_zowe_sdk/__init__.py @@ -9,8 +9,5 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - z/OS Console package -""" from .console import Console diff --git a/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py b/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py index f9d9948e..9865cd8c 100644 --- a/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py +++ b/src/zos_console/zowe/zos_console_for_zowe_sdk/console.py @@ -9,7 +9,6 @@ Copyright Contributors to the Zowe Project. """ -"""Public module for class Console.""" from typing import Optional diff --git a/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py b/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py index a67d9200..c04223ac 100644 --- a/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py +++ b/src/zos_files/zowe/zos_files_for_zowe_sdk/__init__.py @@ -9,9 +9,6 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - z/OS Files package -""" from . import constants, exceptions from .datasets import DatasetOption, Datasets diff --git a/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py b/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py index 24324dc3..102adc80 100644 --- a/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py +++ b/src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/__init__.py @@ -9,8 +9,5 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - z/OS Jobs package -""" from .jobs import Jobs diff --git a/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py b/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py index f9f2e9a1..d9e5e2e5 100644 --- a/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py +++ b/src/zos_tso/zowe/zos_tso_for_zowe_sdk/__init__.py @@ -9,8 +9,5 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - z/OS TSO package -""" from .tso import Tso diff --git a/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py b/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py index fd88e263..94a61389 100644 --- a/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py +++ b/src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py @@ -9,17 +9,6 @@ Copyright Contributors to the Zowe Project. """ -"""Zowe Python Client SDK. - -This program and the accompanying materials are made available under the terms of the -Eclipse Public License v2.0 which accompanies this distribution, and is available at - -https://www.eclipse.org/legal/epl-v20.html - -SPDX-License-Identifier: EPL-2.0 - -Copyright Contributors to the Zowe project. -""" from zowe.core_for_zowe_sdk import SdkApi From 70270f2cfb8254e25c1969d0fc50d43242e7a7b8 Mon Sep 17 00:00:00 2001 From: pem70 Date: Tue, 23 Jul 2024 15:09:55 -0400 Subject: [PATCH 5/5] Remove duplicate headers Signed-off-by: pem70 --- src/secrets/zowe/secrets_for_zowe_sdk/__init__.py | 3 --- src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py b/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py index 57218d69..823a1512 100644 --- a/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py +++ b/src/secrets/zowe/secrets_for_zowe_sdk/__init__.py @@ -9,8 +9,5 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - Client Secrets package -""" from . import keyring diff --git a/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py b/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py index 211ca8eb..9599fdb4 100644 --- a/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py +++ b/src/zosmf/zowe/zosmf_for_zowe_sdk/__init__.py @@ -9,8 +9,5 @@ Copyright Contributors to the Zowe Project. """ -""" -Zowe Python SDK - z/OSMF package -""" from .zosmf import Zosmf