зеркало из https://github.com/mozilla/taar.git
missed an argument when instantiating the LazyJSONLoader
not caught during unittests as the JSON loader itself is clobbered by a mock
This commit is contained in:
Родитель
6b95af983b
Коммит
7f6b2e7442
2
setup.py
2
setup.py
|
@ -3,7 +3,7 @@ from setuptools import find_packages, setup
|
|||
setup(
|
||||
name='mozilla-taar3',
|
||||
use_scm_version=False,
|
||||
version='0.1.1',
|
||||
version='0.3.1',
|
||||
setup_requires=['setuptools_scm', 'pytest-runner'],
|
||||
tests_require=['pytest'],
|
||||
include_package_data = True,
|
||||
|
|
|
@ -19,7 +19,7 @@ class WeightCache:
|
|||
if 'ensemble_weights' in self._ctx:
|
||||
self._weights = self._ctx['ensemble_weights']
|
||||
else:
|
||||
self._weights = LazyJSONLoader(ctx,
|
||||
self._weights = LazyJSONLoader(self._ctx,
|
||||
S3_BUCKET,
|
||||
ENSEMBLE_WEIGHTS)
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@ class LocaleRecommender(AbstractRecommender):
|
|||
if 'locale_mock_data' in self._ctx:
|
||||
self._top_addons_per_locale = self._ctx['locale_mock_data']
|
||||
else:
|
||||
self._top_addons_per_locale = LazyJSONLoader(ADDON_LIST_BUCKET, ADDON_LIST_KEY)
|
||||
self._top_addons_per_locale = LazyJSONLoader(self._ctx,
|
||||
ADDON_LIST_BUCKET,
|
||||
ADDON_LIST_KEY)
|
||||
|
||||
self._init_from_ctx()
|
||||
self.logger = self._ctx[IMozLogging].get_logger('taar')
|
||||
|
|
|
@ -44,12 +44,12 @@ class SimilarityRecommender(AbstractRecommender):
|
|||
if 'similarity_donors_pool' in self._ctx:
|
||||
self._donors_pool = self._ctx['similarity_donors_pool']
|
||||
else:
|
||||
self._donors_pool = LazyJSONLoader(S3_BUCKET, DONOR_LIST_KEY)
|
||||
self._donors_pool = LazyJSONLoader(self._ctx, S3_BUCKET, DONOR_LIST_KEY)
|
||||
|
||||
if 'similarity_lr_curves' in self._ctx:
|
||||
self._lr_curves = self._ctx['similarity_lr_curves']
|
||||
else:
|
||||
self._lr_curves = LazyJSONLoader(S3_BUCKET, LR_CURVES_SIMILARITY_TO_PROBABILITY)
|
||||
self._lr_curves = LazyJSONLoader(self._ctx, S3_BUCKET, LR_CURVES_SIMILARITY_TO_PROBABILITY)
|
||||
|
||||
self.logger = self._ctx[IMozLogging].get_logger('taar')
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче