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

Fix #3360: Platform Parameter Dagger Module and Constants File [BLOCKED on #3323] #3361

Merged
merged 17 commits into from
Jul 7, 2021

Conversation

Arjupta
Copy link
Contributor

@Arjupta Arjupta commented Jun 22, 2021

Explanation

Fixes #3360
This PR introduce a new Dagger Module which will provide the PlatformParameters and a Parameter Constants file to store the annotations, names, default values at one place.

Note - This PR containes the changes from PR1.2 and PR1.2 which were made from the fork of Oppia Repository, This PR is made directly from Oppia-Android repository in order to help us with Stacking PRs. Both of the previous PRs were almost reviewed so instead of reopening them we will copy the changes made in them here in order to develop over those changes. Any further change in these two PRs will be included here also (manually copy pasted) till the time those PRs are merged. Any further PR that will be made afterwards, will be stacked based on this PR (if needed).
/cc @Sarthak2601

Change associated with this PR -

  • ApplicationComponent
  • PlatformParameterModule
  • TestPlatformParameterModule
  • PlatformParameterConstants
  • PlatformParameterModuleTest

Rest of the files are from previous two PRs.

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 PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

… PlatformParameter Constants file to store any constants related to Platform Parameters
@Arjupta Arjupta changed the title Fix #3360: Intriduce a Platform Parameter Dagger Module and a Platform Parameter Constant File Fix #3360: Platform Parameter Dagger Module and Constants File Jun 22, 2021
Copy link
Contributor

@jcqli jcqli left a comment

Choose a reason for hiding this comment

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

This is interesting since I don't think we want to hard-code any example parameters into this module, but we don't yet have features that are using this module quite yet. For similar reasons we also don't have a means of testing this module.

Overall the PR looks pretty good but I'm not sure if we want to check this in with fake parameters. I'll defer to @vinitamurthi on her thoughts about how we might update this but I don't see anything else major in this PR -- nice job!

Only additional comment is to mentions which files or lines of code are newly-added in this PR so reviewers don't re-review code from the past PRs.

@jcqli jcqli assigned Arjupta and unassigned jcqli Jun 23, 2021
@Arjupta
Copy link
Contributor Author

Arjupta commented Jun 24, 2021

This is interesting since I don't think we want to hard-code any example parameters into this module, but we don't yet have features that are using this module quite yet. For similar reasons we also don't have a means of testing this module.

Overall the PR looks pretty good but I'm not sure if we want to check this in with fake parameters. I'll defer to @vinitamurthi on her thoughts about how we might update this but I don't see anything else major in this PR -- nice job!

Only additional comment is to mentions which files or lines of code are newly-added in this PR so reviewers don't re-review code from the past PRs.

I have added these Example Parameters just to show how are we trying to provide the parameters. We can remove them once we can actually add a PlatformParameter (which will happen once we reach the end of Milestone 1)

I will write the tests the tests now, just wanted to have first review over the kind of changes

Edited the description to highlight the newly added files.

@jcqli

@Arjupta Arjupta assigned jcqli and unassigned Arjupta Jun 24, 2021
@jcqli
Copy link
Contributor

jcqli commented Jun 24, 2021

I have added these Example Parameters just to show how are we trying to provide the parameters. We can remove them once we can actually add a PlatformParameter (which will happen once we reach the end of Milestone 1)

I will write the tests the tests now, just wanted to have first review over the kind of changes

I understand why we have the examples parameters but it seems odd to check in code that's not used. That said, I do agree that it would still be best to include these examples largely as a means of testing the module especially since it's using the map in the earlier PR and we probably want to check that it's handled correctly. Please add the test file, and I also recommend being explicit that the parameters in the modules are only examples and not used for actual parameters yet. Maybe changing the names to provideExampleParamX and also including a comment in the file that they are only examples and not tied to parameters yet.

@Arjupta
Copy link
Contributor Author

Arjupta commented Jun 28, 2021

@jcqli @vinitamurthi PTAL at the PlatformParameterModuleTest file. If this approach looks good to you then we can have more test cases.

@jcqli
Copy link
Contributor

jcqli commented Jun 28, 2021

@jcqli @vinitamurthi PTAL at the PlatformParameterModuleTest file. If this approach looks good to you then we can have more test cases.

LGTM, recommend naming "FakePlatformParameterModule" to "TestPlatformParameterModule".

@jcqli jcqli assigned Arjupta and unassigned jcqli Jun 28, 2021
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

LGTM. Approving only for code-owner file.

@rt4914 rt4914 removed their assignment Jul 3, 2021
Copy link
Contributor

@jcqli jcqli left a comment

Choose a reason for hiding this comment

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

LGTM!

@jcqli jcqli removed their assignment Jul 3, 2021
@Arjupta Arjupta removed their assignment Jul 5, 2021
@BenHenning
Copy link
Sponsor Member

@Arjupta a couple of things:

  1. If this includes changes from another PR, please mention that it is blocked on that PR in the PR title
  2. Please reassign this to me after the dependent PR is merged & this is brought up-to-date with develop (if needed--I suspect you don't actually need my codeowners approval after that happens since the only BUILD file changes in this PR seem to be included in the previous one that I approved)

@BenHenning BenHenning assigned Arjupta and unassigned BenHenning Jul 6, 2021
@Arjupta Arjupta changed the title Fix #3360: Platform Parameter Dagger Module and Constants File Fix #3360: Platform Parameter Dagger Module and Constants File [BLOCKED on #3323] Jul 6, 2021
@vinitamurthi
Copy link
Contributor

@anandwana001 @jcqli , if the changes look good to you, can you please approve the PR? The merge is currently blocked on your reviews

Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

Code owners file LGTM

@anandwana001 anandwana001 removed their assignment Jul 7, 2021
@jcqli jcqli removed their assignment Jul 7, 2021
Copy link
Contributor

@jcqli jcqli left a comment

Choose a reason for hiding this comment

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

LGTM!

@oppiabot oppiabot bot added the PR: LGTM label Jul 7, 2021
@oppiabot
Copy link

oppiabot bot commented Jul 7, 2021

Hi @Arjupta, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@jcqli jcqli merged commit 44f411a into develop Jul 7, 2021
@jcqli jcqli deleted the platform-parameter-dagger-module branch July 7, 2021 15:21
@Arjupta Arjupta removed their assignment Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Introduce a Dagger Module and Constants file for Platform Parameters
7 participants