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

Connect the app to postgres #60

Merged
merged 6 commits into from Jan 31, 2022
Merged

Connect the app to postgres #60

merged 6 commits into from Jan 31, 2022

Conversation

pozsa
Copy link
Member

@pozsa pozsa commented Jan 18, 2022

Using 2.0 sqlalchemy style for future compatibility.
The get_db function can be used as a dependency to inject a working
db session where it will be needed.

Using 2.0 sqlalchemy style for future compatibility.
The `get_db` function can be used as a dependency to inject a working
db session where it will be needed.
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2022

Codecov Report

Merging #60 (18d2f38) into main (071e0ce) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #60   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines           40        67   +27     
=========================================
+ Hits            40        67   +27     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

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

Impacted Files Coverage Δ
backend/app/config.py 100.00% <100.00%> (ø)
backend/app/database.py 100.00% <100.00%> (ø)
backend/app/routers/health.py 100.00% <100.00%> (ø)
backend/app/schemas/health.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 071e0ce...18d2f38. Read the comment docs.

@pozsa
Copy link
Member Author

pozsa commented Jan 20, 2022

@minottic wow.. I didn't expect codecov to detect that coverage drop :D
do we want 100% coverage? (I could get the coverage although the test would probably only check the type of information returned cause I don't see a way of getting the values right.)

@minottic
Copy link
Collaborator

yes, I think the type or the fact that they are > 0

@pozsa
Copy link
Member Author

pozsa commented Jan 21, 2022

I was testing this locally.. I believe we are running into this problem
nedbat/coveragepy#1082

If I run coverage run --concurrency=thread,greenlet --source=app -m pytest without any changes to the current code the reported coverage is 100%

I don't see an option to use the concurrency flag with pytest-cov though.

Should I just change the command to run the tests in the pipeline?

@pozsa
Copy link
Member Author

pozsa commented Jan 26, 2022

@minottic what do you think?

@minottic minottic self-requested a review January 31, 2022 08:09
@minottic
Copy link
Collaborator

sorry I did not realise until now it is out of date. I will re-review once updated

@pozsa pozsa merged commit 6cd47b5 into paulscherrerinstitute:main Jan 31, 2022
@pozsa pozsa deleted the db branch January 31, 2022 09:43
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

3 participants