mozilla-services / python-dockerflow

A Python package to implement tools and helpers for Mozilla Dockerflow
https://python-dockerflow.readthedocs.io
Mozilla Public License 2.0
38 stars 22 forks source link

Provide standardized way to run checks and format results #84

Closed grahamalama closed 1 year ago

grahamalama commented 1 year ago

This PR provides functions and dataclasses in the dockerflow.checks package to run registered checks (both synchronously and asynchronously) and return the results of the checks in a standardized manner.

codecov-commenter commented 1 year ago

Codecov Report

Merging #84 (2939ec5) into main (0523a4e) will increase coverage by 0.54%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   97.80%   98.34%   +0.54%     
==========================================
  Files          18       18              
  Lines         591      605      +14     
  Branches       85       84       -1     
==========================================
+ Hits          578      595      +17     
+ Misses          9        7       -2     
+ Partials        4        3       -1     
Files Changed Coverage Δ
src/dockerflow/django/checks.py 100.00% <ø> (ø)
src/dockerflow/checks/__init__.py 100.00% <100.00%> (ø)
src/dockerflow/django/views.py 100.00% <100.00%> (+7.50%) :arrow_up:
src/dockerflow/flask/app.py 94.11% <100.00%> (-0.45%) :arrow_down:
src/dockerflow/sanic/app.py 100.00% <100.00%> (ø)

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

grahamalama commented 1 year ago

Looks like this PR needs some test tweaks to account for the changes. Going to start those now, but I wouldn't hate an early review.

I'm planning on landing this, and maybe a follow-on PR to centralize check registration as well before turning my attention back to the FastAPI integration, since I think these PRs will affect that implementation.

grahamalama commented 1 year ago

Closing this and recreating with the PR I was going to submit as a follow-on, but makes sense to add on top of this