build

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
It has been decided we are not doing it for now. will be asked to close.

It has been decided we are not doing it for now.
will be asked to close.

this CR is to old and obsolete.

this CR is to old and obsolete.

SCRIPTS-DEN-15774_UI MS S100 Alarmmapping
SCRIPTS-DEN-15774_UI MS S100 Alarmmapping
SCRIPTS-DEN-15833_UI VD S101 (Alarm List Unique ID) - [ * READY * ]
SCRIPTS-DEN-15833_UI VD S101 (Alarm List Unique ID) - [ * READY * ]
SCRIPTS-DEN-2793_Addcommonrepositorytotheuiprojectandrefactorcurrentcodes
SCRIPTS-DEN-2793_Addcommonrepositorytotheuiprojectandrefactorcurrentcodes
Added a line to convert float to integer in the checking for coverage results

Added copying the common repository in the local directory

Added the project setup script

Added checks for the coverage and unit tests

Added support scripts to the script

Removed the commented code

Added export the build variables

Updated the code

Added a function from support scripts to generate the code reivew script

Added a function from support scripts to get the build number variables

Added set build variables function

Added support scripts into the build script

RESOLVED

RESOLVED

Hey Peter, Thanks for the comments and all the testing . This function doesn't mean to be used the way you tested it. But anyway I came up with a better solution. def partition(vString, vPart, vRig...

Hey Peter,
Thanks for the comments and all the testing .
This function doesn't mean to be used the way you tested it.
But anyway I came up with a better solution.

def partition(vString, vPart, vRightDirection=True):
    return [vString[i: i + vPart] for i in range(0, len(vString), vPart)][::-1 if vRightDirection else 1]

Actually my first thought was not correct on how this portion of the code should work.

def partition_orig(vString, vPart, vRightDirection = True): if vRightDirection: list = [vString[i - vPart : i] for i in range(len(vString), 0, -vPart)] else: list = [vStrin...

def partition_orig(vString, vPart, vRightDirection = True):
    if vRightDirection:
        list = [vString[i - vPart : i] for i in range(len(vString), 0, -vPart)]
    else:
        list = [vString[i : i + vPart] for i in range(0, len(vString), vPart)]
    return list


def partition_2(vString, vPart, vRightDirection = True):
    if vRightDirection:
        vString = vString[::-1]
    return [vString[i : i + vPart][::-1] for i in range(0, len(vString), vPart)]

print(partition_orig("TESTING123", 3))
print(partition_2("TESTING123", 3))

                  


Outputs:

['123', 'ING', 'EST', '']
['123', 'ING', 'EST', 'T']


whereas

def partition_2(vString, vPart, vRightDirection = True):
    if vRightDirection:
        vString = vString[::-1]
    return [vString[i : i + vPart] for i in range(0, len(vString), vPart)]


outputs

['321', 'GNI', 'TSE', 'T']


I think you're saying you want to do the second one right? I think that would be better too!

Edit: Also I don't think you need the mString because in python immutable types (e.g. string, number, tuple) behave like call by value

I came out with the solution below : def partition1(vString, vPart, vRightDirection=True): mString = vString if vRightDirection: mString = vString[::-1] else: mString = vString list = [mString[i: ...

I came out with the solution below :

def partition1(vString, vPart, vRightDirection=True):
mString = vString
if vRightDirection:
mString = vString[::-1]
else:
mString = vString
list = [mString[i: i + vPart] for i in range(0, len(mString), vPart)]
return list

if _name_ == "_main_":
vString = "TESTING"
vPart = 3

list = partition1(vString, vPart, True)
print(list)


list = partition1(vString, vPart, False)
print(list)

// ----- Output ----- :
['GNI', 'TSE', 'T']
['TES', 'TIN', 'G']

which is exactly what I want.
I'm gonna push changes if you agree.