HomePhabricator

Split-extract `retrieve_and_process_data` into two methods

Tags
None
Referenced Files
None
Subscribers
None

Description

Split-extract retrieve_and_process_data into two methods

As its name was implying, that method was doing two different things:
first retrieving the raw data − ie the groupings and the column data,
and processing that data into percentage and formatting it as wikitable.

The first part was particularly nasty because it was all done as side-effect:
the column_data class attribute was simply populated on the go.

Here we separate the concerns between the two, and add the most
trivial of unit tests to validate the behaviour.

Let's not invest more time into good tests as this a stepping
stone to the major Line/Grouping refactoring.

Details

Provenance
JeanFredAuthored on May 15 2022, 9:24 PM
Parents
R2566:80f073ee7cab: Remove unecessary quote to curly brace in…
Branches
Unknown
Tags
Unknown
ChangeId
None

Event Timeline