Changes between Initial Version and Version 5 of Ticket #12505


Ignore:
Timestamp:
Mar 31, 2015, 11:35:58 PM (4 years ago)
Author:
isis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12505

    • Property Status changed from new to assigned
    • Property Keywords isis2014Q3Q4 isisExB added
    • Property Summary changed from Refactor Bridges.py and Dist.py in BridgeDB to Refactor BridgeDB's hashrings
  • Ticket #12505 – Description

    initial v5  
    11I have slowly been refactoring all of BridgeDB. Code which has been already refactored is named with "proper" (according to PEP8) lower-cased module names in `lib/bridgedb` in the BridgeDB repository.
    22 
    3 Some of the largest, least-unitested, (and most difficult to refactor) sections of BridgeDB's code are the `Bridges.py` module and the `Dist.py` module. The biggest problems are:
     3Some of the largest, least-unitested, (and most difficult to refactor) sections of BridgeDB's code are the `Bridges.py` module and the `Dist.py` module. This code primarily controls the hashrings and the distributors (which for some reason are subclasses of the very-confused hashrings structures).
     4
     5The biggest problems are:
    46
    57 1. The code for the various types of hashrings in `bridgedb.Bridges` is a complete mess. In some places, hashrings are referred to as `BridgeHolders`, in other places as `Buckets` (though not to be confused with the `Bucket.py` module, and in other places as "hashrings". Subclassing is haphazard and confusing to say the least. In addition, the hashrings are not algorithmically as efficient as they could be. Throughout the hashring code were old-style classes, unused methods, half-implemented methods, and unnecessary parameters. All of this code needs some serious help.