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

rest: pagination #319

Merged
merged 5 commits into from Jul 22, 2020
Merged

Conversation

mvidalgarcia
Copy link
Member

@mvidalgarcia mvidalgarcia marked this pull request as ready for review July 15, 2020 11:03
@mvidalgarcia mvidalgarcia force-pushed the rs/180-pagination branch 2 times, most recently from 85c1c08 to b8127b1 Compare July 20, 2020 12:33
)
)

def paginate(query_or_list):
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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 :)

Copy link
Member Author

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.
@mvidalgarcia mvidalgarcia force-pushed the rs/180-pagination branch 2 times, most recently from c7242f2 to a0c69d4 Compare July 22, 2020 09:56
@mvidalgarcia mvidalgarcia force-pushed the rs/180-pagination branch 2 times, most recently from e67823f to e0cec85 Compare July 22, 2020 12:46
@diegodelemos diegodelemos merged commit 8537607 into reanahub:master Jul 22, 2020
@mvidalgarcia mvidalgarcia deleted the rs/180-pagination branch July 22, 2020 12:59
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.

implementation: pagination
2 participants