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

adding display_coursenumber instance to search index #873

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

estherjsuh
Copy link

@estherjsuh estherjsuh commented Apr 8, 2021

This is a companion PR of appsembler/edx-theme-codebase#147

Fixed the backed logic to be able to index display_coursenumber on elasticsearch, and then being able to process the json response from elasticsearch response.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0005%) to 40.204% when pulling a633d96 on esther/fix-RED-889 into c92d019 on main.

Copy link

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

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

Thanks @estherjsuh. Would it be possible to write tests for this fix? We can work on that next week during our 1:1s.

@@ -553,6 +553,7 @@ class CourseAboutSearchIndexer(object):
AboutInfo("title", AboutInfo.ANALYSE | AboutInfo.PROPERTY, AboutInfo.FROM_ABOUT_INFO),
AboutInfo("university", AboutInfo.ANALYSE | AboutInfo.PROPERTY, AboutInfo.FROM_ABOUT_INFO),
AboutInfo("number", AboutInfo.ANALYSE | AboutInfo.PROPERTY, AboutInfo.FROM_COURSE_PROPERTY),
AboutInfo("display_coursenumber", AboutInfo.ANALYSE | AboutInfo.PROPERTY, AboutInfo.FROM_COURSE_PROPERTY),

Choose a reason for hiding this comment

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

Thanks @estherjsuh! Would it be possible to add a test for this new field?

If you're curious on tests on Juniper, you can follow this guide on how we use tox to run tests.

It seems like a good test case to add into the TestCoursewareSearchIndexer._test_course_about_store_index test case.

Once this fix is tested and merged, we should actually contribute it to the edX upstream repository. There's no reason to keep just on Tahoe. I've added a GitHub issue so we do it later (#874).

Choose a reason for hiding this comment

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

@OmarIthawi That's a great idea! I think is a great opportunity for knowledge transfer next week. 💪

@estherjsuh estherjsuh merged commit 0d7f839 into main Apr 30, 2021
@estherjsuh estherjsuh deleted the esther/fix-RED-889 branch April 30, 2021 17:18
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.

4 participants