Cloud-CV / evalai-cli

:cloud: :rocket: Official EvalAI Command Line Tool
https://cli.eval.ai
BSD 3-Clause "New" or "Revised" License
55 stars 63 forks source link

Fix #205: Add functionality to reset authentication token and logout #233

Open nikochiko opened 4 years ago

nikochiko commented 4 years ago

Address #205

Objective:

To allow user to easily log out (i.e. reset existing authentication token) from the command line.

Changes proposed:

  1. Add reset_user_auth_token function in auth utils
  2. Add tests for reset_user_auth_token
  3. Add new command to logout:
    evalai logout

    4, Add functionality in set_token command to clear existing token with:

    evalai set_token clear_token

    Edit: Removed 4: functionality to clear existing token from set_token command.
    @RishabhJain2018 @vkartik97 @Ram81 Please review.

nikochiko commented 4 years ago

@vkartik97 Got it. Yes now that I think about it, it makes a lot of sense. I will make that change. P.S. Thanks for introducing this to me, will keep in mind! :+1:

nikochiko commented 4 years ago

@vkartik97 Any comments on the rest of the task? I have tried to make it consistent with the rest of the project, but the tests for utils was a new part. So what are your thoughts on the location of tests for auth utils? Currently, it is placed along with the other tests but as we will need tests for more utils (e.g. requests utils), should we create a new folder?