-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor one client patching #87
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
base: trunk
Are you sure you want to change the base?
Conversation
Still need a couple more tests... |
Need to test this once more now that I moved the disconnect and reconnect methods, the server's in use today though, so will do it tomorrow. Once we've merged this we can rewrite the pypatcher tests to be more thorough +1. |
…tra/jacktrip_pypatcher into refactor-one-client-patching
I've tested this branch out more, up to 5 clients and booting from the automated script, all seems to be fine. Would be good to merge this if you're happy with it @madwort . |
Sorry this is still hanging around - will try to make time to review it soon! |
jack_client_patching.py
Outdated
"""set darkice connections for any number of clients""" | ||
|
||
if len(jacktrip_ports) == 1: | ||
self.set_darkice_connections_one_client( |
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 it would be worth splitting the lounge_music
connections into a separate function to the one client connections here - with an eye to the feature requests list, it would help us if we want to send the lounge_music to darkice while we're soundchecking a session.
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.
Lots of good stuff in the code here, a couple of minor things I think it would be good to tidy before merging - comment quality & where we patch the lounge_music. What you've done here is good for the way we've been using it, but maybe we're going to use it slightly differently soon...
Hey, thanks for the review, I started fixing the comments then wondered if the naming was a bit off actually. I feel something like this is a bit clearer and concise. What do you think? These are the main publicly called module functions:
These are private functions (in which case they could be prefixed with
|
yeah, good thoughts!
yeah, this looks good, maybe we could go further & find a better word for "set" too, just thinking, with the current 2-phase thing ("set" them, then "make" them) maybe it should be "generate" (i.e. "generate" them, then "make" them), not sure, there's probably a better word that I'm missing...
Ah, probably, yes, I'm not the most python-ish person, I'm used to either having explicit private methods - sounds good to differentiate them though.
I'm not sure - if we're sticking with the "set" verb above, and these are sub-functions of that, they should probably stay as "set", although e.g. |
Yeh, I don't like
Yeh, I actually thought they should be differentiated a bit more because of the parent / child nature of their relationship. If we use a I'll make these changes and see how it looks. |
I kept with
jacktrip_pypatcher/jacktrip_pypatcher.py Lines 108 to 114 in 66da550
It is a fairly major change though so I do wanna spin up a server to test all this is working as expected. |
What do you think about the code in all of these connection methods?: jacktrip_pypatcher/jack_client_patching.py Lines 63 to 68 in 66da550
Should they be re-written like so (maybe with abbreviated naming?):
I think I prefer the former for readability, but the latter is many fewer lines of code, and with abbreviated names could be fairly compact.... |
I mean, if we do that it's hardly worth having the helper method, as it's only used once here.... jacktrip_pypatcher/jack_client_patching.py Lines 172 to 181 in 66da550
|
No description provided.