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 type and subtype to warnings #255
Conversation
I’ve modified the logger.warning commands to include the fields type (always “bibtex”) and subtype. This allows warnings to be suppressed if desired in Sphinx. For example, setting suppress_warnings = [“bibtex.duplicate_citation”] will eliminate warnings about duplicate citations. These warnings can be annoying in some use cases where the same citation might be desired on multiple pages. While users are unlikely to suppress some of the other warnings, i’ve include a type and subtype for each warning to make it possible to do so. All available warning type to suppress are: bibtex.filter_overrides_all bibtex.filter_overrides_notcited bibtex.filter_overrides_cited bibtex.filter_syntax_error bibtex.file_not_configured bibtex.key_not_found bibtex.unknown_list_type bibtex.duplicate_citation bibtex.duplicate_label bibtex.missing_field
LGTM! Thanks for the contribution. Could you fix the flake8 errors, and perhaps also add a note about this in the documentation (under usage)? |
I’d be happy to try, but I’m a bit of a noob. Let me try and get back to you.
… On Jul 7, 2021, at 10:44 AM, Matthias C. M. Troffaes ***@***.***> wrote:
LGTM! Thanks for the contribution. Could you fix the flake8 errors, and perhaps also add a note about this in the documentation (under usage)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#255 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD4KQLMY4VKXNIJU3OXNC2DTWRR4NANCNFSM476YSBZA>.
|
1. Added documentation of warning suppression to doc/usage.rst. 2. Fix malformed call to logger.warnings in directives.py. 3. Reformatted directives.py and domain.py to pass flake8 formatting tests.
Codecov Report
@@ Coverage Diff @@
## develop #255 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 47
Lines 2138 2138
Branches 237 237
=========================================
Hits 2138 2138
Continue to review full report at Codecov.
|
OK, I've fixed the bug, reformatted the other files to pass flake8 formatting tests, and added documentation. All checks now pass it looks like. |
Awesome, thanks! I'll do a few small edits and rename a few things in a follow up, but very happy to merge this. Thanks again for contributing to the extension. |
I’ve modified the logger.warning commands to include the fields
type (always “bibtex”) and subtype. This allows warnings to be
suppressed if desired in Sphinx. For example, setting
suppress_warnings = [“bibtex.duplicate_citation”]
will eliminate warnings about duplicate citations. These warnings can be
annoying in some use cases where the same citation might be desired on
multiple pages. While users are unlikely to suppress some of the other
warnings, i’ve include a type and subtype for each warning to make it
possible to do so. All available warning type to suppress are: