-
Notifications
You must be signed in to change notification settings - Fork 126
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
Use geoname_id as the only lookup method to update records #144
Conversation
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
=========================================
+ Coverage 92.1% 93.7% +1.59%
=========================================
Files 20 22 +2
Lines 1140 1191 +51
=========================================
+ Hits 1050 1116 +66
+ Misses 90 75 -15
Continue to review full report at Codecov.
|
@jpic If you have some time, review/approval would be nice. |
Well, I've read it and you know the story: give a developer 10 lines of code it'll find 10 problems, give him 1000 lines and it'll say "no problem !". But if we take time I'd be happy to talk about it ;) I've seen some patching feature, is this enabling you to patch geonames data before import like we discussed at europycon ? Perhaps a good improvement to this PR could be done in the docs/ directory ? |
No, there is no patching yet. Just more robust update procedure to actually update the data. The only field which does not change during update is geoname_id. The main commit in this branch is 4448ee2 The docs have very minor update regarding new |
Patcher will be developed in a separate branch, but there is a long way to go: https://github.com/max-arnold/django-cities-light/commits/rewrite |
Awesome, you've proven your dedication by supporting our userbase, you've got my approval to deploy this and move on, if you want me to actually try the code and make a proper line by line review I can try this week end. |
Ok, I'll merge it to the master tomorrow. Also I think it will be wise to wait some time before making a new release, giving people a chance to spot possible problems in the master branch. |
This was suggested some time ago in the mailing list: https://groups.google.com/forum/#!topic/yourlabs/aYwK3UgbAd8
Changelog:
Unfortunately, this didn't fix #110 and the improvement in number of imported cities is very low. As is turned out, lots of cities are skipped due to database constraints
unique_together = (('region', 'name'), ('region', 'slug'))
. Removal of these constraints is out of scope of this branch.