-
Notifications
You must be signed in to change notification settings - Fork 88
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
Italian application added. Minor bugs corrected. #147
Conversation
…installing mapit as an app, from github link, into an existing project
…he (development), MemcachedCache and RedisCache backends
Thank you for this, looks good :-) If you could rebase this on top of the current master, this might help with your 2bb188e (MapIt now works fully under python 3.2, so this commit hopefully is no longer necessary). And that should also fix the Travis error which was probably the Django 1.7.1 change we've worked around. Then once the tests are passing, we can look at getting it merged :) |
Your branch rebased on our current master passes the tests - https://github.com/mysociety/mapit/compare/openpolis-master - and definitely doesn't need fc0880d or 2bb188e, so that's good :) Could you explain your bdf7209 - your change in f7dde4c for locmem seems to continue working in memcache here, so why did you switch it back for memcached alone? |
Conflicts: mapit/countries/__init__.py mapit/management/commands/mapit_import.py
Very sorry about the continuing log message error – I've uncovered the problem and committed a fix in 6d1b1b8 so hopefully that really is okay now, let me know! I'd rather not have bdf7209 unless necessary�. As I understand it, memcache uses strings as keys internally and always has done, and Django converts any key to a string before passing to memcached, so I don't see why it would require this to work, and can't find any other code on github that appears to do the same - could you provide the error you received without it? |
I have merged in #153, which includes hopefully everything from this PR that is needed. If you could check whether the updated master works for you, that'd be great :) |
I found out that the correct way to go, at least with python 3.2 and python 2.7,
at the beginning of the file (mapit_import.py, in this case), and leave the strings as they are. Importing data (shp in my case), with names containing unicode chars raise a Unicode exception |
I've put a commit altering the test similar to your commit 2ce41c6 in the As some example Shapefile imports, I downloaded the "Admin 0 – Countries", the first file from http://www.naturalearthdata.com/downloads/110m-cultural-vectors/ - and ran (sorry, my db was set up for UK data types):
I did the same with the serie_25_wgs84_geo.zip available from http://www.igmi.org/download.php :
And the Shapefile of Corsica from http://download.geofabrik.de/europe/france/corse.html :
(The last throws up a separate issue that something (GDAL library underneath?) assumes the Shapefile is in iso-8859-1 as per spec, but it does not error when logging.) Perhaps the difference in behaviour you are seeing is caused by some underlying GDAL version difference or something? Could you provide the shape file that doesn't work for you so we can replicate it here? Or can you try one of the examples above and see if they also don't work for you? |
…installing mapit as an app, from github link, into an existing project
@guglielmo Are you OK on this? Just want to make sure you're all good on this project, and want to find out what's going on with you... |
Ooops, yes it's ok, I just overlooked at your notification. |
I've installed mapit, using the git URL in the requirements as a django application within a pre-existing project.
I modified the .gitignore to include the
django_mapit.egg-info
path, automatically created.The mapit_it application has been added, with a management task to find parents of the official ISTAT administrative subdivisions and an adapted zip code validation. It is just a prototype and other functions and tasks will follow soon.
Two minor bugs require revision, but I could not make separate pull requests (sorry)