Narrative
Android
- As a mobile reader (familiar with editing on my device)
- When I am reading an article with no images
- I want to see any image(s) that could be used to illustrate the article,
- so that I can both gain a better understanding of the topic, as well as contribute to helping others who read the article in the future.
Structured Data
- As a bot-writing contributor
- I want a list of unillustrated pages and image suggestions per page
- So that I can automate adding images to those pages
Acceptance Criteria
-
Given I have made a valid request, I expect to have a list of unillustrated articles, so that I know which articles need images.this is no longer in scope for this card. See https://phabricator.wikimedia.org/T272735 - Given I have made a valid request, I expect to have 1-3 image suggestions per unillustrated article found from the ImageMatchingAlgorithm
- Given I have made a valid request with pagination parameter "10", I expect to receive the same 10 results regardless of how many times I make the request
Hygiene
- The service is deployed and reachable via curl
- API Documentation is published and viewable
- Tests related to ACs are written and pass
Example Spec
Request
https://api.wikimedia.org/image_suggestions/v1/en/wikipedia/pages
Response
{ "project": enwiki "page" "Cat" [ { "filename": "File:Striped_Cat.jpg", "source": "Wikidata", "confidence_rating":"high" }, { "filename": "File:Spotted_Cat.jpg", "source": "Commons Category", "confidence_rating":"medium" }, ] }, { "project": enwiki "page" "Frog" [ { "filename": "File:Green_Frog.jpg", "source": "Wikidata", "confidence_rating":"high" }, { "filename": "File:Yellow_Frog.jpg", "source": "Commons Category", "confidence_rating":"medium" } ] }
- 200 - Success
- 400 - Bad Request (invalid path params)
- 404 - Article not found/does not exist
Open Questions
- What's the resource name?
- Is the API pulling from a data store in which the algo outputs to? or just a flat file?
- Does the datastore need to have "real" data or "mock" data?
- Mock data for now, we will replace the mock data with persisted data here: https://phabricator.wikimedia.org/T273227
- Is a scaffolding of a service included in the scope of this card? aka "hello world"
- No, there will be a separate "hello world" task: https://phabricator.wikimedia.org/T273225. This card assumes that work has already been set up and done.
- How long/difficult is the deployment side of this?
- Does the POC need to be in a production environment?
- No, but it does have to be deployed in some lower-environment