Skip to content

Add ags_log endpoint#101

Merged
KoalaGeo merged 54 commits intomainfrom
GWBV-endpoint
Apr 25, 2023
Merged

Add ags_log endpoint#101
KoalaGeo merged 54 commits intomainfrom
GWBV-endpoint

Conversation

@KoalaGeo
Copy link
Copy Markdown
Collaborator

@KoalaGeo KoalaGeo commented Apr 13, 2023

Requests synthetic PDF log from Groundhog Web Viewer API (https://webservices.bgs.ac.uk/GWBV/viewborehole?loca_id=20200204094811691620) using BGS Loca ID.

Currently gets a 200 response but PDF doesn't display. Tried as both inline & attachment but PDF files are only 1kb - it's not actually pulling the PDF from the web viewer.

Addresses #100

Requests synthetic PDF log from Groundhog Web Viewer API
attachment response now 200
@KoalaGeo KoalaGeo requested a review from ximenesuk April 13, 2023 09:29
Comment thread app/routes.py Outdated
Comment thread Dockerfile Outdated
@ximenesuk

This comment was marked as resolved.

@KoalaGeo

This comment was marked as resolved.

@KoalaGeo KoalaGeo marked this pull request as draft April 13, 2023 16:07
@KoalaGeo
Copy link
Copy Markdown
Collaborator Author

It would be good to add a basic integration test too.

Started with 47e4298 but getting error TypeError: 'function' object does not support the asynchronous context manager protocol

@KoalaGeo

This comment was marked as resolved.

@KoalaGeo KoalaGeo marked this pull request as ready for review April 19, 2023 15:33
Comment thread test/integration/test_api.py Outdated
KoalaGeo

This comment was marked as resolved.

@KoalaGeo KoalaGeo marked this pull request as draft April 24, 2023 16:08
@KoalaGeo KoalaGeo marked this pull request as ready for review April 24, 2023 20:55
@volcan01010
Copy link
Copy Markdown
Collaborator

I've updated the function and tests to handle cases where the upstream API is offline or returning a 500 error. In this case, we will also return a 500 with a helpful message.

I'm happy for this to be merged now.

@KoalaGeo KoalaGeo merged commit 80ad948 into main Apr 25, 2023
@KoalaGeo KoalaGeo deleted the GWBV-endpoint branch April 25, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Endpoint for Groundhog Borehole Log Viewer API

3 participants