everypolitician / rebuilder

Generate pull requests in everypolitician-data by rebuilding a specific legislature's data from source
0 stars 2 forks source link

Refactor RebuilderJob#perform method #62

Open chrismytton opened 7 years ago

chrismytton commented 7 years ago

Problem

Currently the RebuilderJob#perform method is a big procedural mess. Making changes to the method isn't too difficult, but adding tests for those changes is near impossible.

Proposed solution

Split this method up into discrete classes that are each well tested. We probably need at least the following concepts modelled as :

chrismytton commented 7 years ago

Some nice initial wins from extracting the output cleaning into a separate class in https://github.com/everypolitician/rebuilder/pull/64.

Next up I think is #43 https://github.com/everypolitician/rebuilder/issues/45, which has been started over in #63.