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 page_above/below strings rather than ints #1529

Merged
merged 3 commits into from Feb 27, 2023

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Feb 23, 2023

This looks like a simple oversight on our side when we first created these models.

page_below and page_above should instead refer to the ID values that the query should be performed relative to.

Annoyingly this PR also reorders some fields in the OpenAPI spec that keep getting jumbled (see #1429). I think this PR at least fixes them back to being alphabetical, but we should make sure we don't accept PRs that reorder this in future.

@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #1529 (af0036a) into master (c3ed95d) will not change coverage.
The diff coverage is n/a.

❗ Current head af0036a differs from pull request most recent head fd64cfd. Consider uploading reports for the commit fd64cfd to get more accurate results

@@           Coverage Diff           @@
##           master    #1529   +/-   ##
=======================================
  Coverage   91.10%   91.10%           
=======================================
  Files          74       74           
  Lines        4519     4519           
=======================================
  Hits         4117     4117           
  Misses        402      402           
Flag Coverage Δ
project 91.10% <ø> (ø)
validator 90.99% <ø> (ø)

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

Impacted Files Coverage Δ
optimade/server/query_params.py 98.27% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ml-evs
Copy link
Member Author

ml-evs commented Feb 23, 2023

Might still want to adjust the default values here

Copy link
Contributor

@JPBergsma JPBergsma left a comment

Choose a reason for hiding this comment

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

I think there are further references to page_above and page_below on lines 146 to 151 in query_params.py These should be updated as well.

@ml-evs ml-evs force-pushed the ml-evs/fix_value_based_pagination_schema branch from af0036a to fd64cfd Compare February 27, 2023 11:57
@ml-evs ml-evs added bug Something isn't working schema Concerns the schema models server Issues pertaining to the example server implementation labels Feb 27, 2023
@ml-evs ml-evs merged commit 27f38e7 into master Feb 27, 2023
@ml-evs ml-evs deleted the ml-evs/fix_value_based_pagination_schema branch February 27, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working schema Concerns the schema models server Issues pertaining to the example server implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants