-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
cli: add sopel-config {list,init,get}
#1507
Conversation
I haven't gone very far into this, but I did find it odd that there's no argument to list configs from a non-default homedir. Have you just not built that yet or did you specifically leave it out for some reason? |
I left it out because IIRC I don't really like it, but the bot isn't very good at managing that at the moment. Even though I think it's a very valid concern to have. |
ab4e01b
to
27017ce
Compare
I smell a future enhancement, then. For this PR I'll ignore that omission, since it's out of scope to do anything about it here. |
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.
Well, the code looks all kinds of sensible.
I'll load it up and test the CLI a bit Soon™, but until then I left the usual crop of line notes nitpicking docstrings. 😉
Push changes without rebase, since everything will be squashed into one commit in the end. |
That makes it easy to see what you did, so :D I was playing with the documentation and I tried making this change: diff --git a/sopel/cli/config.py b/sopel/cli/config.py
index c8a2d29e..13462539 100644
--- a/sopel/cli/config.py
+++ b/sopel/cli/config.py
@@ -62,8 +62,7 @@ def build_parser():
def handle_list(options):
"""Display a list of configuration available from Sopel's homedir
- :param options: parsed arguments
- :type options: ``argparse.Namespace``
+ :param argparse.Namespace options: parsed arguments
This command displays an unordered list of config names from Sopel's
default homedir, without their extensions::
@@ -92,8 +91,7 @@ def handle_list(options):
def handle_init(options):
"""Use config wizard to initialize a new configuration file for the bot
- :param options: parsed arguments
- :type options: ``argparse.Namespace``
+ :param argparse.Namespace options: parsed arguments
.. note::
Doing it that way makes Sphinx auto-link to the Python documentation for It's not useful right now (because Sphinx isn't documenting anything in ( |
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.
Approving, because my last comment isn't really that important.
The `sopel-config` is a CLI tool to: * list existing configuration file from Sopel's homedir * init a new configuration file in Sopel's homedir * get a value from a section.option of Sopel's configuration
5101846
to
2ad7100
Compare
@dgw rebased, squashed, Travis's happy, everything's good now! |
Today's the day, @Exirel: You can start working on the next phase of this CLI. 😁 |
Replace #1465
The
sopel-config
is a CLI tool to:It could do much more, but I'll leave it here for now, since @dgw is quite busy.
Note:
sopel-config list
could replacesopel --list
, andsopel-config init
could replacesopel --wizard
in the end. That requires more thought.