While fixing https://phabricator.wikimedia.org/T413072 we decided that the on-demand API should also ignore non-scholarly articles, in case the definition of scholarly changes after a given update has been ingested.
The logic can be found in wikidata-updater.
To do:
- Extract the logic that classifies scholarly articles into a separate module. Ideally on github, open source.
- Ensure the module has its own tests.
- Use that module in the main API. If an article is retrieved and it turns out to be scholarly, return 404.
- Add tests for this logic in main API.