# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribution of this material and related documentation
# without an express license agreement from NVIDIA CORPORATION or
# its affiliates is strictly prohibited.

MFT_VERSION_STR="mft 4.34.0-145"
TOOLS_GIT_SHA="da07564cc"

# TODO once dust settles down, make it obey PEP 8
#   C0103: Function name "GetVersionString" doesn't conform to snake_case naming style (invalid-name)
#   C0103: Argument name "execName" doesn't conform to snake_case naming style (invalid-name)
#   C0103: Argument name "toolVersion" doesn't conform to snake_case naming style (invalid-name)
#   C0116: Missing function or method docstring (missing-function-docstring)
def GetVersionString(execName, toolVersion = None):
    res = ""
    if toolVersion in { None, "" }:
        res = execName + ", "
    else:
        res = "%s %s, " % (execName,toolVersion)

    res += "%s, Git SHA Hash: %s" % (MFT_VERSION_STR, TOOLS_GIT_SHA)
    return res

# TODO once dust settles down, make it obey PEP 8
#   C0103: Function name "GetVersionString" doesn't conform to snake_case naming style (invalid-name)
#   C0103: Argument name "execName" doesn't conform to snake_case naming style (invalid-name)
#   C0103: Argument name "toolVersion" doesn't conform to snake_case naming style (invalid-name)
#   C0116: Missing function or method docstring (missing-function-docstring)
def PrintVersionString(execName, toolVersion = None):
    print (GetVersionString(execName, toolVersion))

# TODO once dust settles down, make it obey PEP 8
#   C0103: Constant name "get_version_string" doesn't conform to UPPER_CASE naming style (invalid-name)
#   C0103: Constant name "print_version_string" doesn't conform to UPPER_CASE naming style (invalid-name)
get_version_string = GetVersionString
print_version_string = PrintVersionString
