Closed Mindavi closed 5 years ago
Fwiw, look at #51 first. That should help getting the development branch up to speed with master. Should remove most of the commits you now see in the list. I thought it wouldn't be useful to commit changes to a dev branch that's not up to date with master.
This is interesting, however the updater.py
requires the json files to exist so we either need to couple this with the db transition or make sure the files are created by updater.py
when they are needed, even if empty.
Sorry for abandoning this. I don't really know what this was about exactly and I suspect my ideas might be out of date, so I'm closing this.
Your checklist for this pull request
Not sure how to run the unit tests. Saw something in another branch but if I need to run those it makes it really hard to make changes. You'd need to merge the testing branch, run the tests, revert the changes from the testing branch, change code, etc. etc... What do you propose?
Description
I've implemented an abstraction layer for key,value-pairs. This should help with managing subscribers as well as with storing other key,value pairs in json files. With these changes, it should solve #39 by creating the files when a new data point is added. This rests on the assumption that we don't need the files if nothing is written to it. If we need the file beforehand, we'll need to change the logic for this.
The abstraction layer should also help when moving to a database as described in #15. You should only need to change the abstraction layer instead of all the code above.
Let me know if you see any obvious problems. I've tested the datamanager extensively, but didn't test how it works together with the rest of the code. (in production)