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

Hide stacktrace unless verbose mode is enabled #148

Merged
merged 7 commits into from
Aug 5, 2022

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Jul 29, 2022

Closes #135

$ aiidalab-launch profiles edit invalid
Unexpected ValueError: Did not find profile with name 'invalid'.
Use verbose mode `aiidalab-launch --verbose` to see full stacktrace

I tried adding a test, but unfortunately the custom handler path is not exercised (see Codecov). Not very surprising that testing a custom exception handler in a testing framework does not work. 🤷

@csadorf this is ready for review.

@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #148 (9463682) into main (c7b6203) will decrease coverage by 0.13%.
The diff coverage is 71.42%.

❗ Current head 9463682 differs from pull request most recent head 23682b6. Consider uploading reports for the commit 23682b6 to get more accurate results

@@            Coverage Diff             @@
##             main     #148      +/-   ##
==========================================
- Coverage   86.27%   86.14%   -0.14%     
==========================================
  Files           9        9              
  Lines         889      895       +6     
==========================================
+ Hits          767      771       +4     
- Misses        122      124       +2     
Flag Coverage Δ
py-3.10 86.03% <71.42%> (-0.14%) ⬇️
py-3.8 85.98% <71.42%> (-0.14%) ⬇️
py-3.9 86.09% <71.42%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiidalab_launch/__main__.py 79.16% <71.42%> (-0.25%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@csadorf csadorf self-requested a review August 4, 2022 07:48
Copy link
Member

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

This is great! I just have a few minor things, but otherwise good.

aiidalab_launch/__main__.py Show resolved Hide resolved
aiidalab_launch/__main__.py Outdated Show resolved Hide resolved
aiidalab_launch/__main__.py Outdated Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved
@csadorf csadorf enabled auto-merge (squash) August 5, 2022 08:21
@csadorf csadorf merged commit 48133eb into aiidalab:main Aug 5, 2022
@danielhollas
Copy link
Contributor Author

@csadorf thanks for looking into it, agreed.

@danielhollas danielhollas deleted the traceback branch August 13, 2022 15:47
@danielhollas danielhollas self-assigned this Aug 13, 2022
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.

Hide stack traces unless debug mode is enabled.
2 participants