-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not sort already ordered data. #1237
Conversation
6f385e1
to
b3593c4
Compare
I think this PR fixes the bugs introduced by #1230 without losing stable outputs. |
b3593c4
to
a972040
Compare
FYI - I have an alternative to this pull request for your review at #1243 |
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
a972040
to
afb523a
Compare
1cf4823
to
53ddf60
Compare
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
53ddf60
to
0364315
Compare
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
463f5e0
to
c2a5c7f
Compare
@mithro, I believe after many iterations this is ready for review. CI should be done in 1-2 hours, but to review everything except tileconn, you can take a look at https://source.cloud.google.com/results/invocations/cdf8a590-0ecc-4b5c-9a39-25c8377b493c
|
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
582b7ab
to
9aec0c8
Compare
Artix7 run is complete and green, take a look and lets get this merged!
|
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.
Bunch of minor comments...
|
||
tileconn = tuple( | ||
sorted( | ||
tileconn, key=lambda x: (x['tile_types'], x['grid_deltas']))) |
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.
You want to run extract_numbers(x['tule_types'])
too.
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.
Tile types doesn't tend to have many numbers, so I don't think it is required. Also it would required fixing the extract_numbers
formatting. So maybe leave as follow on?
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.
Hrm, I think I was thinking about the site_types
where I wanted the first site to be the first value....
@@ -182,6 +180,8 @@ db-extras-artix7-harness: | |||
+source minitests/roi_harness/arty-swbut.sh && \ | |||
$(MAKE) -C minitests/roi_harness \ | |||
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/arty-a7/swbut run copy | |||
+XRAY_PIN_00=J13 XRAY_PIN_01=J14 XRAY_PIN_02=K15 XRAY_PIN_03=K16 \ |
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.
I'm a bit unsure why did this moved? A comment on what /exactly/ this is doing would be good. Should it be run before the harness steps?
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 moved because there was a race condition in the previous location. #1227 happens to fix the race condition, so I wouldn't worry about it too much right now.
if m.group(1): | ||
bits.append(m.group(1)) | ||
if m.group(2): | ||
bits.append(int(m.group(2))) |
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.
I think you potentially want to convert the number back into a string with leading zeros.
Otherwise, extract_numbers("A100") > extract_numbers("100B")
will complain about non-matching data types?
In [1]: (100, 't') > ('t', 100)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-d06ca7865f0c> in <module>()
----> 1 (100, 't') > ('t', 100)
TypeError: '>' not supported between instances of 'int' and 'str'
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.
It's been stable for now, I think we can leave that for a future enhancement. In general when we do the extract_numbers
, there is an underlying structure that tends to be uniform. A follow up with some unit tests and leading zeros would handle this. I'll make an issue for fix up.
elif isinstance(o, str): | ||
return extract_numbers(o) | ||
elif isinstance(o, int): | ||
return o |
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.
I think you potentially want to convert the number back into a string with leading zeros.
@@ -0,0 +1,98 @@ | |||
import io |
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.
Maybe we should rename this to something like prjxray/sort_complex_data.py
or something now? The name xjson
was just me being lazy I think....
For now I'd like to leave further refactoring of |
I'm okay with that. |
No description provided.