bonilab/PSU-CIDD-MaSim-Support

Update study manager to allow deletion, renaming, argument help

rjzupkoii opened this issue · 0 comments

Now that the study manager (formerly addStudy.py) allows the user to add and list studies, there needs to be away of deleting studies from the database. The script needs to be updated to do the following:

  1. Allow the user to delete a study when supplied with the database id for the study. The database provides referential integrity so deleting a study that is in use is not allowed, and the user should see a useful error message when a referential integrity violation occurs (e.g., "The study cannot be deleted since it is in use.").
  2. Allow the user to rename a study when supplied with the database id for the study. The database enforces unique study names, but the user should not get the default error from the database (e.g., A general database error occurred: duplicate key value violates unique constraint "study_name_key").
  3. The help messaging of argparse should be leveraged so that additional help information is provided.