-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Log warnings about files that would have been processed by disabled readers #3321
Conversation
Looking at the failing tests.. |
1d68cc3
to
2094714
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @boxydog! I made a couple of minor comments.
ec511f2
to
d96e1d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍 Any further comments from @getpelican/reviewers before merging?
@boxydog said:
Do you think it would be worthwhile to add additional unit test coverage to this PR before it is merged? |
Yes, I think that's a good idea, otherwise I'll forget. I'll work on it. Fyi, my personal philosophy is "epsilon testing", my term for, "write some tests, more than zero", meaning I don't aim for 100% coverage (as that can feel like more work than it's worth to me). |
d96e1d0
to
1644152
Compare
Coverage on master:
Coverage on this branch with added tests:
I'm happy for you to merge this if you like it. However, FYI, if I were emperor of pelican, I'd just require the markdown library. Less code, simpler to explain. We want to support markdown anyway, so we'll want to support that "optional" dependency. |
Ugh, tests failed! I'll look.. |
7f30c4b
to
548b0ef
Compare
Ugh, tests will be more complicated than I had hoped. I changed Markdown.enabled to False, but presumably if some other test is running at the same time it gets disturbed. So probably I have to mock a Markdown class that has a different enabled. |
548b0ef
to
f19de98
Compare
.. and then I'd close this PR instead of merge it. Again, whatever you want, I just want to move important things forward. |
Given the continued interest in alternative Markdown parsers (e.g., #3344), there may be value in leaving Python-Markdown as an optional dependency. I am therefore inclined to merge this. Many thanks for this enhancement, @boxydog! 🏅 |
Resolves: 1868
This is a proof of concept of producing legible warning messages if markdown is not installed.
Example output:
If this PR looks good, I can try to write at least one unit test of the new functionality.
Some downsides:
I don't think 2 is a big deal. I think 1 is a judgment call, I'm interested in opinions.
It would probably be easier to just require the markdown package?