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

Implementing logging and debug flag to simplify exception messages #56

Open
fmaguire opened this issue Mar 23, 2021 · 2 comments
Open
Labels
good first issue Good for newcomers help wanted Extra attention is needed nice to have

Comments

@fmaguire
Copy link
Member

To handle concerns raised by @cimendes in #39 and try and make issues with input selection clearer to users e.g., #54 we should add proper use of logging library, default to simple error messages and add a --debug flag to argparse which displays the full traceback.

  1. Add boolean debug flag in the generic CLI parser (default False):
    https://github.com/pha4ge/hAMRonization/blob/master/hAMRonization/Interfaces.py#L217

  2. Set up the logging levels based on args.debug: https://github.com/pha4ge/hAMRonization/blob/master/hAMRonization/Interfaces.py#L257 (e.g., https://stackoverflow.com/questions/14097061/easier-way-to-enable-verbose-logging)

  3. Add wrong input file exception using logging library, specifically add try: and except KeyError: at
    https://github.com/pha4ge/hAMRonization/blob/master/hAMRonization/Interfaces.py#L66 that explains to the user that expected input columns can't be found and to check if they are using the correct AMR prediction file.

  4. Update the validation of input fields exception at https://github.com/pha4ge/hAMRonization/blob/master/hAMRonization/hAMRonizedResult.py#L57 to use logging + debug

@fmaguire fmaguire added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 23, 2021
@fmaguire fmaguire added this to To do in Sanity Testing Mar 23, 2021
@cimendes
Copy link
Member

Seems like a very good and feasable idea. Need any help with that?

@fmaguire
Copy link
Member Author

Thought it might make a nice little project for someone with more spare time which probably doesn't include you right now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed nice to have
Projects
Development

No branches or pull requests

2 participants