PR #465 introduces a lot of changes to GeoipsList commands which brought about some repetition in the code. Specifically for these list commands, we had to refactor how we added information into the list output based on the headers which were selected. We should create some general function, which based on the command and headers selected, fills up a 2D table of string information so we don't have case specific for loops which mimic each other largely. Since this will require a decent amount of refactoring, we'll add this in a separate PR.
Background and Motivation
This issue stems from this comment which is addressing the geoips_list.py module in #465.
Code to demonstrate issue
Most if not all classes contained in geoips/commandline/geoips_list.py
Checklist for Completion
[ ] Find all __call__ signatures in geoips_list.py that include similar functionality of filling up table data based on the command and selected headers
[ ] Refactor this portion of the code as a generalized function which will fill up table data appropriately.
[ ] Place this on the GeoipsExecutableCommand once implemented
Requested Update
Description
PR #465 introduces a lot of changes to
GeoipsList
commands which brought about some repetition in the code. Specifically for these list commands, we had to refactor how we added information into the list output based on the headers which were selected. We should create some general function, which based on the command and headers selected, fills up a 2D table of string information so we don't have case specific for loops which mimic each other largely. Since this will require a decent amount of refactoring, we'll add this in a separate PR.Background and Motivation
This issue stems from this comment which is addressing the
geoips_list.py
module in #465.Code to demonstrate issue
geoips/commandline/geoips_list.py
Checklist for Completion
__call__
signatures ingeoips_list.py
that include similar functionality of filling up table data based on the command and selected headersGeoipsExecutableCommand
once implemented