everypolitician / commons-builder

Build scripts for Democratic Commons repositories
MIT License
1 stars 0 forks source link

Executive superclass #89

Closed alexdutton closed 6 years ago

alexdutton commented 6 years ago

The executive query now looks much more like the legislative query when placed side-by-side, and now picks out a sensible-looking role superclass that differs from the main role.

Haven't included tests as these are purely query changes, and we're still not very good at testing that queries work as expected. I think in lieu of tests, it would be good if the reviewer could run it to check that the behaviour is expected.

I've tested this on Italy, the UK, and Canada, and each produces the expected results. Some roles have immediate superclasses that we might not be keen on (e.g. sindaco for all but one of the Italian mayors, prime minister for the first ministers of the devolved administrations of the UK), but I think that's best addressed by tweaking/improving the data in Wikidata.

alexdutton commented 6 years ago

Standardise legislative/executive queries to handle role superclasses the same way.

codecov[bot] commented 6 years ago

Codecov Report

Merging #89 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #89   +/-   ##
=======================================
  Coverage   94.59%   94.59%           
=======================================
  Files          35       35           
  Lines         833      833           
=======================================
  Hits          788      788           
  Misses         45       45
Impacted Files Coverage Δ
lib/commons/builder/current_executive.rb 87.5% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1af6399...bfb539b. Read the comment docs.