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

Separates exploration model getters from exp_services #7093

Merged
merged 4 commits into from
Jul 14, 2019

Conversation

DubeySandeep
Copy link
Member

@DubeySandeep DubeySandeep commented Jul 5, 2019

Explanation

Separates exploration model getters from exp_services.

Reason for this change (in brief):

  • Most of the other services use exp_services only for fetching exploration models and sometimes it creates circular dependencies situation. To avoid this we are trying to create a separate file for exploration fetching functionality.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • [] The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

@seanlip
Copy link
Member

seanlip commented Jul 5, 2019

Hi @DubeySandeep -- better to not submit WIP PRs until you're ready for a review, otherwise they just clutter up the PR queue. Should this be closed in the interim?

@DubeySandeep
Copy link
Member Author

@seanlip, I'm waiting for my PR to pass the tests and I'll assign reviewer once it passes the e2e tests (As I'm not sure about it although I've done the manual test.)

Also, I've removed the WIP tag as this PR is just waiting on tests.

@DubeySandeep DubeySandeep changed the title [WIP] Separates exploration model getters from exp_services Separates exploration model getters from exp_services Jul 5, 2019
@seanlip
Copy link
Member

seanlip commented Jul 5, 2019

Travis is failing (even for backend tests), please check.

return result


def get_exploration_and_exploration_rights_by_id(exploration_id):
Copy link
Member Author

Choose a reason for hiding this comment

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

This method isn't used anywhere (except in tests) so I've deleted this method.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

Hi @DubeySandeep, I have no general concerns. Just try to get the tests passing!

@seanlip
Copy link
Member

seanlip commented Jul 5, 2019

Also note, ExplorationRetrivalTests should be spelled "Retrieval"

@DubeySandeep
Copy link
Member Author

@kevinlee12, @prasanna08, @vojtechjelinek, @nithusha21, @aks681, @apb7, can please review this PR as a code-owner?

@codecov
Copy link

codecov bot commented Jul 6, 2019

Codecov Report

Merging #7093 into develop will increase coverage by <.01%.
The diff coverage is 98.5%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #7093      +/-   ##
===========================================
+ Coverage    97.61%   97.61%   +<.01%     
===========================================
  Files          379      381       +2     
  Lines        63408    63449      +41     
===========================================
+ Hits         61893    61934      +41     
  Misses        1515     1515
Impacted Files Coverage Δ
core/domain/user_jobs_continuous.py 96.22% <100%> (ø) ⬆️
core/domain/dependency_registry_test.py 100% <100%> (ø) ⬆️
core/controllers/tasks.py 100% <100%> (ø) ⬆️
core/controllers/reader.py 81.47% <100%> (ø) ⬆️
core/domain/learner_progress_services.py 100% <100%> (ø) ⬆️
core/domain/stats_jobs_one_off_test.py 100% <100%> (ø) ⬆️
core/domain/suggestion_services_test.py 100% <100%> (ø) ⬆️
core/controllers/classifier_test.py 100% <100%> (ø) ⬆️
core/domain/exp_services_test.py 99.8% <100%> (-0.03%) ⬇️
core/domain/rating_services.py 100% <100%> (ø) ⬆️
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22d0ea8...6c2ed74. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jul 6, 2019

Codecov Report

Merging #7093 into develop will increase coverage by <.01%.
The diff coverage is 98.5%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #7093      +/-   ##
===========================================
+ Coverage    97.61%   97.61%   +<.01%     
===========================================
  Files          379      381       +2     
  Lines        63408    63449      +41     
===========================================
+ Hits         61893    61934      +41     
  Misses        1515     1515
Impacted Files Coverage Δ
core/domain/user_jobs_continuous.py 96.22% <100%> (ø) ⬆️
core/domain/dependency_registry_test.py 100% <100%> (ø) ⬆️
core/controllers/tasks.py 100% <100%> (ø) ⬆️
core/controllers/reader.py 81.47% <100%> (ø) ⬆️
core/domain/learner_progress_services.py 100% <100%> (ø) ⬆️
core/domain/stats_jobs_one_off_test.py 100% <100%> (ø) ⬆️
core/domain/suggestion_services_test.py 100% <100%> (ø) ⬆️
core/controllers/classifier_test.py 100% <100%> (ø) ⬆️
core/domain/exp_services_test.py 99.8% <100%> (-0.03%) ⬇️
core/domain/rating_services.py 100% <100%> (ø) ⬆️
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22d0ea8...6c2ed74. Read the comment docs.

Copy link
Contributor

@kevinlee12 kevinlee12 left a comment

Choose a reason for hiding this comment

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

lgtm!

@kevinlee12 kevinlee12 removed their assignment Jul 6, 2019
Copy link
Contributor

@apb7 apb7 left a comment

Choose a reason for hiding this comment

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

LGTM from code owner's perspective, thanks!

@apb7 apb7 removed their assignment Jul 6, 2019
@kevinlee12
Copy link
Contributor

Hi @DubeySandeep, is this still in WIP? (I ask since it's still in the description).

@DubeySandeep
Copy link
Member Author

DubeySandeep commented Jul 7, 2019

@kevinlee12, Description wasn't updated, I've updated it now! (Sorry)

@kevinlee12
Copy link
Contributor

Ah, no worries, thanks!

Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks :)

@nithusha21 nithusha21 removed their assignment Jul 8, 2019
@DubeySandeep
Copy link
Member Author

@prasanna08 @vojtechjelinek @aks681, PTAL!

Copy link
Contributor

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

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

LGTM from code owner's perspective. Thanks!

Copy link
Contributor

@prasanna08 prasanna08 left a comment

Choose a reason for hiding this comment

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

LGTM

@aks681 aks681 removed their assignment Jul 9, 2019
@kevinlee12
Copy link
Contributor

@brianrodri @ankita240796, PTAL code owner review!

Copy link
Contributor

@ankita240796 ankita240796 left a comment

Choose a reason for hiding this comment

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

LGTM as a codeowner, Thanks @DubeySandeep!

@ankita240796 ankita240796 removed their assignment Jul 14, 2019
@brianrodri brianrodri merged commit 574b643 into oppia:develop Jul 14, 2019
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.

10 participants