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

✨Version Display On Error #237

Merged
merged 4 commits into from
Oct 18, 2022
Merged

✨Version Display On Error #237

merged 4 commits into from
Oct 18, 2022

Conversation

AlexHunton2
Copy link
Contributor

@AlexHunton2 AlexHunton2 commented Oct 5, 2022

Summary:

Added version numbering to errors. Identified two places where errors are caught: ClickExceptions & Logger. Logger errors are thrown by logic related. For logger errors, the CLI version will be shown within the formatter. For ClickExceptions, an overloaded method will catch them in it's parent method, display errors, then send the error back to the parent method to be dealt with normally.

Motivation:

See #187.

Test Plan:

  • Attempt an error outside of a project directory and only see CLI version.

  • Attempt an error inside of a project directory and see CLI + Kernel version.

  • Kernel Version: 3.7.0, CLI Version: 3.3.3
    pros upload in newly created project folder with the versions above where computer is not connected to brain.

image

@omegaStag
Copy link
Contributor

omegaStag commented Oct 7, 2022

tried testing it on my desktop (windows 10) with only pros and got:

Traceback (most recent call last):
  File "c:\users\kathy\pros_repos\pros-cli\pros\cli\main.py", line 49, in main
    formatter = pros.common.ui.log.PROSLogFormatter('%(levelname)s - %(name)s:%(funcName)s - %(message)s - pros-cli version:%(version)s',
TypeError: __init__() got an unexpected keyword argument 'defaults'```

@AlexHunton2
Copy link
Contributor Author

tried testing it on my desktop (windows 10) with only pros and got:

Traceback (most recent call last):
  File "c:\users\kathy\pros_repos\pros-cli\pros\cli\main.py", line 49, in main
    formatter = pros.common.ui.log.PROSLogFormatter('%(levelname)s - %(name)s:%(funcName)s - %(message)s - pros-cli version:%(version)s',
TypeError: __init__() got an unexpected keyword argument 'defaults'```

Fixed this error directly in last commit. Issue was with python version updating logger API to accept "defaults" which came automatically in later version of python. Try all other tests with newer version of python.

@omegaStag omegaStag self-requested a review October 12, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants