-
Notifications
You must be signed in to change notification settings - Fork 2k
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
add config to /hub/info endpoint #4442
Conversation
adds JupyterHub.api_include_config list for selecting which config should be included
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.
Only minor things, otherwise, it looks good.
for f in trait_filters: | ||
if "." not in f: | ||
full_class_filters.add(f) | ||
else: | ||
cls_name, _, trait_name = f.partition(".") | ||
if cls_name not in full_class_filters: | ||
cls_filters = class_trait_filters.setdefault(cls_name, set()) | ||
cls_filters.add(trait_name) |
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.
Nitpick: single letter variable. I would just use filter
all_classes = full_class_filters | set(class_trait_filters.keys()) | ||
|
||
# track any sections we didn't look at via instances | ||
unused_sections = set() | all_classes |
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.
Isn't all_classes
guaranteed to be a set ?
full_class_filters
is one even if empty and if so, all_classes
is a set of class_trait_filters.keys
.
I'm now convinced that traitlets are too dynamic for us to realistically do this, and vote we close this one :D I'm not sure if I'll even be able to fully trust the answers that come out of this API, given how dynamic traitlets can be. |
@yuvipanda since you requested the feature and don't plan to use it, I'm happy to close. We can always pick it up again! |
adds
JupyterHub.api_include_config
list for selecting which config should be included, which includes nothing by default.instead of adding a new
/api/config
endpoint, I elected to add a field to the existing/api/info
endpoint, which already tells things about the Hub, and config seems like it fits with what's already there.Key issues:
closes #4406
WDYT @yuvipanda?