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
rest: pagination #319
rest: pagination #319
Conversation
110aee4
to
23647a8
Compare
85c1c08
to
b8127b1
Compare
) | ||
) | ||
|
||
def paginate(query_or_list): |
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.
What do you think of adding a docstring to this method explaining that the query it might take is an SQLAlchemy query object? I think we might be confused with this function in the future if we don't explain it well.
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.
Yeah, definitely there's some technical debt in this part. I can add the docstring, no problem. I was also thinking about creating a Pagination
class and populate instances of it to be returned in this function, instead of using a simple dictionary, what do you think? It can be another issue
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.
For me, it is fine as it is, as long as it is explained. We can create a separate issue for refactoring it and now is the best time as you have it fresh :)
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.
* Paginates get_workflows endpoint * Installs webargs and removes Flask-SQLAlchemy closes reanahub/reana-server#180
Paginates job logs actually.
c7242f2
to
a0c69d4
Compare
e67823f
to
e0cec85
Compare
e0cec85
to
8537607
Compare
closes reanahub/reana-server#180