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

Better extension/config defaults for first run #467

Closed
ZenithDK opened this Issue Jun 9, 2013 · 11 comments

Comments

4 participants
@ZenithDK
Contributor

ZenithDK commented Jun 9, 2013

I've just installed mopidy and trying to start it I get this:

INFO     Starting Mopidy 0.14.1-55-g9fc319f
INFO     Loading config from: builtin defaults, /home/zenith/.config/mopidy/mopidy.conf, command line options
INFO     Enabled extensions: spotify, mpd, http, stream, scrobbler, mpris, local
INFO     Disabled extensions: none
ERROR    Config value spotify/username must be set.
ERROR    Config value spotify/password must be set.
ERROR    Config value scrobbler/username must be set.
ERROR    Config value scrobbler/password must be set.
INFO     Stopping Mopidy frontends
INFO     Stopping Mopidy core
INFO     Stopping Mopidy backends
INFO     Stopping Mopidy audio

But I think mopidy should create .config/mopidy/mopidy.conf on the first run, if it does not exist, and then continue running. This will make it easier to get started for new users who can then modify the config file if needs be.

@kingosticks

This comment has been minimized.

Member

kingosticks commented Jun 9, 2013

As we started to discuss in #463

@ZenithDK

This comment has been minimized.

Contributor

ZenithDK commented Jun 9, 2013

Sorry - didn't see that - I just searched for issues with "start" in the title.
Do you want me to close this?

@kingosticks

This comment has been minimized.

Member

kingosticks commented Jun 9, 2013

Nah, i don't think so. That's closed and this has a clearer, more specific, title. Just wanted to highlight you're not alone in this thought.

@adamcik

This comment has been minimized.

Member

adamcik commented Jun 24, 2013

Having thought about this a while I suggest we go for the following:

  • Auto-create a config on the first run
  • ... populating it with commented out version of all the settings.
  • Make all extensions disabled by default (needs updates to default configs).
  • We need to decide how settings.py conversion and this play together
  • mopidy.conf existing should prompt user to delete settings.py
  • Appropriate warning messages for no enabled extensions and no discovered extensions should be added.

As a potential bonus feature I would also like to consider having the docstrings for the configs somehow get melded in to the auto generated file, but this is a nice to have, not a critical feature. Though we should probably start the file with something like # Config file for mopdiy, see http://docs.mopidy.com/... for more details

@kingosticks

This comment has been minimized.

Member

kingosticks commented Jun 25, 2013

For the bonus feature, when you talk about docstrings are you talking about some how pulling the descriptions listed under 'Configuration values' from the documentation?

@adamcik

This comment has been minimized.

Member

adamcik commented Jun 25, 2013

Yes that, or having a help='...' in the schemas to make it easy to get to.

@kingosticks

This comment has been minimized.

Member

kingosticks commented Jun 25, 2013

All sounds excellent.

@jodal

This comment has been minimized.

Member

jodal commented Sep 15, 2013

I'm all for @adamcik's suggestions here. Let's get this into the next release.

@kingosticks

This comment has been minimized.

Member

kingosticks commented Sep 15, 2013

Do you have a rough idea of when the next release will be? I've become completely out of touch with what's going on over the summer (but I'm back and raring to go!)

@jodal

This comment has been minimized.

Member

jodal commented Sep 15, 2013

I'm hoping to have a small 0.15 release ready before I go offline for 10 days on Friday. Hit'n'run is the most responsible release process, isn't it? :-)

@jodal

This comment has been minimized.

Member

jodal commented Sep 16, 2013

We already warn the user when an old settings.py is found, so I'm ticking of that point as done.

jodal added a commit that referenced this issue Sep 16, 2013

Create empty config file if none found (see #467)
We already had code in place for this, but it was run after the config
validation, so on a new installation Mopidy would fail because of missing
config values before the config file was created.

jodal added a commit to jodal/mopidy that referenced this issue Sep 16, 2013

main: Split main() function in two
By separating the teardown procedures for errors that happens before and after
actors are started, we get a lot less output when failing on config errors.
This makes the config errors the last lines printed by the `mopidy` command,
making them easier to spot.

Related to mopidy#467

@ghost ghost assigned adamcik Nov 16, 2013

@jodal jodal closed this in #588 Nov 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment