-
Notifications
You must be signed in to change notification settings - Fork 300
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
Split ChannelList into a ChannelTuple and a ChannelList #3851
Conversation
c5e18f7
to
3c7d786
Compare
Codecov Report
@@ Coverage Diff @@
## master #3851 +/- ##
==========================================
+ Coverage 65.66% 65.80% +0.14%
==========================================
Files 228 228
Lines 31055 31056 +1
==========================================
+ Hits 20392 20437 +45
+ Misses 10663 10619 -44 |
c163dde
to
e660d59
Compare
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.
Question? Should we get rid of the whole _channels being a tuple or a list. That would significantly simplify the typing and remove the need for casting in the list implementation.
as discussed offline, making _channels a list will make things easier. getting rid of it, i think, is possible, but then _channel_mapping becomes THE underlying structure, and i doubt that this will result in a better code. in fact, perhaps removing the _channel_mapping and generating it only when needed, could improve the code, but also might not
Deprecate lock ? Probably not yet. We should first update contrib drivers
agree. first update contrib drivers, but then, yes, deprecate the lock
Can we make this more generic so myinstr.chanels is a ChannelTuple[Mychanneltype]
i think this should be possible. _chan_type needs to become a type alias bound to InstrumentChannel and used in all the signatures. can be attempted in a separate PR :)
and dont use private api
Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
5bf1af7
to
c7bc2ad
Compare
Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
bors merge |
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
This creates a cleaner interface where the ChannelTuple does not contain modifying methods (which would just raise)
One could significantly cleanup the code by removing the whole lock functionality but that will need to be left till
the things has been deprecated for a while.
Question? Should we get rid of the whole
_channels
being a tuple or a list. That would significantly simplify the typing and remove the need for casting in the list implementation.Possible future improvements