Skip to content

newtask endpoint for pbclient API#34

Open
ppeczek wants to merge 4 commits into
Scifabric:masterfrom
themoonsheep:master
Open

newtask endpoint for pbclient API#34
ppeczek wants to merge 4 commits into
Scifabric:masterfrom
themoonsheep:master

Conversation

@ppeczek

@ppeczek ppeczek commented Nov 21, 2017

Copy link
Copy Markdown

Missing enpoint in pbclient API is getting a new task, selected by pybossa. Very similar to get tasks list

@ppeczek

ppeczek commented Nov 21, 2017

Copy link
Copy Markdown
Author

Forgot to write test. Update will come soon

@teleyinex

Copy link
Copy Markdown
Member

We never add it because we use that only from the front end :-) Good add! Once the tests pass, we will merge it and publish it. Please, increase the version number as well on the setup.py file.

@ppeczek

ppeczek commented Nov 22, 2017

Copy link
Copy Markdown
Author

We want to launch pybossa as a service, so we need to upgrade the client to cover most of the API. Do you think I should increase the version for each PR? And which part of the version?

@teleyinex

Copy link
Copy Markdown
Member

This one is a minor improvement, so go for x.x.Y :-) Then, if you change anything big, we can move it into x.X.x and if we do something muuuch bigger into X.x.x.

@ppeczek

ppeczek commented Nov 27, 2017

Copy link
Copy Markdown
Author

Please, don't rush with merging it. I made some enhancements. BTW the coveralls isn't in rush anyway 🤣

@teleyinex

Copy link
Copy Markdown
Member

Yes, Coveralls usually goes really slow or returns something not good. In any case, we keep it as a way of reviewing if we miss something important.

Comment thread pbclient/__init__.py
raise


def get_new_task(project_id, limit=1, offset=0, last_id=None):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I decided to drop params: limit, offset and last_id. These parameters are relevant only for getting multiple tasks. It just doesn't apply when you want to get a random task.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I need your opinion on this one: is it desired use case to send multiple new tasks at once?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes. It will be nice to add it. Basically think about this of getting a bunch of tasks for your user with only one request. It will save time and you can cache them.

@RaduCStefanescu

Copy link
Copy Markdown

Heya!
Any chance we might get a status on this PR? We are depending on it for our own project interfacing with PyBossa.
If any changes are still required, please let me know.

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.

3 participants