fix: do not decorate ELLIPSIS with <b> tags - #123
Conversation
|
Thanks for the pull request, @Agrendalath! I've created OSPR-6537 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
9c4269a to
74fd412
Compare
Multiple matches are merged with `ELLIPSIS` as a separator. This reverses the order of operations so that the matches are decorated before they are merged. This way, the content of `ELLIPSIS` is not decorated with HTML `<b>` tags.
Collections Abstract Base Classes are deprecated in `collections` since Python 3.3. They will be moved to `collections.abc` after Python 3.8. https://docs.python.org/3.8/library/collections.html
74fd412 to
af021c9
Compare
|
|
||
| import importlib | ||
| import collections | ||
| from collections.abc import Iterable |
There was a problem hiding this comment.
I've just included this change because it was breaking tests for me locally. We don't worry about compatibility for Python versions older than 3.3, so this is a safe replacement.
|
@natabene, this is ready for your review. |
|
@Agrendalath Thank you! |
|
@idegtiarov - this ticket was tagged for Core Contributor review, but you are the only CC on this repo. Would you be available to do a review? |
|
@sarina thank you for notifying me, I've missed this PR. Will take a look. |
|
@idegtiarov no worries, we started assigning CCs specifically for review only a few days ago. You can always check which PRs that 2U wants us to review at this link: https://openedx.atlassian.net/issues/?jql=project%20%3D%20OSPR%20AND%20status%3D%22Open%20edX%20Community%20Review%22 |
|
@sarina one question: could I expect the author will merge his PR or I should do that? |
|
@idegtiarov - this is tough because it's not clear how to tell who has commit rights to what repo. Only CCs and 2U people can commit to repos. In this case @Agrendalath is a CC but not to this repo (you can see the list here: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3156344833/Current+Core+Contributors+to+the+Open+edX+Project), so you should merge in this case. I think in general if you're not sure, you can approve and ask the author if they are able to merge or if they'd like you to do it. |
|
@sarina got it, thanks. PR is Merged. |
|
@Agrendalath 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
Thank you for handling this, @sarina. @idegtiarov, thank you for the review. If you wouldn't mind, please publish a new GitHub release. It will publish the package to PyPI. |
|
@Agrendalath new release is published https://github.com/openedx/edx-search/tree/v3.3.0 |
* fix: do not decorate `ELLIPSIS` with `<b>` tags Multiple matches are merged with `ELLIPSIS` as a separator. This reverses the order of operations so that the matches are decorated before they are merged. This way, the content of `ELLIPSIS` is not decorated with HTML `<b>` tags. * fix: use correct module for Iterable Collections Abstract Base Classes are deprecated in `collections` since Python 3.3. They will be moved to `collections.abc` after Python 3.8. https://docs.python.org/3.8/library/collections.html


Multiple matches are merged with
ELLIPSISas a separator.This reverses the order of operations so that the matches are decorated before they are merged. This way, the content of
ELLIPSISis not decorated with HTML<b>tags.Jira ticket (nonpublic): BB-5589
Testing instructions
{lms,cms}/envs/private.py:Passing a courseinto the search field.Reviewers