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

Make the example for --as_type more similar to a real use case #398

Merged
merged 2 commits into from Jul 10, 2020

Conversation

merkys
Copy link
Member

@merkys merkys commented Jul 10, 2020

This PR attempts to provide more "real-world" usage example of --as_type: single entry response should be validated as such. Prior to this change, single entry response was shown to be validated as a collection, what would definitely fail.

@merkys merkys requested review from CasperWA and ml-evs July 10, 2020 13:25
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 @merkys!

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #398 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #398   +/-   ##
=======================================
  Coverage   89.62%   89.62%           
=======================================
  Files          55       55           
  Lines        2459     2459           
=======================================
  Hits         2204     2204           
  Misses        255      255           
Flag Coverage Δ
#unittests 89.62% <ø> (ø)
Impacted Files Coverage Δ
optimade/validator/__init__.py 10.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 b93ff20...e1133ef. Read the comment docs.

@ml-evs ml-evs merged commit ec825ef into master Jul 10, 2020
@ml-evs ml-evs deleted the merkys/fix-validator-help branch July 10, 2020 15:15
@CasperWA
Copy link
Member

Yeah. The issue with this is that the type (even for a single entry endpoint object) is still structures. But I guess we should clarify this in the documentation of the validator. I think having the difference in plural vs. singular here makes a lot of sense.

@ml-evs
Copy link
Member

ml-evs commented Jul 10, 2020

Yeah. The issue with this is that the type (even for a single entry endpoint object) is still structures. But I guess we should clarify this in the documentation of the validator. I think having the difference in plural vs. singular here makes a lot of sense.

Agreed, I'm going to add a validator docs section and further improve the help strings. In an upcoming PR, which I guess is a pre-overhaul before we actually overhaul the validator :P

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