ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Split up the configuration file #27

Closed ivoflipse closed 11 years ago

ivoflipse commented 11 years ago

Currently there's one configuration file in the git repo that's shared between everyone, which means every time I update it and people use git to update, they have to deal with my changes in the configuration.

So I'll have to split it up into (at least) two separate files, where one are general configuration settings and another is for user specific settings.

ivoflipse commented 11 years ago

I've made a config.yaml file, which contains settings the user will be able to set. If the file doesn't exist at startup, it will create a copy of config_example.yaml and save that as config.yaml. It will still require the user to make manual changes to keep his config file up to date, though I could have the program notify the user if a key doesn't exist.

ivoflipse commented 11 years ago

I've added a small loop that checks if the config.yaml has all the keys it needs to have. If not, it will copy the value over from config_example.yaml. Which should save you some trouble.

ivoflipse commented 11 years ago

Everything seems to be working, pulling a new update shouldn't overwrite your own config.yaml. I also had forgotten to write any changes to config.yaml back to disk, so they'll be there next time and you can see what keys you might want to tweak.