Open manics opened 1 month ago
While at it, we should probably also convert LauncherEntry
. Feel free to copy it from my implementation
Edit: I think the self.parent
might not work for that. But I don't have much experience with traitlets
Thanks, I had LauncherEntry in my local branch, but was hoping to minimise changes. As it happens making it Configurable is the easiest way to set the defaults.
Assuming ServerProcess
can be configured externally I don't think LauncherEntry needs to be, it can be initialised from a dict as at present.
A nice benefit of this is we can autogenerate some of the manually written docs: https://github.com/jupyterhub/jupyter-server-proxy/pull/508
I see why you didn't want to use Configurable
for the Launcher Entry. But I think you could just switch to HasTraits
as a base class, this should still work for default values. Or make it consistent and make both only use HasTraits
, as they are both only used in the ServerProxy
class. I think I should still be able to use them in a configurable in my code.
Is there anything else still required here? It would be nice to merge this, so I can update my code it in #501.
This isn't useful in the jupyter-server-extension, but it should be useful in https://github.com/jupyterhub/jupyter-server-proxy/pull/501#pullrequestreview-2393608506
An added benefit is this makes it easier to add more parameters in future since the declaration of the class and the handling of defaults is now in the same place.