{"push_id":2665169954,"size":11,"distinct_size":1,"ref":"refs/heads/add-position-data","head":"4b80447d1c3dfc29d3254bd51b2f69166b0cecc6","before":"a9391480ec48f97d3719ae8d8c2a5a5bcea82799","commits":[{"sha":"8d3e6db2b946f049711e0fdf7ed86ebf90d8a63f","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Rename Wikidata to WikidataClient\n\nThe Wikidata class is doing a number of different things at the moment;\nI'd like to separate these concerns, so this renaming indicates the new\nintent: these commits will move WikidataClient to just being responsible\nfor interacting with the SPARQL endpoint.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/8d3e6db2b946f049711e0fdf7ed86ebf90d8a63f"},{"sha":"a1ad51244ff0bb92ba9e577d42e0c12c9bde08a8","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Factor out the lang-dependent SPARQL generation helpers into a mixin\n\nThere were various helper methods on WikidataClient that were using\nthe configured languages to generate helpful SPARQL for doing\nmulti-lingual queries. One of these methods was also duplicated in\nLangTag. Extracting these into a mixin:\n\n * Removes the duplication of the 'variable' method's definition\n\n * Lets us remove the awkward inheritance relationship between\n   Wikidata{Cell,Row} and WikidataClient, which really were unrelated.\n   Instead those classes can now just include the mixin.\n\n * Removes one of the concerns of WikidataClient, simplifying it.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/a1ad51244ff0bb92ba9e577d42e0c12c9bde08a8"},{"sha":"c7e41975b535fbe4f671431a0165ec7d8b7ad975","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Remove the inheritance dependency of WikidataQueries on WikidataClient\n\nThe primary concern of the WikidataQueries class is to generate SPARQL\nqueries based on Config; running the queries can be done by a\nWikidataClient object without the need for this inheritance relationship\n(which I think makes the code harder to understand, with no obvious\nbenefit). The inheritance relationship was also being used to make the\nConfig available to WikidataQueries in a hard-to-spot way.\n\nThis commit removes that inheritance relationship in favour of creating\nWikidataClient objects for when a query needs to be performed, and\nexplicitly added config to the initialization of the object.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/c7e41975b535fbe4f671431a0165ec7d8b7ad975"},{"sha":"dc9b74f33b4ee4e05dfb37abe7b817328d9649ce","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Use dependency injection of WikidataClient in WikidataLabels\n\nWikidataLabels inherited from WikidataClient in order to be able to\npeform queries and have access to config. This is more maintainably done\nwith dependency injection (for example, passing a WikidataClient on\ninitialization of WikidataLabels).","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/dc9b74f33b4ee4e05dfb37abe7b817328d9649ce"},{"sha":"ba9d18967e3bc11fc4f4908dac146ed16af8e3a6","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Refactor WikidataLabels (use a query template, keyword arguments)\n\nThis commit updates WikidataLabels to use a templated query and changes\nthe initializer to use keyword arguments (which is more explicit and\nmakes it easier to change usage of the class in future).","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/ba9d18967e3bc11fc4f4908dac146ed16af8e3a6"},{"sha":"c0e7340e3c67c334fdc52ffd47c38d1618da66b1","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Add a class for parsing JSON responses from the Wikidata Query Service\n\nThis separates out the parsing of the response (which is configuration\ndependent) from actually getting it from the endpoint.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/c0e7340e3c67c334fdc52ffd47c38d1618da66b1"},{"sha":"3554db839eb6eb4f780fbc110b80ac9a551a876e","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Add a Query class that'll record the query and results\n\nIn several places we make a SPARQL query to the Wikidata Query Service\nand optionally record the query and the results; this commit creates a\nquery class to factor out that behaviour.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/3554db839eb6eb4f780fbc110b80ac9a551a876e"},{"sha":"5f6023c8d23d15aa8654ab4e02f4bce378747bf1","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Allow access to the raw query response in WikidataClient\n\nThe Query class caches the raw response; in order for it to be able to\ndo this via WikidataClient, it'll need access to the original reponse,\nnot just the parsed one. (As an alternative, you could also do this by\npassing an identity parser, that is one that just returns the response\nstring unchanged, but this seems clearer to me.)","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/5f6023c8d23d15aa8654ab4e02f4bce378747bf1"},{"sha":"8026e47bdf19327576db1716ebe27df8b69877b9","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Migrate to using Query where we need to save the query or its output\n\nThis saves a little code duplication since the pattern of \"make a query,\nbut possibly save the query itself or the results to the filesystem\"\ncomes up in several places.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/8026e47bdf19327576db1716ebe27df8b69877b9"},{"sha":"3b6103920313d29bfd0e2dbee0feb0c6326635cb","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"Reduce the complexity of Legislature.list\n\nThis was exceeding RuboCop's Metrics/AbcSize and Metrics/MethodLength\nmetrics, even at the increased values in .rubocop_todo.yml. This change\nkeeps their complexity under those limits, but it's not very pleasant -\nthose two methods have a lot of code in common.\n\nThis being a static method unfortunately makes it more difficult than\nI'd like to simplify these in a more parisomious way, but this is\nprobably an improvement in readability for the moment.","distinct":false,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/3b6103920313d29bfd0e2dbee0feb0c6326635cb"},{"sha":"4b80447d1c3dfc29d3254bd51b2f69166b0cecc6","author":{"name":"Mark Longair","email":"7ece978167073d004197c0d6655799d1a2ce976e@pobox.com"},"message":"WIP: Fetch rich position data for area-associated positions","distinct":true,"url":"https://api.github.com/repos/everypolitician/commons-builder/commits/4b80447d1c3dfc29d3254bd51b2f69166b0cecc6"}]}
{"actor":{"display_login":"mhl"}}