Skip to content

Commit

Permalink
Merge branch 'master' into default_toc_length_config
Browse files Browse the repository at this point in the history
  • Loading branch information
voisardf authored Aug 29, 2024
2 parents c4b9261 + 86fe195 commit 5ac0b16
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Notes:
------
- This python package specifies the version numbers only of directly imported python packages. This approach may result in a build failure of older versions of the project if incompatibilities arise between imported packages over time. The build process of the master branch is regularly tested in an automatic process.

2.5.3
-----
- Provide a general WMS verify certificate option
- Library upgrade (shapely)

2.5.2
-----
- Add configuration Option to check certificate for external WMS. Default setting: True
Expand Down
8 changes: 4 additions & 4 deletions dev/config/pyramid_oereb.yml.mako
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,13 @@ pyramid_oereb:
fr: https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&STYLES=default&CRS=EPSG:2056&BBOX=2475000,1065000,2850000,1300000&WIDTH=493&HEIGHT=280&FORMAT=image/png&LAYERS=ch.swisstopo-vd.amtliche-vermessung
layer_index: 0
layer_opacity: 1.0
# Option to check certificate for external WMS. Default and recommended setting: True
verify_certificate: True
plan_for_land_register_main_page:
# WMS URL to query the plan for land register specially for static extracts overview page
reference_wms:
de: https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&STYLES=default&CRS=EPSG:2056&BBOX=2475000,1065000,2850000,1300000&WIDTH=493&HEIGHT=280&FORMAT=image/png&LAYERS=ch.swisstopo-vd.amtliche-vermessung
fr: https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&STYLES=default&CRS=EPSG:2056&BBOX=2475000,1065000,2850000,1300000&WIDTH=493&HEIGHT=280&FORMAT=image/png&LAYERS=ch.swisstopo-vd.amtliche-vermessung
layer_index: 0
layer_opacity: 1.0
# Option to check certificate for external WMS. Default and recommended setting: True
verify_certificate: True
visualisation:
method: pyramid_oereb.core.hook_methods.produce_sld_content
# Note: these parameters must fit to the attributes provided by the RealEstateRecord!!!!
Expand Down Expand Up @@ -1420,6 +1416,10 @@ pyramid_oereb:
transfer_code: Hinweis
extract_code: Hint

# Option to check certificate for external WMS calls in standard and oereblex themes.
# Default and recommended setting: True
verify_certificate_wms: True

# The error message returned if an error occurs when requesting a static extract
# The content of the message is defined in the specification (document "Inhalt und Darstellung des statischen Auszugs")
static_error_message:
Expand Down
7 changes: 7 additions & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ call for the pdf extract in most cases. This value should be set if >95% of the
pages.
Default setting: 2

Version 2.5.3
-------------
Feature and maintenance release:

* Provide a general WMS verify certificate option
* Library upgrade (shapely)

Version 2.5.2
-------------
Feature and maintenance release:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyramid_oereb"
version = "2.5.2"
version = "2.5.3"
description = "pyramid_oereb, extension for pyramid web frame work to provide a basic server part for the oereb project"

classifiers=[
Expand Down
3 changes: 1 addition & 2 deletions pyramid_oereb/contrib/data_sources/standard/sources/plr.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ def from_db_to_view_service_record(self, view_service_from_db, legend_entry_reco
Config.get('srid'),
Config.get('proxies'),
legends=legend_entry_records,
# Note: our standard database model does not contain an option to override the verify_certificate
verify_certificate=True
verify_certificate=Config.get('verify_certificate_wms', True)
)
return view_service_record

Expand Down
3 changes: 2 additions & 1 deletion pyramid_oereb/contrib/data_sources/swisstopo/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def read(self, params, street_name, zip_code, street_number):
self._geoadmin_url,
params=request_params,
proxies=self._proxies,
headers=headers
headers=headers,
timeout=4
)
if response.status_code == requests.codes.ok:
rp = Reprojector()
Expand Down
2 changes: 1 addition & 1 deletion pyramid_oereb/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ def municipality_by_fosnr(fosnr):
if municipality.fosnr == fosnr:
return municipality
raise ConfigurationError(
'No municipalitiy with fosnr {} could be found in the configured municipalities ({}).'.format(
'No municipality with fosnr {} could be found in the configured municipalities ({}).'.format(
fosnr,
Config.municipalities
)
Expand Down
4 changes: 2 additions & 2 deletions pyramid_oereb/core/readers/real_estate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def read(self, params, nb_ident=None, number=None, egrid=None, geometry=None):
Config.get('default_language'),
Config.get('srid'),
Config.get('proxies'),
verify_certificate=plan_for_land_register_config.get('verify_certificate', True)
verify_certificate=Config.get('verify_certificate_wms', True)
)

plan_for_land_register_main_page_config = Config.get_plan_for_land_register_main_page_config()
Expand All @@ -75,7 +75,7 @@ def read(self, params, nb_ident=None, number=None, egrid=None, geometry=None):
Config.get('default_language'),
Config.get('srid'),
Config.get('proxies'),
verify_certificate=plan_for_land_register_main_page_config.get('verify_certificate', True)
verify_certificate=Config.get('verify_certificate_wms', True)
)

self._source_.read(params, nb_ident=nb_ident, number=number, egrid=egrid, geometry=geometry)
Expand Down

0 comments on commit 5ac0b16

Please sign in to comment.