Skip to content
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

Static extract (PDF) without use_wms must embed the images #1612

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

jwkaltz
Copy link
Member

@jwkaltz jwkaltz commented Nov 2, 2022

For static extract (PDF) generation, when the PDF generation process shall not call the pyramid_oereb service to retrieve all the images (legend icons etc.), we need to embed the images within the extract.

Currently, the xml2pdf proxy contains a "use_wms" flag, but setting use_wms to false is only consistent when the extract contains images.

@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Merging #1612 (548e8f9) into master (1e8352c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1612   +/-   ##
=======================================
  Coverage   67.74%   67.75%           
=======================================
  Files         121      121           
  Lines        5038     5039    +1     
=======================================
+ Hits         3413     3414    +1     
  Misses       1625     1625           
Flag Coverage Δ
unittests 67.75% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyramid_oereb/core/views/webservice.py 86.66% <100.00%> (+0.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@voisardf voisardf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, but I did not test it locally as we do not use the case without WMS.
do you have a possibility to test it for a canton?

@jwkaltz
Copy link
Member Author

jwkaltz commented Nov 3, 2022

Code looks good to me, but I did not test it locally as we do not use the case without WMS. do you have a possibility to test it for a canton?

Partially, yes: I have tried this code change manually on the Glarus infrastructure, pyramid_oereb then does try to generate the extract with embedded images when use_wms = false. However, creating an extract WITHIMAGES currently generally fails at Glarus, but that's not directly related to this subject.

@jwkaltz jwkaltz merged commit 5f33404 into master Nov 8, 2022
@jwkaltz jwkaltz deleted the print_without_wms_must_use_images branch November 8, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants