-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix #119: Add command & feature for Creating challenge. #149
base: master
Are you sure you want to change the base?
Conversation
@RishabhJain2018 @deshraj Please review. Thanks! @isht3 |
@@ -1,6 +1,8 @@ | |||
import json | |||
import responses | |||
|
|||
import os |
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.
@KhalidRmb can you arrange the imports in lexicographic order
@@ -1,6 +1,8 @@ | |||
import json | |||
import responses | |||
|
|||
import os |
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.
Same here
|
||
@responses.activate | ||
def test_create_challenge_when_id_is_not_valid(self): | ||
expected = ("Could not establish a connection to EvalAI." |
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.
@KhalidRmb not sure if this is the correct message for invalid challenge id, user should know the mistake is in challenge id. @RishabhJain2018 your input?
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.
I think he is referring to host team id
. Let him confirm first.
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.
I am referring to the host team ID here. For a host id invalid message to be displayed, the API must send a message back saying why creation failed. Based on that we must modify the cli code. @RishabhJain2018 @Ram81
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.
Yes, I was referring to host team id
echo(err) | ||
sys.exit(1) | ||
except requests.exceptions.RequestException as err: | ||
echo( |
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.
@KhalidRmb can we change this to a message like invalid host team id
if the issue is with team id otherwise the request error message
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.
I think this will require modification in the API, since there's no code to send an apt response for invalid host id here: https://github.com/Cloud-CV/EvalAI/blob/d5f28ae941dae1e50e623a7b880fefbacea3ef4b/apps/challenges/views.py#L606
Based on it, we can modify the cli code.
@Ram81 PTAL. |
Fixes #119
Adds a subcommand to the
challenges
command to create the challenge using the Host team ID and a Zip file.Usage:
evalai challenges create --file FILE TEAM
where FILE is the zip file and TEAM is the Host team ID.