-
Notifications
You must be signed in to change notification settings - Fork 136
Changes made to run files of not-working folder as well as working folder #153
base: master
Are you sure you want to change the base?
Conversation
@@ -28,62 +28,62 @@ | |||
|
|||
hints = [ | |||
Hint(layer='top', | |||
ext=['gtl', 'cmp', 'top', ], | |||
name=['art01', 'top', 'GTL', 'layer1', 'soldcom', 'comp', 'F.Cu', ], | |||
ext=['gtl', 'cmp', 'top', 'gbr', ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'gbr' should not be added as an extension hint to any of these layer types because it is not unique to any specific layer type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's true that 'gbr' is not the unique extension, in practice, I should not add it as hint extension.
if ext[1:] == 'gbr': #Prateek | ||
patterns = [r'(\w*[.-])*{}([.-]\w*)?$'.format(x) for x in hint.name] #Prateek | ||
if any(re.findall(p, name, re.IGNORECASE) for p in patterns): #Prateek | ||
return hint.layer #Prateek | ||
else : #Prateek | ||
patterns = [r'^(\w*[.-])*{}([.-]\w*)?$'.format(x) for x in hint.name] | ||
if ext[1:] in hint.ext or any(re.findall(p, name, re.IGNORECASE) for p in patterns): | ||
return hint.layer | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these changes are necessary if you remove 'gbr' from the extension hints above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes if I remove 'gbr' from the extension hints these changes are not required, but one change is required and that is in defining patterns :
patterns = [r'(\w*[.-]){}([.-]\w)?$'.format(x) for x in hint.name]
instead of
patterns = [r'^(\w*[.-]){}([.-]\w)?$'.format(x) for x in hint.name]
according to my changes to name attribute in hints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is * before {} in defining patterns, i.e.;
patterns = [r'(\w*[.-]){}([.-]\w)?$'.format(x) for x in hint.name]
@@ -35,6 +35,7 @@ def from_directory(cls, directory, board_name=None, verbose=False): | |||
if not os.path.isdir(directory): | |||
raise TypeError('{} is not a directory.'.format(directory)) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unecessary
@@ -125,13 +125,13 @@ def load_layer_data(data, filename=None): | |||
|
|||
|
|||
def guess_layer_class(filename): | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unecessary whitespace change
Sorry for that, actually I was working with that file as well so I had some
white space. Extremely sorry for that.
…On Sat, May 30, 2020 at 7:46 PM Hamilton Kibbe ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In gerber/layers.py
<#153 (comment)>
:
> @@ -125,13 +125,13 @@ def load_layer_data(data, filename=None):
def guess_layer_class(filename):
+
unecessary whitespace change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#153 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMBBEB6KTQZHHRCRDKTWQ3RUEIMTANCNFSM4NOV2WXA>
.
|
No description provided.