-
Notifications
You must be signed in to change notification settings - Fork 499
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 #3485: Added GaeModels along with PlatformParameterService and its Mock #3489
Conversation
…esting/platformparameter BUILD.bazel
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 pretty good, left a few comments. Otherwise, be sure to include those data files in the test exemption file if we won't have tests for them.
data/src/main/java/org/oppia/android/data/backends/gae/model/GaePlatformParameters.kt
Outdated
Show resolved
Hide resolved
/** Service that provides access to platform parameter endpoint. */ | ||
interface PlatformParameterService { | ||
|
||
// TODO("Change the url to point to the correct endpoint when the backend is ready") |
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.
Is there no backend for this yet? I had thought the backend was done in a previous project.
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.
There is: https://github.com/oppia/oppia/blob/develop/core/controllers/platform_feature.py#L28.
Or, is this blocking on updating that API? (in which case, shouldn't that happen first?)
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.
@BenHenning and @jcqli currently we have an endpoint in Oppia for platform parameters but making any changes to it was discussed to be put in the Future Works in the Proposal. Thats why I have mentioned this as TODO becuase we have not confirmed that whether we will be sending version number to the backend or the names of paramaters to be returned in the response. //cc: @vinitamurthi
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.
Ack, make an issue for it an include the issue # here then.
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.
Done
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.
This actually seems concerning to me. We shouldn't be setting up the model layer for an endpoint format that doesn't exist. Either these API endpoint representations should match the current backend, or the current backend should be updated to fit these. Otherwise, the system isn't going to work. 'Future work' should be optional, not required, pieces of work beyond the defined requirements for the system to work within spec.
Unassigning @jcqli since the review is done. |
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.
Thanks @Arjupta! PTAL at my comments. Also, you have a failing static check--could you please take a look & address that?
Thanks!
data/src/main/java/org/oppia/android/data/backends/gae/NetworkModule.kt
Outdated
Show resolved
Hide resolved
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
/** Service that provides access to platform parameter endpoint. */ | ||
interface PlatformParameterService { | ||
|
||
// TODO("Change the url to point to the correct endpoint when the backend is ready") |
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.
There is: https://github.com/oppia/oppia/blob/develop/core/controllers/platform_feature.py#L28.
Or, is this blocking on updating that API? (in which case, shouldn't that happen first?)
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
data/src/main/java/org/oppia/android/data/backends/gae/model/GaePlatformParameters.kt
Outdated
Show resolved
Hide resolved
data/src/test/java/org/oppia/android/data/backends/gae/api/PlatformParameterServiceTest.kt
Outdated
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/network/MockPlatformParameterService.kt
Outdated
Show resolved
Hide resolved
.../src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterConstants.kt
Outdated
Show resolved
Hide resolved
.../src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterConstants.kt
Outdated
Show resolved
Hide resolved
…and Gae models also adding test cases in Service test and documentation over Gae models
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.
Overall LGTM, although there is a build error that I'm not familiar with.. couldn't find anything concrete about it online so I re-ran the checks. Recommend keeping an eye on it.
I saw your message that this might be an issue with Bazel & CI. Noting here it might not be resolvable in this PR. |
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.
Tests LGTM
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.
Thanks @Arjupta. Had a few nits, but my main feedback is that I think we still need at least a basic test suite for the new mock especially since it'll probably become more complex in subsequent PRs & in the future.
Also, apologies for not reviewing this earlier. I think it slipped off my radar this week somehow.
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
...ing/src/main/java/org/oppia/android/testing/platformparameter/TestStringPlatformParameter.kt
Outdated
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/platformparameter/BUILD.bazel
Outdated
Show resolved
Hide resolved
data/src/test/java/org/oppia/android/data/backends/gae/api/PlatformParameterServiceTest.kt
Outdated
Show resolved
Hide resolved
data/src/test/java/org/oppia/android/data/backends/gae/api/PlatformParameterServiceTest.kt
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/network/MockPlatformParameterService.kt
Show resolved
Hide resolved
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.
Thanks @Arjupta. Were all of my previous comments addressed? Some of the comment threads didn't have any replies, and don't seem to correspond to recent changes.
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.
Thanks @Arjupta! Just a couple a super small nits left.
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
data/src/main/java/org/oppia/android/data/backends/gae/api/PlatformParameterService.kt
Outdated
Show resolved
Hide resolved
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.
Thanks @Arjupta. LGTM!
Explanation
Fixes #3485
PlatformParameter API & Gae Models for hooking up the backend and including Mock Platform Parameter Service for representing fake network response.
Checklist