HomeSoftware Heritage

First step towards a simplification of the indexer's code

Description

First step towards a simplification of the indexer's code

In this firs step, we attempt to simplify a bit the initialization process
of all BaseIndexer derivative classes.

  • the configuration is managed entirely within the init method, and it can be adapted: it accepts a 'config' argument, and any argument of the parse_config_file method can be given as constructor's parameter,
  • tools/tool attributes are managed within BaseIndexer.prepare() method. It uses a USE_TOOLS class attribute (bool) to check whether the 'tools' config parameter must be validated in the check() method.
  • config mess dedicated to ContentMetadataIndexer has been removed; ensure the proper 'tools' field is present in the 'config' parameter of the ContentMetadataIndexer's constructor (see metadata.py L216-218).

Details

Provenance
douarddaAuthored on Jan 23 2019, 4:55 PM
douarddaPushed on Jan 24 2019, 10:12 AM
Differential Revision
D990: First step towards a simplification of the indexer's code
Parents
rDCIDX0e6798a2ce39: Make test_origin_metadata.py more robust
Branches
Unknown
Tags
Unknown
Build Status
Buildable 3666
Build 4777: test-and-build