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

Always print summary as last thing in validation #700

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

CasperWA
Copy link
Member

Fixes #699.

This minor change ensures the print_summary() method is always called before returning out of the validate_implementation() method.
Two changes were needed:

  • Add method call to as_type "branch".
  • Move around order of setting the valid property and printing the summary for the "no base info-branch".

I'm not completely sure about the latter change, but it seems to me the valid property is used in the printed summary, hence I thought it best to switch these statements around?

@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #700 (44fd911) into master (f9d3b8a) will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #700   +/-   ##
=======================================
  Coverage   93.18%   93.18%           
=======================================
  Files          61       61           
  Lines        3361     3362    +1     
=======================================
+ Hits         3132     3133    +1     
  Misses        229      229           
Flag Coverage Δ
project 93.18% <50.00%> (+<0.01%) ⬆️
validator 66.15% <50.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
optimade/validator/validator.py 82.31% <50.00%> (+0.03%) ⬆️

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 f9d3b8a...44fd911. Read the comment docs.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @CasperWA, could you add a check to the end of tests.test_server_validation.test_as_type_with_validator?

@CasperWA
Copy link
Member Author

CasperWA commented Feb 10, 2021

I did something. I don't know if it's exactly what you had in mind?

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Merge/release as you please

@CasperWA CasperWA merged commit fcb385a into master Feb 10, 2021
@CasperWA CasperWA deleted the try-as_type-fix-validator branch February 10, 2021 14:40
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.

When using --as-type in validator, one does not get a summary (--json doesn't work)
2 participants