-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[WIP/Don't Merge] Migrated Profile from Rxjava to Retroift & added MVVM Architecture (part 1) #6082
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
In this should I provide kdoc here? and if yes kdoc should I link the common apps API endpoint doc or provide a CURL link here?
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.
API endpoint doc is great if there is one. :-)
Hi @nicolas-raoul,
I have been trying to break Achievement Fragment for a while on main.
- As per this issue Ultimate achievement: Too many contributions (making our script time out) #3295 , Ultimate achievement: Too many contributions (making our script time out) #3295 (comment) says that we should check the editcount using this api (https://commons.wikimedia.org/w/api.php?action=query&list=users&usprop=editcount&ususers=Syced&format=json) of the user if its greater than 1,50,000 we should say that we have so many achievements you unlocked Ultimate Achievements. But in the below code we are checking the editcount using this api (https://commons-android-app.toolforge.org/tool-commons-android-app/wikidataedits.py?user=Syced).
Lines 152 to 176 in 22238f5
My Question :
-
Difference between the editcount received from both the api (https://commons.wikimedia.org/w/api.php?action=query&list=users&usprop=editcount&ususers=Syced&format=json) & ((https://commons-android-app.toolforge.org/tool-commons-android-app/wikidataedits.py?user=Syced)
-
I have hardcoded my username to your username(Syced) to test achievement with a high upload profile. Despite your edit count having less than 150000 server times out at your username (https://tools.wmflabs.org/commons-android-app/tool-commons-android-app/feedback.py?user=Syced) why is that? what should be the ideal editcount for our server to be able to handle it?
Soft ping @nicolas-raoul any idea about this #6082 (comment)
-
https://commons-android-app.toolforge.org/tool-commons-android-app/wikidataedits.py?user=Syced is only for Wikidata edits.It gets shown as "Nearby edits" in Achievements.
-
I guess the script got slower for some reason. Maybe we should change from 150000 to 10000 or something similar.
I guess the script got slower for some reason. Maybe we should change from 150000 to 10000 or something similar.
My guess is something else is the reason. From Leaderboard -> Weekly -> Upload. I see the top user as GeographBot who has around 29k upload counts. Even his profile is not opening.
Wikidata edits Url of GeographBot (0 EditCount) : https://tools.wmflabs.org/commons-android-app/tool-commons-android-app/wikidataedits.py?user=GeographBot
Achievements : https://tools.wmflabs.org/commons-android-app/tool-commons-android-app/feedback.py?user=GeographBot (Weekly Upload Count 29k)
This GeographBot has 0 wikidataedits still achievements doesn't load. So I think the wikidataeduts is not the reason for not loading achievements.
Sturm User Url : https://tools.wmflabs.org/commons-android-app/tool-commons-android-app/feedback.py?user=Sturm (Weekly Upload Count : 440)
On closer look I am unable to open top users achievement who has highest upload count from leaderboard. I am not sure what the actual reason for timeout needs investigation.
If the focus of this PR is architecture, don't worry too much about achievement timeouts or wrong counts, don't hesitate to file other issues for these. :-)
Uh oh!
There was an error while loading. Please reload this page.
Part of:
Description:
The following PR focuses on removing the RxJava usage for Achievement Screen, split the code into a MVVM pattern, cleaned the code and also fixed the flow of the AchievementScreen.
Also, there seems to be an improvement in the loading time of the achievements by some seconds (probably 1-2 seconds) compared to the main branch.