Page MenuHomeSoftware Heritage

First step towards a simplification of the indexer's code
ClosedPublic

Authored by douardda on Jan 24 2019, 9:28 AM.

Details

Summary

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: 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 paramter 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 metadat.py L216-218).

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Jan 24 2019, 9:28 AM
ardumont accepted this revision.Jan 24 2019, 9:52 AM
ardumont added a subscriber: ardumont.

Thank you!

This revision is now accepted and ready to land.Jan 24 2019, 9:52 AM
douardda updated this revision to Diff 3139.Jan 24 2019, 10:11 AM

Typos in commit msg + small simplification in language.py

aka. make max_content_size a property instead of overloading the prepare()
method.

This revision was automatically updated to reflect the committed changes.