DiscussionDraft of workflow, deliverables, and scheduleOutreachy proposal for the [[ https://phabricator.wikimedia.org/T114358 | 'Upload To Commons app: Make categorization easy/reliable' project]] for the Outreachy Dec '15 - Mar '16 internship.
=Task description=## Profile
**Name:** Josephine Lim
**Email:** josephinelim86@gmail.com
**IRC or IM networks/handle(s):** josephine_l
**Web Page / Blog / Microblog / Portfolio:** [[ https://github.com/misaochan | misaochan ]] on GitHub
**Location:** New Zealand
**Typical working hours:** 12:00 - 19:00 and 00:00 - 02:00 (GMT+13)
Modify the Upload to Commons Android app to allow users to easily add relevant categories to their pictures by recommending categories based on location data from the picture.## Synopsis
Benefits:The [[ https://play.google.com/store/apps/details?id=fr.free.nrw.commons | Upload to Commons app ]] is an Android app that allows users to easily upload pictures from their mobile device to the [[ https://commons.wikimedia.org/wiki/Main_Page | Wikimedia Commons ]] database.
This project is aimed at improving the photo categorization functionality of the app. This would make it easier and faster for users to upload photos, as well as produce better-categorized photos (which makes it easier to find and re-use them). It should also reduces the need for the difficult and time-wasting task of guessing appropriate categories for uncategorized pictures taken by other people.
This will be achieved through 2 phases:
**Phase 1: App should display nearby categories when user uploads a photo**
- App is easier/faster- Identify the best strategy/APIs to use, less typingfind nearby categories
- Pictures are better categorized, which makes them findable and thus more re-usable- Extract GPS coordinates from the picture
- Guessing the appropriate categories for uncategorized pictures taken by other people is hard, time-wasting, and sometimes impossible. Time spent on this task will be saved.
This goal will be achieved by:
- Showing nearby categorie Implement asynchronous calls to the APIs
- Mak- Show resulting categories
**Phase 2: Category searchh should be made more "fuzzier"y" via approximate string matching**
=Phases=
# Nearby categories:
#- Identify the best strategy/APIs to find nearby categoriescommon patterns of category search near-misses
# Extract GPS coordinates from the picture- Search for an API that would allow "fuzzy" search, and use it if available
# Implement asynchronous calls to the APIs- If not available, implement it by simple tricks like capitalization/pluralization
**Possible mentors:** @Nicolas_Raoul and @Niedzielski
## Deliverables
| **KEY DATE** | **TASK** |**DELIVERABLE**
# Show resulting categories|Before Dec 7|Community bonding period|
# "Fuzzy" category search|Dec 7 - Dec 13|Identify the best strategy/APIs to find Commons categories that are within a certain radius of the specified GPS coordinates |cURL requests that provide the rights categories (30% false positives OK) for all possible use cases and edge cases|
# Identify common patterns of category search near-misses|Dec 14 - Dec 20|Find a library to extract GPS coordinates info from a picture, and implement its use|
# Search for an API that would allow "fuzzy" search, and use it if available|Dec 21 - Dec 27|Implement asynchronous calls to the APIs to match an uploaded picture's GPS coordinates with nearby Commons categories|
# If not available, implement it by simple tricks like capitalization/pluralization
=Workflow=
For **Phase 1**, I plan to extract the GPS coordinates from the photo via android.media.ExifInterface (http://developer.android.com/reference/android/media/ExifInterface.html). The app will then search the Wikimedia GeoData API (https://www.mediawiki.org/wiki/Extension:GeoData#API) for the corresponding coordinates (within a certain radius) and present a narrowed-down list of categories to the user to pick from.
I understand that the Wikimedia GeoData extension is aimed at categorization of articles and not photos. However as the main aim of photos uploaded via the Commons app is for inclusion in articles, I think it might make sense to use this extension for automatic categorization instead of rewriting it. As far as I know, the Commons API that is currently used by the app does not have a similar extension.
This will be implemented via asynchronous calls, either by use of AsyncTask or through the Volley networking library (http://code.tutsplus.com/tutorials/an-introduction-to-volley--cms-23800).
=Timeline & Deliverables=|Dec 28 - Jan 3|Display the resulting categories to the user alongside the "previous categories" that are currently already displayed|
| Period | Task ||Jan 4 - Jan 10|Cache categories, establishing a short-lived area->categories dictionary|
| ---- | ----Jan 11 - Jan 17|Manual testing of app, bugfixes, release to Google Play. Announce at various appropriate places to recruit testers| App should display nearby categories after user has uploaded a picture and is selecting its category|
|Dec 7 - Dec 13|Community bonding periodJan 18 - Jan 24|Identify common patterns of category search near-misses. Search for an API that would allow [[ https://en.wikipedia.org/wiki/Approximate_string_matching | "fuzzy" search ]] |
|Dec 14 - Dec 20|Identify|Jan 25 - Jan 31|Test the best strategy/APIs to find nearby categories.APIs found or test alternatives solutions, Deliverable: curl requests that provide the rights categories (30% false positives OK) forstart implementing if time all possible use cases and edge cases|ows|
|Dec 2|Feb 1 - Dec 27|Find a library to extract GPS coordinates info from a picture, and implement its use|Feb 7|Implement the fuzzy search|
|Dec 28 - Jan 3|Implement asynchronous calls to the APIs|Feb 8 - Feb 14|Manual testing of 'fuzzy search' functionality in app| App should display relevant categories if the user makes a typo or searches for 'near misses'
|Jan 4 - Jan 10|Show resulting categoriesFeb 15 - Feb 21|If not disabled in preferences, use GPS to find nearby categories even when coordinates are not embedded in pictures (people might have moved, mixing with the "previous categories" that already show right now|but it will sometimes be useful).| (Optional)|
|Jan 11 - Jan 17|Cache categories|Feb 22 - Feb 28|Release to Google Play, establishing a short-lived area->categories dictionary|final tests and bugfixes|App deployed successfully and works as intended with no major bugs|
|Jan 18 - Jan 24|Test|Feb 29 - Mar 6|Update app documentation to reflect new enhancements. Work on other issues listed on GitHub if extra time|App documentation up to date|
Note: Made a mistake in the previous version of my timetable. As the community bonding period should be before Dec 7, there is an extra week available, so I tagged it on to the last week for documentation
## Participation
This project does not make use of Gerrit, so my source code will be published regularly on GitHub, via pull requests to the [[ https://github.com/nicolas-raoul/apps-android-commons | main Android Commons repository ]] that is currently maintained by Nicolas_Raoul (mentor). I have used GitHub in the past and have already used this method to complete my microtasks, so I am reasonably familiar with it.
I plan to communicate progress via weekly progress reports on Phabricator. Additionally, I plan to start a blog in order to document my work in greater detail, as well as (perhaps more importantly) what I've learnt through my work on this project.
Aside from that, I will be on IRC in the #mediawiki, release to Google Play#wikimedia-dev, announce at various appropriate places to recruit testers|#wikimedia- commons and #wikimedia-mobile channels.
## About you
**Education completed:**
|Jan 25 - Jan 31|Identify common patterns of category search near-misses while searching for an API that would allow "fuzzy" search|I was working in a different field before making the decision to go into Computer Science (which was a childhood dream of mine). I graduated with a [[ https://en.wikipedia.org/wiki/Graduate_diploma#New_Zealand | Graduate Diploma ]] in Science (major: Computer Science) from the University of Canterbury, then graduated with a [[ https://en.wikipedia.org/wiki/Postgraduate_diploma#Australia_and_New_Zealand | Postgraduate Diploma ]] in Science (major: Computer Science) from the University of Auckland.
**How did you hear about this program?**
|Feb 1 - Feb 7|Test the APIs found or test alternatives solutionsI first heard about Outreachy from a Women in Computer Science group when I was attending the University of Auckland. However, at that time I did not have the time to commit to this program, so a couple of years passed before I finally decided to apply for it.
**Will you have any other time commitments, such as school work, another job, planned vacation, etc., start implementing if time allows|during the duration of the program?**
|Feb 8 - Feb 14|Implement the fuzzy search|I have no other time commitments between those dates. If possible I would like to take a one-week vacation some time between Christmas and New Year, and will talk to my mentors about starting a week early to make up for that if it is approved. But I can forgo the vacation if needed.
**We advise all candidates eligible to Google Summer of Code and Outreachy to apply for both programs. Are you planning to apply to both programs and, if so, with what organization(s)?**
|Feb 15 - Feb 21|Test fuzzy search|No, no longer a student so not eligible for GSoC.
**What drives you? What makes you want to make this the most awesomest wiki enhancement ever? What does making this project happen mean to you?**
I got hooked on to Android app development when I made my first app as a University project - it was quite challenging, but also great to know that you made this little piece of software that other people can use. I really like how apps have contributed to changing the scene of software development, in that small groups of indie developers can make a really big difference.
I also really wanted to work for Wikimedia as my Outreachy internship, because I strongly identify with making information accessible to everyone, and have been an avid user of Wikipedia for over a decade. So I posted on a Phabricator task about reviving the Upload to Commons app asking if this could work for an Outreachy project, and some helpful souls linked me to Nicolas. He was very encouraging and helpful in getting me involved with the Upload to Commons project, so I'm hopeful about getting this little app out there and used by more people to populate the Wikimedia Commons repository.
## Past experience
**Please describe your experience with any other FOSS projects as a user and as a contributor:**
# Android - I have used an Android phone for several years, and have written an Android app (described in the following section). The customizability and open source nature of Android was a big factor in my choice between an Android vs an iOS phone. I have also contributed to the Upload to Commons Android app, as described in the bugfix section.
# Wordpress - I run a [[ http://kiwifoodie.co.nz | hobbyist foodie website ]] that is powered by the Wordpress CMS. I have modified some of the Wordpress themes as child themes for my site, and also use several plugins. I've found the open source nature of the wordpress.org CMS and the themes/plugins that are built on it invaluable for getting a website set up easily, as well as learning CSS and PHP from.
# [[ https://github.com/Epix37/Hearthstone-Deck-Tracker | Hearthstone Deck Tracker ]] - I play Hearthstone (an online TCG by Blizzard) in my spare time, and regularly use this deck tracker when I play (it has been approved by Blizzard, totally legit! :)). I've participated in discussion on its GitHub page and opened issues to offer suggestions.
# Other FOSS projects that I use: Mozilla Firefox, Python, Thunderbird mail client, Apache and MySQL for my website, the Eclipse IDE and the Java programming language.
**Please describe any relevant projects that you have worked on previously and what knowledge you gained from working on them (include links):**
I wrote an [[ https://github.com/misaochan/android-app | Android app ]] for accessing Auckland University's web service. This was a university project to create an app that enabled users to access the information from Auckland University's non-responsive computer science website via a suitable UI, and provided mobile-specific functionality such as adding contact details, emailing, and making calls. Through this project, I learnt Android app development and the basics of UI/UX development for mobiles and tablets.
**If you have already written a feature or bugfix in a Wikimedia technology such as MediaWiki, link to it here**
I worked on some bugfixes for the Upload to Commons Android app:
|Feb 22 - Feb 28|If not disabled in preferences, use GPS to find nearby categories even when coordinates are not embedded in pictures. People might have moved, but it will sometimes be useful|# (Microtask) Fixed the "Fix usage reports or remove them" bug which involved removing the "Send usage reports" button from the UI along with the dead code associated with it - https://github.com/nicolas-raoul/apps-android-commons/pull/18
|Feb 29 - Mar 6|Release to Google Play,# Fixed the "Package naming issue" bug where the source files are contained within the org.wikipedia.commons directory, but in the code they are declared as package fr.free.nrw.commons; more testing|- https://github.com/misaochan/apps-android-commons/pull/3