mtth/azkaban

Create and Delete of Projects

Closed this issue · 3 comments

azkaban (create | delete)

create and delete should return a user prompt to complete action by filling in project name and description.

Implemented in the dev branch. Unit tests are not really unit tests however, as Azkaban returns no response for a successful create and always returns a 200 code HTML page for delete (error messages are baked into the HTML response).

mtth commented

Awesome!

A few quick comments:

  • create and delete should use self.name instead of asking for a name parameter. Right now they might as well be static methods.
  • Azkaban throws an error when uploading to a non existing project so you could probably use that to test existence.
  • What was the getuser() bug?
  • Maybe add the -c --create option we talked about for upload that will create the project if necessary before uploading.
  • Good point, i'll instantiate a project with the name from the prompt and call methods on it.
  • I'll see if I can leverage that for the existence test, right now I'm uploading the same project twice and checking for a duplicate error.
  • will add the upload --create option, should be pretty straightforward.
  • the getuser() bug was that, my user name was not getting pulled when my azkabanrc did not have a default username set. On comparison with the old azkanban on master there was a line missing which called getuser right before calling getpass (check the commit log)