CouncilDataProject / cdp-backend

Data storage utilities and processing pipelines used by CDP instances.
https://councildataproject.org/cdp-backend
Mozilla Public License 2.0
22 stars 26 forks source link

feature/add-supporting-file-resiliency #187

Closed evamaxfield closed 2 years ago

evamaxfield commented 2 years ago

Link to Relevant Issue

This pull request resolves #179

Original PR: #186

Description of Changes

This PR adds a try_url call for the supporting_file.uri used before the creation / upload of a matter file (the try is done before these actions occur). If a LookupError is thrown, then perform a usual log.

@liamphmurphy only change I made from your PR was mocking the try_url function instead of resource_exists and I think the big mistake was actually that the pipeline.run wasn't within the context of the mocked function.

codecov[bot] commented 2 years ago

Codecov Report

Merging #187 (1c249e4) into main (5888bca) will increase coverage by 0.01%. The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
+ Coverage   94.55%   94.56%   +0.01%     
==========================================
  Files          50       50              
  Lines        2607     2615       +8     
==========================================
+ Hits         2465     2473       +8     
  Misses        142      142              
Impacted Files Coverage Δ
cdp_backend/pipeline/event_gather_pipeline.py 85.92% <85.71%> (+0.21%) :arrow_up:
...ckend/tests/pipeline/test_event_gather_pipeline.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5888bca...1c249e4. Read the comment docs.