From 08f1aca2923cf6165cc5399152c00d051e3e0831 Mon Sep 17 00:00:00 2001 From: Gillian Newton Date: Wed, 24 Oct 2018 20:31:31 -0400 Subject: [PATCH 1/4] Create remove-config-values --- remove-config-values | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 remove-config-values diff --git a/remove-config-values b/remove-config-values new file mode 100644 index 0000000..0fd7ce0 --- /dev/null +++ b/remove-config-values @@ -0,0 +1,2 @@ +Remove config values in the-littlest-jupyterhub by editing 'config.py' file +and making the change. ie. comment out or delete the value to be unset From 37b57ce346d3f9ff7b34add79887220f025a57f7 Mon Sep 17 00:00:00 2001 From: Gillian Newton Date: Sun, 28 Oct 2018 21:13:54 -0400 Subject: [PATCH 2/4] Update tljh-config.rst --- docs/topic/tljh-config.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/topic/tljh-config.rst b/docs/topic/tljh-config.rst index 4c62e17..ea50b3e 100644 --- a/docs/topic/tljh-config.rst +++ b/docs/topic/tljh-config.rst @@ -160,3 +160,15 @@ Advanced: ``config.yaml`` ``config.yaml`` file located at ``/opt/tljh/config.yaml``. ``tljh-config`` is the recommended method of editing / viewing configuration since editing YAML by hand in a terminal text editor is a large source of errors. + +``Remove configuration values`` +--------------------------------- + +Use the argument ``remove-item`` to delete a configuration value from the +``config.yaml`` file: + +``tljh-config remove-item `` + +After modifying the configuration, reload JupyterHub to apply changes + +``tljh-config reload`` From 8629b3de32314e15089d37669dc5cef8aec0f47e Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sat, 16 Oct 2021 18:36:19 +0200 Subject: [PATCH 3/4] docs: describe tljh-config commands by referencing --help By not providing specific examples, we reduce the maintenance effort I believe. I didn't want to add examples for all tljh-config commands as those were anyhow documented via --help, and it felt like too much documentation to maintain to describe it better than that. --- docs/topic/tljh-config.rst | 40 ++++++++++++++++++++++++++++++-------- remove-config-values | 2 -- 2 files changed, 32 insertions(+), 10 deletions(-) delete mode 100644 remove-config-values diff --git a/docs/topic/tljh-config.rst b/docs/topic/tljh-config.rst index ea50b3e..cc7c673 100644 --- a/docs/topic/tljh-config.rst +++ b/docs/topic/tljh-config.rst @@ -161,14 +161,38 @@ Advanced: ``config.yaml`` is the recommended method of editing / viewing configuration since editing YAML by hand in a terminal text editor is a large source of errors. -``Remove configuration values`` ---------------------------------- +To learn more, use the ``--help`` flag applied to ``tljh-config`` directly or +after providing a positional argument as command like ``remove-item`` to learn +more about those commands specifically. -Use the argument ``remove-item`` to delete a configuration value from the -``config.yaml`` file: +.. code-block:: bash -``tljh-config remove-item `` - -After modifying the configuration, reload JupyterHub to apply changes + sudo tljh-config --help -``tljh-config reload`` + usage: tljh-config [-h] [--config-path CONFIG_PATH] {show,set,add-item,remove-item,reload} ... + + positional arguments: + {show,set,add-item,remove-item,reload} + show Show current configuration + set Set a configuration property + add-item Add a value to a list for a configuration property + remove-item Remove a value from a list for a configuration property + reload Reload a component to apply configuration change + + optional arguments: + -h, --help show this help message and exit + --config-path CONFIG_PATH + Path to TLJH config.yaml file + +.. code-block:: bash + + sudo tljh-config remove-item --help + + usage: tljh-config remove-item [-h] key_path value + + positional arguments: + key_path Dot separated path to configuration key to remove value from + value Value to remove from key_path + + optional arguments: + -h, --help show this help message and exit diff --git a/remove-config-values b/remove-config-values deleted file mode 100644 index 0fd7ce0..0000000 --- a/remove-config-values +++ /dev/null @@ -1,2 +0,0 @@ -Remove config values in the-littlest-jupyterhub by editing 'config.py' file -and making the change. ie. comment out or delete the value to be unset From b2f72ada4668a4365d5921a5e044dd0d165f3c6f Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Fri, 22 Oct 2021 10:45:40 +0200 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Georgiana Elena --- docs/topic/tljh-config.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/topic/tljh-config.rst b/docs/topic/tljh-config.rst index cc7c673..cf106c7 100644 --- a/docs/topic/tljh-config.rst +++ b/docs/topic/tljh-config.rst @@ -161,9 +161,10 @@ Advanced: ``config.yaml`` is the recommended method of editing / viewing configuration since editing YAML by hand in a terminal text editor is a large source of errors. -To learn more, use the ``--help`` flag applied to ``tljh-config`` directly or -after providing a positional argument as command like ``remove-item`` to learn -more about those commands specifically. +To learn more about the ``tljh-config`` usage, you can use the ``--help`` flag. +The ``--help`` flag can be used either directly, to get information about the +general usage of the command or after a positional argument. For example, using +it after an argument like ``remove-item`` gives information about this specific command. .. code-block:: bash