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

Provide standardized way to run checks and format results #84

Closed
wants to merge 9 commits into from

Conversation

grahamalama
Copy link
Contributor

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
Copy link

codecov-commenter commented Aug 7, 2023

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%) ⬆️
src/dockerflow/flask/app.py 94.11% <100.00%> (-0.45%) ⬇️
src/dockerflow/sanic/app.py 100.00% <100.00%> (ø)

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

@grahamalama
Copy link
Contributor Author

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.

- use client instead of request factory
- automatically clear registry, and don't handle Django version <2
- test response content when debug is enabled and disabled
@grahamalama grahamalama requested review from leplatrem and removed request for jwhitlock August 9, 2023 17:46
@grahamalama
Copy link
Contributor Author

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

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.

None yet

2 participants