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

Feature Request: Specify a config directory on the command line #15551

Closed
gb119 opened this issue May 8, 2021 · 3 comments
Closed

Feature Request: Specify a config directory on the command line #15551

gb119 opened this issue May 8, 2021 · 3 comments

Comments

@gb119
Copy link

gb119 commented May 8, 2021

I think it would be handy for the user to be able to specify a spyder configuration directory as a command line option so that, for example, if you install a new version of spyder in an environment you can also isolate any changes in the config from the new version. I personally would use this also for when I'm working off an external monitor compare to travelling and working on my laptop due to differences in screen size and scaling etc.

Looking at the code, I think one could implement this by having spyder's config manager look for an environment variable e.g. SPYDER_CONFDIR and use that in preference to the calculated directory, and then in the Spyder app's main() have it set that environment variable between the point the options get read and the configuration manager instance is imported.

But perhaps there is a reason for not doing this (or even more likely, my proposed solution sucks!)

@gb119
Copy link
Author

gb119 commented May 10, 2021

I did a quick play to implement this if you were interested in seeing a pull-request...

@steff456
Copy link
Member

Hi @gb119,

Thanks for this feature request! In fact we've discussed this multiple times and we would like to implement not only a spyder configuration directory, but also isolate configurations per project and global spyder configurations. In this way people will be able to load/save their configuration.

Right now we've added this to our roadmap that we are planning to put it public in the next month. If you are interested in helping us implement this it will be great! We can give you all the guidance you need :)

@steff456 steff456 self-assigned this May 10, 2021
@ccordoba12 ccordoba12 changed the title Feature Request: Spoecify a config directory on the command line Feature Request: Specify a config directory on the command line May 10, 2021
@gb119
Copy link
Author

gb119 commented May 11, 2021

I can imagine that involves a much more comprehensive refactoring of the config management code. At the moment there are certain preference changes that require a Spyder restart and I guess those forced restarts need to be eliminated as you don't want the user to be told that opening a new project requires them to restart Spyder just because they have some different preferences set in the new project that are different from their current project...

If you want the user to manage a set of global and per project settings then the config manager is going to have to track the sets of preferences separately and then present some sort of merged view. There'd need to be some UI to let the user know whether they were changing global rather than project settings too.

I think I'd need to find a lot more time to study the code quite a bit more to understand how one might implement your plan - probably best not to wait for that to happen :-) !

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

No branches or pull requests

3 participants