-
Notifications
You must be signed in to change notification settings - Fork 301
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
Config cleanup #1242
Config cleanup #1242
Conversation
* load_config no longer has the side effect of setting the path to the config file as it doesn't actually update the current_config but just returns the config loaded from the file * Make custom path behave like all other configs but load it last so it takes preference over the other config files * Change `__repr__` to include the path of all config files used * Refactor to reduce code duplication * Correct a few typos current_config_file is still there and points to the last config file loaded as it did before. This is perhaps confusing? Do we want to remove it altogether.
Looks very nice! Two questions:
|
Codecov Report
@@ Coverage Diff @@
## master #1242 +/- ##
==========================================
+ Coverage 79.16% 79.17% +<.01%
==========================================
Files 52 52
Lines 7201 7199 -2
==========================================
- Hits 5701 5700 -1
+ Misses 1500 1499 -1 |
Not sure about tests. Changes in functionality are very limited. The only user visible change is probably the new |
i like this :) |
I just pushed a test for cascading. The test fails, but shouldn't it pass? Did I miss how the cascading works? |
@WilliamHPNielsen but where have you specified/assigned |
@astafan8, I haven't, that's the whole point. It is specified in the default config file that ships with QCoDeS, |
But there was a stupid error in the assert statement in my test, so luckily the config system is not broken 🙂 |
A few changes to the config system to hopefully make it more logical
the config file as it doesn't actually update the current_config
but just returns the config loaded from the file
so it takes preference over the other config files
__repr__
to include the path of all config files usedcurrent_config_file is still there and points to the last config file
loaded as it did before. This is perhaps confusing? Do we want to
remove it altogether.
@WilliamHPNielsen I think this will solve your problem.
@nataliejpg Any issue with the change to path loading logic. The path specified file will still overwrite anything else
EDIT by William: This fixes #1229