8000 feat: add datafile accessor by pthompson127 · Pull Request #275 · optimizely/python-sdk · GitHub
[go: up one dir, main page]

Skip to content
8000

feat: add datafile accessor #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 1, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: fetch datafile from project_config in OptimizelyConfigServi…
…ce constructor
  • Loading branch information
pthompson127 committed Jun 22, 2020
commit e250eac7385621bd81417bc0b53034829cc2aeb5
4 changes: 2 additions & 2 deletions optimizely/optimizely_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, project_config):
self.is_valid = False
return

self._project_config = project_config
self._datafile = project_config.to_datafile()
self.experiments = project_config.experiments
self.feature_flags = project_config.feature_flags
self.groups = project_config.groups
Expand All @@ -98,7 +98,7 @@ def get_config(self):
experiments_key_map, experiments_id_map = self._get_experiments_maps()
features_map = self._get_features_map(experiments_id_map)

return OptimizelyConfig(self.revision, experiments_key_map, features_map, self._project_config.to_datafile())
return OptimizelyConfig(self.revision, experiments_key_map, features_map, self._datafile)

def _create_lookup_maps(self):
""" Creates lookup maps to avoid redundant iteration of config objects. """
Expand Down
0