Ejemplo n.º 1
0
def pytest_configure():
    from addok import hooks
    import addok_sqlite_store
    from addok.config import config
    config.DOCUMENT_STORE_PYPATH = 'addok_sqlite_store.SQLiteStore'
    config.SQLITE_DB_PATH = 'addok_test.db'
    hooks.register(addok_sqlite_store)
Ejemplo n.º 2
0
def pytest_configure():
    print('Configuring trigrams')
    from addok.config import config
    from addok import hooks
    import addok_trigrams
    hooks.register(addok_trigrams)
    config.RESULTS_COLLECTORS.remove('addok.helpers.collectors.extend_results_reducing_tokens')  # noqa
    config.RESULTS_COLLECTORS += [
        'addok_trigrams.extend_results_removing_numbers',
        'addok_trigrams.extend_results_removing_one_whole_word',
        'addok_trigrams.extend_results_removing_successive_trigrams',
    ]
    config.PROCESSORS += ['addok_trigrams.trigramize']
    config.SEARCH_RESULT_PROCESSORS.remove('addok.helpers.results.match_housenumber')  # noqa
    config.SEARCH_RESULT_PROCESSORS.insert(0, 'addok_trigrams.match_housenumber')  # noqa
Ejemplo n.º 3
0
def pytest_configure():
    print('Configuring trigrams')
    from addok.config import config
    from addok import hooks
    import addok_trigrams
    hooks.register(addok_trigrams)
    config.RESULTS_COLLECTORS_PYPATHS.remove('addok.helpers.collectors.extend_results_reducing_tokens')  # noqa
    config.RESULTS_COLLECTORS_PYPATHS += [
        'addok_trigrams.extend_results_removing_numbers',
        'addok_trigrams.extend_results_removing_one_whole_word',
        'addok_trigrams.extend_results_removing_successive_trigrams',
    ]
    config.PROCESSORS_PYPATHS += ['addok_trigrams.trigramize']
    config.INDEXERS_PYPATHS.remove('addok.pairs.PairsIndexer')
    config.INDEXERS_PYPATHS.remove('addok.autocomplete.EdgeNgramIndexer')
Ejemplo n.º 4
0
def pytest_configure():
    from addok import hooks
    import addok_http_falcon
    hooks.register(addok_http_falcon)
Ejemplo n.º 5
0
def load_core_plugins():
    for path in PLUGINS:
        plugin = importlib.import_module(path)
        hooks.register(plugin)
Ejemplo n.º 6
0
 def load_core_plugins(self):
     for path in self.plugins:
         plugin = importlib.import_module(path)
         hooks.register(plugin)
Ejemplo n.º 7
0
def pytest_configure():
    from addok import hooks
    from addok_csv import plugin
    hooks.register(plugin)
Ejemplo n.º 8
0
def pytest_configure():
    from addok import hooks
    import addok_csv
    hooks.register(addok_csv)
Ejemplo n.º 9
0
def pytest_configure():
    from addok import hooks
    import addok_fr
    hooks.register(addok_fr)