-
Notifications
You must be signed in to change notification settings - Fork 17
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
add unittest for map-json function with qgis-server backend #373
base: 2.8.x-qgis_server
Are you sure you want to change the base?
add unittest for map-json function with qgis-server backend #373
Conversation
Add qgis_server backend support for geonode: * Add QGIS Server app. * Push layers to local storage for qgis backend. * Handling for updating old layer object. * Implementation for deleting a layer. * Put delete layer in pre_delete QGISServerLayer * Add link to download zip file. * Better link in layer detail page. * create a QGIS project when a layer is uploaded * update qgis project * add gis tools * serve tiles with a WMS wrapper * forward legend request to QGIS WMS if the legend is not in cache * Add tile url to link. Able to show the layer now. * Add link for legend. * check if the PNG is valid, remove it if it is not valid * get a thumbnail from qgis server * Move import signals to end of model to avoid circular import. * Add thumbnail for layers. * add indicator for analysis task process * Hide filename for generated qml legend * First working wms map in the map page creation. * better code structure and add local_setting sample. * enable WFS in the qgis template * Replace SRID 900913 to 3857. * Add DescribeLayer in qgisserver app. * Add DescribeFeatureType in qgisserver app. * Add Describe FeatureType * Renaming wms to better method name. * Styling legend. * Make print map dialog works. * Temporary hack for map printing. * fix transparency when calling the WMS * fix qgis project with a raster * fix the projection in the QGIS template if different than 4326 * remove cache when we remove the qgis layer * set the attributes for a vector layer using WFS * remove qgis project template * fix attribute table when calling the WFS with the new server plugin * Set local layer. * Call the server plugin while saving the layer in the DB to create the qgis project * update mimetype to content_type due to django 1.7 * create qgis map * Refactor django.conf.settings access * Refactor thumbnail creation to use celery * Use relative url for layer thumbnail. * Update migrations for geonode:2.6.x * fix kartoza#19: thumbnail and legend url resolver * issue kartoza#21: Provide GeoTIFF download url * delete and copy layers properly: * fix kartoza#24: File saved as different name sometimes * fix kartoza#25: Cache files not deleted when layer deleted
- Add thumbnail for map - Fix thumbnail tests for layer and map
* include layer links in layers API * include map layer list in maps API * include geonode version in output for resource based API
This is to refrain from bothering them with unnecessary emails
- Refactor thumbnail url generator for QGIS Server. Now giving direct url to QGIS Server, instead of proxying to Django. - Remove unnecessary thumbnail view in qgis_server, because geonode already have internal cache for thumbnail. Thumbnail should just be accessed directly to QGIS Server without proxy. - Fix map creation test. - Refactor wrong/inconsistent bbox convention for maps.
Enable ASCII file upload and create link for ASCII file.
* Add download zipped files for non-shapefile. * Use image/tiff for qgis server GeoTIFF mime links. * Add unit test for zipped all files link for raster.
Update geonode master
* fix default map action for downloading and edit * fix the flow in maps/views.py * tidy up unittest for both backends partially fix kartoza#207
* fix set thumbnail and remove map * add logger partially fix kartoza#207
* add QLR and QGS unittest for layer and map * add mapid param in geoserver's function view for download QLR * revise mime type for QLR and QGS
* embed full static HTML page as leaflet page * removes unnecessary comments * add test case for download leaflet page * fix reverse for geoserver * fix travis error on geoserver fix kartoza#151
* bug fix embed widget, the previous code still encountered problem with CORS * fix travis error * embed widget link for qgis-server and geoserver backend * embed widget link and add copy button * refactor map projection on the frontend into django views fix kartoza#152
Cumulative updates from upstreams
Codecov Report
@@ Coverage Diff @@
## master-qgis_server #373 +/- ##
======================================================
- Coverage 41.07% 40.84% -0.23%
======================================================
Files 329 329
Lines 25751 25773 +22
Branches 3389 3389
======================================================
- Hits 10576 10527 -49
- Misses 14543 14619 +76
+ Partials 632 627 -5
Continue to review full report at Codecov.
|
@@ -168,6 +168,51 @@ def test_map_json(self): | |||
self.assertEquals(map_obj.abstract, "Abstract2") | |||
self.assertEquals(map_obj.layer_set.all().count(), 1) | |||
|
|||
@on_ogc_backend(qgis_server.BACKEND_PACKAGE) | |||
def test_map_json_on_qgis_server(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you merge this unittests with the above one? It seems to be doing generic things. It should be working with geoserver/qgis_server. Then we can remove @on_ogc_backend
decorator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if this truly specific to QGIS Server, then we need to move it to geonode.qgis_server.tests module
"url": "http://{s}.tile.osm.org/{z}/{x}/{y}.png" | ||
}, | ||
"source_san_andres_y_providencia_administrative": { | ||
"url": "http://geonode.dev/qgis-server/tiles" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you take this kind of URL dynamically from the layer object instead of hardcoded it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some comments here.
aa5509a
to
b48e347
Compare
@boney-bun merge or close this PR please |
ping @boney-bun ! |
fix #207
the unittest is basically same with
geonode/qgis_server/tests/test_views.py
from #330 .a slight modification is checking the thumbnails.
adding this unittest for covering the qgis-server side.
there exist
test_map_json
for geoserver backend.@lucernae i need you opinion about this PR. we can simply ignore this PR if it is unnecessary.