Consider moving serverSettings out of kernelOptions
I think the nesting of serverSettings and kernelOptions seems counter-productive now.
kernelOptions mostly correspond to the kernel metadata on the jupyter side. In a multipage site, kernelOptions may be different on different pages (language and path may vary).
At the same time serverSettings, is likely to be always the same, and it plays a similar role to binderOptions.
Therefore I propose to move serverSettings out of into a top level key out of kernelOptions.
Additionally, if a specific server is configured, perhaps it should have priority over binder, and not vice versa.
What's the downside of having them nested? Don't the options get set per page anyway?
E.g. in sphinx-thebe the per-page code that is supposed to configure the kernel options now needs to ensure that it correctly preserves global server options.
Sorry that I am not following. Could you give a more specific example of why that's a problem? Isn't that just updating a_dict['somekey'] and making sure you don't also update a_dict['someotherkey']?
I've stumbled upon this by working on https://github.com/executablebooks/sphinx-thebe/pull/25/
The difference is roughly speaking between these two implementations:
default_config = get_config()
kernel_options = get_kernel_options()
if "kernelOptions" in default_config and "serverSettings" in default_config["kernelOptions"]:
kernel_options["serverSettings"] = default_config["kernelOptions"]["serverSettings"]
default_config["kernelOptions"] = kernel_options
and
default_config = get_config()
default_config["kernelOptions"] = get_kernel_options()