Skip to content
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

Switched CLI to Cement and improved error handling + logging facilities (fixes #216 and fixes #219) #289

Merged
merged 31 commits into from
Nov 1, 2018

Conversation

ChrisTimperley
Copy link
Collaborator

@ChrisTimperley ChrisTimperley commented Oct 31, 2018

  • Switches the backend from argparse to cement.
  • Writes individual log files for each session to ~/.bugzoo/logs
  • Adds prettier error handling to CLI:
validating bug: cool


================================================================================
An unexpected error occurred during execution:

  KeyError('cool',)

See log file for details: /home/chris/.bugzoo/logs/2018-10-31_18:25:29.bugzoo.log
================================================================================
An error occurred during execution:

  no bug found with name: cool

See log file for details: /home/chris/.bugzoo/logs/2018-10-31_18:37:04.bugzoo.log

* added super minimal cement-based CLI

* added basic bug list command to cement CLI

* added -q option to bug list command

* updated force parameter to True for bug download

* added upload and download commands to bug CLI

* updated BugManager to set force to True

* added uninstall command to cement CLI

* added bug coverage method to cement CLI

* added bug validate command to cement CLI

* added commented-out code for --installed and --uninstalled flags to bug list command

* added basic source group to cement CLI

* added source add command to cement CLI

* added source update command to cement CLI

* added __delitem__ to source manager

* added source remove command to cement CLI

* ported tool commands to cement CLI

* ported container commands to cement CLI

* finished porting existing CLI to cement
@ChrisTimperley ChrisTimperley changed the title WIP: Switched CLI to Cement and improved error handling + logging facilities (fixes #216) Switched CLI to Cement and improved error handling + logging facilities (fixes #216) Oct 31, 2018
@ChrisTimperley ChrisTimperley changed the title Switched CLI to Cement and improved error handling + logging facilities (fixes #216) Switched CLI to Cement and improved error handling + logging facilities (fixes #216 and fixes #219) Oct 31, 2018
@ChrisTimperley ChrisTimperley changed the title Switched CLI to Cement and improved error handling + logging facilities (fixes #216 and fixes #219) WIP: Switched CLI to Cement and improved error handling + logging facilities (fixes #216 and fixes #219) Oct 31, 2018
@ChrisTimperley ChrisTimperley changed the title WIP: Switched CLI to Cement and improved error handling + logging facilities (fixes #216 and fixes #219) Switched CLI to Cement and improved error handling + logging facilities (fixes #216 and fixes #219) Oct 31, 2018
bugzoo/cli/app.py Show resolved Hide resolved
bugzoo/cli/app.py Show resolved Hide resolved
bugzoo/cli/controllers/bug.py Show resolved Hide resolved
bugzoo/cli/controllers/container.py Show resolved Hide resolved
bugzoo/cli/controllers/container.py Show resolved Hide resolved
tool = tools[name_tool]
except KeyError:
raise exceptions.ToolNotFound(name_tool)
tools.uninstall(tool, force=force)
Copy link
Member

Choose a reason for hiding this comment

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

Does this also removes the image? I was never a fan of build and uninstall. It should either be install and uninstall or build and remove.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fair point. So, we don't use install any more because it's not clear whether the image is being downloaded or built from scratch. That does make uninstall a weird verb; remove is a better alternative. 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay. I've renamed tool uninstall with tool rm and tool remove, and bug uninstall with bug rm and bug remove.

@ChrisTimperley ChrisTimperley merged commit 56092dc into master Nov 1, 2018
@ChrisTimperley ChrisTimperley deleted the staging-v2.2 branch November 1, 2018 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants