Skip to content
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 "tljh-config unset" option #352

Merged
merged 1 commit into from May 28, 2019
Merged

Conversation

GeorgianaElena
Copy link
Member

  • Add / update documentation
  • Add tests

closes #203

I added the option to unset (remove) a config property. @yuvipanda, I'm not sure if this is wanted but I thought it would be nice to be able to remove a config property the same way we're setting it, without editing the config file.

@yuvipanda yuvipanda merged commit dd6e4ed into jupyterhub:master May 28, 2019
@yuvipanda
Copy link
Collaborator

This is very useful! Thank you very much :) <3

We should probably also have a way to add an explicit key-value pair to config as well. Currently we can't set LTIAuthenticator properties, since they look like:

c.LTIAuthenticator.consumers = {
	'key1': 'value1',
	'key2': 'value2'
}

Not sure what the terminal UX for this would look like.

@GeorgianaElena
Copy link
Member Author

@yuvipanda, I'm not sure I understand why the following won't do the job.

tljh-config set c.LTIAuthenticator.consumers.key1 = value1
tljh-config set c.LTIAuthenticator.consumers.key2 = value2

Is it because we assume the authenticator will will only have one-level attributes?

When you say

add an explicit key-value pair to config

do you mean adding a key as it is without parsing it? If this is the case we could use the set command and add a flag that would tell us whether or not to treat the key as a path.

Sorry if I'm far from the truth and you meant something else.

@GeorgianaElena GeorgianaElena deleted the issue203 branch September 19, 2019 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to unset a config value
2 participants