Skip to content

Commit 6e4a957

Browse files
committed
bump version to 3.2.0
1 parent 7039995 commit 6e4a957

6 files changed

Lines changed: 51 additions & 36 deletions

File tree

isogeo.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -335,18 +335,6 @@ def onClosePlugin(self):
335335
qsettings.setValue(
336336
"isogeo/settings/portal_base_url", self.form_mng.input_portal_url.text()
337337
)
338-
# save prefered PostGIS database connections
339-
qsettings.setValue(
340-
"isogeo/settings/pref_pgdb_conn",
341-
self.form_mng.results_mng.db_mng.li_pref_pgdb_conn,
342-
)
343-
# save invalid PostGIS database connections
344-
logger.debug("*=====* {}".format(self.form_mng.results_mng.db_mng.li_invalid_pgdb_conn))
345-
qsettings.setValue(
346-
"isogeo/settings/invalid_pgdb_conn",
347-
self.form_mng.results_mng.db_mng.li_invalid_pgdb_conn,
348-
)
349-
logger.debug("*=====* {}".format(qsettings.value("isogeo/settings/invalid_pgdb_conn")))
350338
# save cache
351339
self.form_mng.results_mng.cache_mng.dumper()
352340
# disconnects
@@ -367,7 +355,7 @@ def unload(self):
367355
self.iface.removePluginWebMenu(self.tr("&Isogeo"), action)
368356
try:
369357
self.iface.mainWindow().statusBar().removeWidget(self.bar)
370-
except:
358+
except Exception:
371359
pass
372360
self.iface.removeToolBarIcon(action)
373361
# remove the toolbar

metadata.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name=Isogeo
1111
qgisMinimumVersion=3.4
1212
qgisMaximumVersion=3.99
1313
description=Isogeo search engine within QGIS
14-
version=3.1.1
14+
version=3.2.0
1515
author=Isogeo
1616
email=projects+qgis@isogeo.com
1717

@@ -24,7 +24,7 @@ repository=https://github.com/isogeo/isogeo-plugin-qgis
2424
# Recommended items:
2525

2626
# Uncomment the following line and add your changelog:
27-
changelog=- <strong>3.1.1:</strong> see the <a href="https://github.com/isogeo/isogeo-plugin-qgis/releases/tag/3.1.1">dedicated GitHub release</a><br>- <strong>3.1.0:</strong> see the <a href="https://github.com/isogeo/isogeo-plugin-qgis/releases/tag/3.1.0">dedicated GitHub release</a><br>- <strong>3.0.2:</strong> better SSL errors handling<br>- <strong>3.0.1:</strong> better authentication management<br>- <strong>3.0.0:</strong> first stable version compatible with QGIS 3
27+
changelog=- <strong>3.2.0:</strong> see the <a href="https://github.com/isogeo/isogeo-plugin-qgis/releases/tag/3.2.0">dedicated GitHub release</a><br>- <strong>3.1.1:</strong> see the <a href="https://github.com/isogeo/isogeo-plugin-qgis/releases/tag/3.1.1">dedicated GitHub release</a><br>- <strong>3.1.0:</strong> see the <a href="https://github.com/isogeo/isogeo-plugin-qgis/releases/tag/3.1.0">dedicated GitHub release</a><br>- <strong>3.0.2:</strong> better SSL errors handling<br>- <strong>3.0.1:</strong> better authentication management<br>
2828

2929
# Tags are comma separated with spaces allowed
3030
tags=REST API,catalog,search,explore,webservices,metadata,open data,INSPIRE

modules/layer/add_layer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from ..tools import IsogeoPlgTools
2525
from .metadata_sync import MetadataSynchronizer
2626
from ..layer.geo_service import GeoServiceManager
27-
from ..layer.database import DataBaseManager
2827

2928
# ############################################################################
3029
# ########## Globals ###############

modules/layer/database.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@
66
from configparser import ConfigParser
77
from pathlib import Path
88
from os import environ
9-
from functools import partial
109

1110
# PyQT
1211
from qgis.PyQt.QtCore import QSettings, Qt
1312
from qgis.PyQt.QtGui import QIcon, QCursor
1413
from qgis.PyQt.QtWidgets import (
15-
QTableWidgetItem,
1614
QComboBox,
1715
QLabel,
1816
QAbstractButton,
19-
QDialogButtonBox,
2017
)
2118

2219
# PyQGIS

modules/layer/geo_service.py

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,21 @@ def check_ogc_service(
329329
service_dict["reachable"] = 0
330330
service_dict["error"] = error_msg
331331
except requests.exceptions.SSLError as e:
332-
logger.warning("SSL Error raised trying to connect to {} service {}: {}".format(
333-
service_type, url, e
334-
))
332+
logger.warning(
333+
"SSL Error raised trying to connect to {} service {}: {}".format(
334+
service_type, url, e
335+
)
336+
)
335337
try:
336338
auth = Authentication(verify=False)
337339
service = service_connector(url=url, version=service_version, auth=auth)
338340
service_dict["reachable"] = 1
339341
except Exception as e:
340-
logger.warning("Error raised trying to use owslib Authentication module : {}".format(e))
342+
logger.warning(
343+
"Error raised trying to use owslib Authentication module : {}".format(
344+
e
345+
)
346+
)
341347
try:
342348
service_dict = self.parse_ogc_xml(service_type, service_dict)
343349
return 1, service_dict
@@ -423,7 +429,6 @@ def build_wfs_url(self, api_layer: dict, srv_details: dict):
423429
)
424430
else:
425431
wfs_dict = wfs_cached_dict[srv_details.get("path")]
426-
logger.debug("*=====* {}".format(wfs_dict))
427432
# local variables
428433
wfs_url_getcap = wfs_dict.get("getCap_url")
429434
wfs_url_base = wfs_dict.get("base_url")
@@ -467,21 +472,36 @@ def build_wfs_url(self, api_layer: dict, srv_details: dict):
467472
return 0, error_msg
468473

469474
# check if GetFeature and DescribeFeatureType operation are available
470-
if not hasattr(wfs, "getfeature") and not wfs_dict.get("GetFeature_isAvailable"):
475+
if not hasattr(wfs, "getfeature") and not wfs_dict.get(
476+
"GetFeature_isAvailable"
477+
):
471478
return 0, "GetFeature operation not available in: {}".format(wfs_url_getcap)
472479
else:
473480
logger.info("GetFeature available")
474481
pass
475482

476483
# SRS definition
477484
if wfs_dict.get("manual"):
478-
featureType_elem = [elem for elem in wfs.iter() if "FeatureType" in elem.tag and any(layer_typename in subelem.text for subelem in elem)]
485+
featureType_elem = [
486+
elem
487+
for elem in wfs.iter()
488+
if "FeatureType" in elem.tag
489+
and any(layer_typename in subelem.text for subelem in elem)
490+
]
479491
if len(featureType_elem):
480492
featureType = featureType_elem[0]
481-
srs_text = [subelem.text for subelem in featureType if "DefaultSRS" in subelem.tag][0]
493+
srs_text = [
494+
subelem.text
495+
for subelem in featureType
496+
if "DefaultSRS" in subelem.tag
497+
][0]
482498
srs = "EPSG:" + srs_text.split("EPSG:")[-1]
483499
else:
484-
logger.warning("Unable to retrieve appropriate SRS for {} layer.".format(layer_typename))
500+
logger.warning(
501+
"Unable to retrieve appropriate SRS for {} layer.".format(
502+
layer_typename
503+
)
504+
)
485505
srs = ""
486506
else:
487507
available_crs_options = [
@@ -546,8 +566,16 @@ def build_wms_url(self, api_layer: dict, srv_details: dict):
546566
)
547567
return 0, error_msg
548568
elif wms_dict.get("manual"):
549-
wms_lyr = [elem for elem in wms.iter() if elem.tag.endswith("Layer") and any(subelem.text == api_layer_id for subelem in elem if "Name" in subelem.tag)][0]
550-
logger.debug("*=====* {}".format(wms_lyr))
569+
wms_lyr = [
570+
elem
571+
for elem in wms.iter()
572+
if elem.tag.endswith("Layer")
573+
and any(
574+
subelem.text == api_layer_id
575+
for subelem in elem
576+
if "Name" in subelem.tag
577+
)
578+
][0]
551579
else:
552580
wms_lyr = wms[api_layer_id]
553581

@@ -597,14 +625,17 @@ def build_wms_url(self, api_layer: dict, srv_details: dict):
597625
srs = self.choose_appropriate_srs(crs_options=[])
598626
else:
599627
srs = self.choose_appropriate_srs(crs_options=wms_lyr.crsOptions)
600-
logger.debug("*=====* {}".format(srs))
601628

602629
# BBOX parameter
603-
if hasattr(wms_lyr, "boundingBoxWGS84") and any(txt in srs for txt in ["WGS84", "4326"]):
630+
if hasattr(wms_lyr, "boundingBoxWGS84") and any(
631+
txt in srs for txt in ["WGS84", "4326"]
632+
):
604633
li_coords = [str(coord) for coord in wms_lyr.boundingBoxWGS84]
605634
bbox = ",".join(li_coords)
606635
logger.info("Let's use WGS84 bbox : {}".format(bbox))
607-
elif hasattr(wms_lyr, "boundingBox") and any(srs in str(elem) for elem in wms_lyr.boundingBox):
636+
elif hasattr(wms_lyr, "boundingBox") and any(
637+
srs in str(elem) for elem in wms_lyr.boundingBox
638+
):
608639
li_coords = [
609640
str(coord)
610641
for coord in wms_lyr.boundingBox
@@ -631,7 +662,9 @@ def build_wms_url(self, api_layer: dict, srv_details: dict):
631662
"BBOX": bbox,
632663
}
633664

634-
if "&" in wms_url_base: # for case when there is already params into base url
665+
if (
666+
"&" in wms_url_base
667+
): # for case when there is already params into base url
635668
wms_url_params["url"] = "{}?{}".format(
636669
wms_url_base.split("?")[0], quote(wms_url_base.split("?")[1])
637670
)

modules/metadata_display.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
# Standard library
55
import logging
6-
import processing
76
from datetime import datetime
87

98
# PyQGIS
@@ -12,7 +11,6 @@
1211
QgsMessageLog,
1312
QgsVectorLayer,
1413
QgsPointXY,
15-
QgsRectangle,
1614
QgsFeature,
1715
QgsGeometry,
1816
QgsRasterLayer,

0 commit comments

Comments
 (0)