Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/Surge SDK Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"project = surge.Project.create(\n",
" name=\"Categorize this website\",\n",
" payment_per_response=0.0,\n",
" private_workforce=True,\n",
" num_workers_per_task=3,\n",
" fields_template='{{company}}',\n",
" instructions=\"You will be asked to categorize a company.\",\n",
Expand Down
6 changes: 0 additions & 6 deletions surge/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def create(
cls,
name: str,
payment_per_response: float = None,
private_workforce: bool = False,
instructions: str = None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep accepting private_workforce for compatibility

For clients that still pass the previously documented private_workforce argument (including the example notebook before this change), this signature now raises TypeError: got an unexpected keyword argument 'private_workforce' before the SDK can create the project; positional callers also have later arguments shifted into the wrong parameters. If the field should no longer be sent to the API, keep the parameter as a deprecated no-op instead of removing it from the public method signature.

Useful? React with 👍 / 👎.

questions: list = None,
qualifications_required: list = None,
Expand All @@ -105,8 +104,6 @@ def create(
name (str): Name of the project.
payment_per_response (float, optional):
How much a worker is paid (in US dollars) for an individual response.
private_workforce (bool, optional):
Indicates if the project's tasks will be done by a private workforce.
instructions (str, optional): Instructions shown to workers describing how they should complete the task.
questions (list, optional): An array of question objects describing the questions to be answered.
qualifications_required (list, optional): Deprecated in favor of teams_required.
Expand Down Expand Up @@ -148,7 +145,6 @@ def create(

params = {
"name": name,
"private_workforce": private_workforce,
"instructions": instructions,
"questions": questions_json,
"qualifications_required": teams_required,
Expand Down Expand Up @@ -262,8 +258,6 @@ def list_copies(self, api_key: str = None):
def launch(self, api_key: str = None):
"""
Launches a project.
If work is being completed by the Surge workforce, you will be charged when the project launches
and your accounts neeeds to have sufficient funds before launching.

Returns:
project: new Project object with updated status
Expand Down
2 changes: 0 additions & 2 deletions tests/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ def test_init_complete():
"interrater_agreement": {
"What is this video?": 0.859154078549849
},
"private_workforce":
False,
"num_tasks_in_progress":
0,
"payment_per_response":
Expand Down
Loading