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
Bugfix validator so next links are followed the correct number of times #1318
Bugfix validator so next links are followed the correct number of times #1318
Conversation
…ink times instaed of a maximum of two times.
optimade/validator/validator.py
Outdated
check_next_link = check_next_link - 1 | ||
self._test_page_limit( | ||
next_response, | ||
check_next_link=check_next_link, | ||
multistage=check_next_link, | ||
previous_links=previous_links, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multistage is used in the decorated function (@test_case
) to prevent validator returning an error for each individual step of a recursive function, so I would leave that in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll also investigate a little why this is causing test failures just for the docker image atm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have processed your remarks and I think it should be good to merge now.
Codecov Report
@@ Coverage Diff @@
## master #1318 +/- ##
=======================================
Coverage 90.90% 90.90%
=======================================
Files 72 72
Lines 4364 4364
=======================================
Hits 3967 3967
Misses 397 397
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JPBergsma!
This PR corrects a bug in the validator which caused the next links to be followed at most two times.
I also removed the unused multistage argument.
Because I updated my dependencies, there is also a change in the openapi specs.