-
Notifications
You must be signed in to change notification settings - Fork 320
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/config system #350
Conversation
@giulioungaretti This looks pretty interesting, I'd definately be interested in using this. I read through the readme of the config (didn't look at the acual code) but it was not clear how to use this. Do you think it would make sense to include use of the config in the example ipython notebook and also add an example of how to use it in the config readme? I'm talking about a piece of code that can be executed or very explicit some file that needs to be present. Configs usually tend to be the things that I break :) |
@AdriaanRol ah, I assumed the doc was enough, but maybe it's not. |
@giulioungaretti Config system looks good. It is a bit more complex that some of the default python systems (e.g. configparser), but then it also has some more functionality. Maybe we should consider adding some convenience functions such as |
@peendebak json does not know the difference between float and int, if type is number then they are the same. |
Here is an overview of what got changed by this pull request: Issues
======
- Added 2
Complexity increasing per file
==============================
- qcodes/tests/test_config.py 2
- qcodes/config/config.py 7
Clones added
============
- qcodes/tests/test_config.py 20
See the complete overview on Codacy |
e343f65
to
8057ec3
Compare
@AdriaanRol @AdriaanRol https://github.com/qdev-dk/Qcodes/blob/8057ec3b14369ae4366ef570366f1ee12b7dc476/docs/examples/Configuring_QCoDeS.ipynb |
40fbdc5
to
3403eb0
Compare
@giulioungaretti I like the new config explanation notebook. It indeed explains how to make a new config file and how to use it 👍 I cannot say I am a fan of helper functions but that's a matter of personal preference and I'll acknowledge that I don't have to use those. Other points where I think it can be improved is a good template settings file (you can abuse the default config file for that). If you want a good example of what I am talking about think the sublime config files. Hope this helps. |
@AdriaanRol sweet, there's not much to configure as of v0.1. |
@giulioungaretti I took a look at the config system too, and I'm quite happy with it. @AdriaanRol I do like the sublime way of config files too. Especially the comments. However, that is not standard json and if I recall correctly is kindof annoying to implement. (There is commentjson though) Another thing I like about the sublime config is the file naming In this PR the |
@MerlinSmiles it's a very cool idea, and I see the use of it! For now I think this is it, and we'll work out how to make it super shiny in the next versions! |
@giulioungaretti I was just thinking that those changes would break the current config in the future, so it might be useful to implement the pattern now, without the fancyness. But thats of course totally up to you. Of course nothing stops me from hacking, I always edit in master thats so much easier 😍 |
@MerlinSmiles actually they won't break :D It's just a matter of implementing the priority and filenames :D |
@giulioungaretti another reason for a |
@MerlinSmiles but are people familiar enough with hidden files/directories ? |
@giulioungaretti I'm not sure about the hidden files/dirs, but it seems to be semi standard among package configs, no? At least I have some of those folders. Actually trying to find info about that, its like a broken way of using unix apps on windows and |
also this suggests |
d7612fe
to
a4d4906
Compare
See #341 .
It's not 100% done yet, and I think that maybe we should allow live updating the configs.
But also maybe not :/
@MerlinSmiles @eendebakpt !