WIP: import contacts from remote CardDAV server#134
WIP: import contacts from remote CardDAV server#134Fnux wants to merge 12 commits intoZeroPhone:develfrom Fnux:contacts-sync
Conversation
|
Re "storing application's configuration" - we have solutions for working with .json config files - storing, recreating configs on error, saving, even primitive migrations. See the howtos regarding that, let me know if anything's unclear. |
Codecov Report
@@ Coverage Diff @@
## devel #134 +/- ##
=========================================
+ Coverage 38.51% 41.32% +2.8%
=========================================
Files 233 255 +22
Lines 18126 20867 +2741
=========================================
+ Hits 6982 8623 +1641
- Misses 11144 12244 +1100
Continue to review full report at Codecov.
|
CRImier
left a comment
There was a problem hiding this comment.
Reviewed the code without running it, for now. Change the i=self.i, o=self.o, Printer and Listbox stuff, and do let me know about the other changes =)
|
@CRImier I'd like to move the |
|
I still have to clean, document and test the code I moved to |
+ properly define public API for the mentionned module
|
I added a |
| from vcard_converter import VCardContactConverter | ||
| from ui import (NumberedMenu, Listbox, Menu, LoadingIndicator, DialogBox, | ||
| PrettyPrinter as Printer, UniversalInput) | ||
| from distutils.spawn import find_executable |
|
This works for your usecase, right? We can use the default config management functions to store the config files, just need to point it to the right folder. As about testing - doctests for code in |
|
Looks good! Will do a couple of fixes now and merge |
|
Oh right, read through the code again. Thinking about some kind of changes to config management that'd avoid using the main ZPUI config. For now, I'm making sure that the ZPUI config is used the least amount possible - since it has hardware configuration parameters, it's important for it to not get changed by the users often. + I'm not sure that it makes sense for the So, I have an idea - read the config from the app (+ allow changing it from the same app), then pass the config variables. Let me know what you think of it. For now, merging the code into a separate branch ( |
This PR addresses parts of #124: it alows to import contacts from a remote CardDAV server using vdirsyncer. I did not add a way to export the local contacts since the user doesn't have a form (for now) to add new entries manually.
I still have to investigate a sexier way to store the application's configuration and write tests for the new features.