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
Cleanup handle (Part 1) #2720
Cleanup handle (Part 1) #2720
Conversation
a976f05
to
edc8e3c
Compare
The recursive discovery tests don't like me deprecating iteration over unit objects like reals and ints. I could condition the recursion to only objects which are iterable: |
927ce45
to
aa63a8b
Compare
Seems like a lot of tests worked in GHDL with Questa and Riviera are also failing because the tests were previously counting individual bits discovered by iterating over logic array or string types. I can add those back in to the recursion, but perhaps there is a better way to iterate where invalid iterations (like over reals and ints) is not allowed? Unfortunately, the test code assumes that you can iterate safely over all handles, and while that's true, it isn't sensible for some types. |
7316295
to
08cc5ff
Compare
cd24fcd
to
848bc14
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2720 +/- ##
==========================================
- Coverage 66.65% 66.51% -0.14%
==========================================
Files 48 48
Lines 8441 8410 -31
Branches 2387 2387
==========================================
- Hits 5626 5594 -32
Misses 1696 1696
- Partials 1119 1120 +1 ☔ View full report in Codecov by Sentry. |
95fbb44
to
2c91d3c
Compare
4b74635
to
bc4aa85
Compare
@@ -758,13 +699,13 @@ def value(self) -> BinaryValue: | |||
result._set_trusted_binstr(binstr) | |||
return result | |||
|
|||
def __int__(self): | |||
return int(self.value) | |||
|
|||
|
|||
class RealObject(ModifiableObject): | |||
"""Specific object handle for Real signals and variables.""" |
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.
"""Specific object handle for Real signals and variables.""" | |
"""Specific object handle for real-valued signals and variables.""" |
(while here)
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'll leave this as a comment for "Part 2". I want the PRs to be digestible and there are a ton of documentation things I could change. For example, this diagram will have to change.
6fb5813
to
84c0339
Compare
2a46f2d
to
516dc99
Compare
Starting some of the cleanup mentioned in https://github.com/cocotb/cocotb/wiki/Handle-Cleanup-Proposal without significantly breaking the interface. Closes #1522. Addresses some of #3548.