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

Add a debugging mode controlled by AUGUR_DEBUG #1577

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Aug 14, 2024

At the moment, this only enables printing of stack traces and the full exception chain for handled (i.e. anticipated) errors, which otherwise were not printed. In the future, this mode can also control the output of verbose debugging/troubleshooting logging for more commands.

Commit contents and message based on similar commits I made to Nextstrain CLI.¹

Resolves #1308.

¹ nextstrain/cli@229f2e8
nextstrain/cli@b6d9290
nextstrain/cli#208

Checklist

  • Automated checks pass
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

At the moment, this only enables printing of stack traces and the full
exception chain for handled (i.e. anticipated) errors, which otherwise
were not printed.  In the future, this mode can also control the output
of verbose debugging/troubleshooting logging for more commands.

Commit contents and message based on similar commits I made to
Nextstrain CLI.¹

Resolves <#1308>.

¹ <nextstrain/cli@229f2e8>
  <nextstrain/cli@b6d9290>
  <nextstrain/cli#208>
@tsibley
Copy link
Member Author

tsibley commented Aug 14, 2024

Rebased onto latest master to 1) address conflicts in changelog and 2) add developer API doc pages for the augur.debug module.

@tsibley tsibley mentioned this pull request Aug 14, 2024
7 tasks
Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.

Project coverage is 70.17%. Comparing base (66e903a) to head (102adf1).
Report is 120 commits behind head on master.

Files with missing lines Patch % Lines
augur/__init__.py 11.11% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1577      +/-   ##
==========================================
- Coverage   70.23%   70.17%   -0.06%     
==========================================
  Files          76       77       +1     
  Lines        7990     8001      +11     
  Branches     1946     1950       +4     
==========================================
+ Hits         5612     5615       +3     
- Misses       2092     2098       +6     
- Partials      286      288       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tsibley tsibley merged commit 28b8705 into master Aug 14, 2024
28 checks passed
@tsibley tsibley deleted the trs/debug-mode branch August 14, 2024 21:54
@joverlee521
Copy link
Contributor

Should AUGUR_DEBUG be added to the envvar docs?

@tsibley
Copy link
Member Author

tsibley commented Aug 20, 2024

Oops, yes! I'll add it.

tsibley added a commit that referenced this pull request Aug 20, 2024
…instead of in the developer API pages.  Much more discoverable outside
of the dev pages.

Modifies formatting of the rST to match the new document's existing
formatting, but the content is the same.

Thanks to @joverlee521 for catching this misplacement in post-merge
review.¹

¹ <#1577 (comment)>
tsibley added a commit that referenced this pull request Aug 20, 2024
…instead of being buried in the developer API pages.  Much more
discoverable.

Modifies formatting of the rST to match the new document's existing
formatting, but the content is the same.

Thanks to @joverlee521 for catching this misplacement in post-merge
review.¹

¹ <#1577 (comment)>
@tsibley tsibley mentioned this pull request Aug 20, 2024
4 tasks
@tsibley
Copy link
Member Author

tsibley commented Aug 20, 2024

#1587

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.

Add a debug mode to print stack trace for exceptions caught by top-level handler
3 participants