-
Notifications
You must be signed in to change notification settings - Fork 40
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
Check pagination links->next with validator #266
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
49612b9
Check pagination links->next with validator
ml-evs 185dc70
Separate docker config file for CI
ml-evs a8a24cf
Raise response errors if keys are missing in pagination response
ml-evs 2bf32af
Robustify absolute URL check with urllib
ml-evs aa914b9
Try using simplejson and fallback to json in validator
ml-evs 8d28119
Revert default arg in Dockerfile and enable debug mode
ml-evs 3452cb4
Revert to string manipulation instead of urljoin
ml-evs File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"debug": true, | ||
"default_db": "test_server", | ||
"base_url": "http://gh_actions_host:3213", | ||
"implementation": { | ||
"name": "Example implementation", | ||
"source_url": "https://github.com/Materials-Consortia/optimade-python-tools", | ||
"maintainer": {"email": "test@test.org"} | ||
}, | ||
"provider": { | ||
"name": "Example provider", | ||
"description": "Provider used for examples, not to be assigned to a real database", | ||
"prefix": "exmpl", | ||
"homepage": "https://example.com", | ||
"index_base_url": "http://gh_actions_host:3214" | ||
}, | ||
"provider_fields": { | ||
"structures": [ | ||
"band_gap", | ||
"chemsys" | ||
] | ||
}, | ||
"aliases": { | ||
"structures": { | ||
"id": "task_id", | ||
"chemical_formula_descriptive": "pretty_formula", | ||
"chemical_formula_reduced": "pretty_formula", | ||
"chemical_formula_anonymous": "formula_anonymous" | ||
} | ||
}, | ||
"length_aliases": { | ||
"structures": { | ||
"chemsys": "nelements" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do you still want to make sure the
scheme
is part of("http", "https")
or do we not care? If yes, here's a quick and dirty suggestion:Otherwise, fine 👍
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'm going to leave it as is, on the off-chance that an implementation provides a different scheme (presumably accidentally) then it will be obvious from the error spat out. Your suggested change would lead to the next request being e.g.
http://base_url.com/ssh://base_url.com?page_offset=5
, so I think it's clearer as is.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.
Sure. Then the docstring should probably have been updated, but fine.
Again, I just want to be really nitpicky with everything in the validator since (in my opinion) it should be usable for every and any implementation. I.e., it should be really specific in what it wants, while at the same time being very broad in scope.. not easy :)