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

Start_index and depagination #33

Merged
merged 3 commits into from
May 23, 2018
Merged

Start_index and depagination #33

merged 3 commits into from
May 23, 2018

Conversation

tcezard
Copy link

@tcezard tcezard commented May 11, 2018

This PR fixes start_index which now only specify the first element return. A new parameter nb_page specify how many pages to return.
nb_page=-1 which is default return all pages available from the start_index
fixes #32

…option `nb_page` specify how many pages should be added after.
@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 78.706% when pulling f5b602c on fix_start_index into d73f5b7 on master.

@coveralls
Copy link

coveralls commented May 11, 2018

Coverage Status

Coverage increased (+1.4%) to 78.706% when pulling df7f1f4 on fix_start_index into d73f5b7 on master.

@jonathandixon
Copy link

jonathandixon commented May 11, 2018

Setting nb_page to -1 or 0 will return all pages from the start_index, which is fine but maybe it should be documented.

BTW, thank you for this package. It makes working with Clarity LIMS much easier.

@@ -560,14 +582,15 @@ def _get_params_udf(self, udf=dict(), udtname=None, udt=dict()):
result["udt.%s" % key] = value
return result

def _get_instances(self, klass, add_info=None, params=dict()):
def _get_instances(self, klass, add_info=None, nb_page=-1, params=dict()):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this nb_pages, to reaffirm that we're returning multiple pages, rather than one specific page?

@tcezard tcezard merged commit 9d6d215 into master May 23, 2018
@tcezard tcezard deleted the fix_start_index branch May 25, 2018 20:28
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.

Lims _get_instances() returns empty array when start_index is set.
4 participants