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

Skip to content

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
style: reorder datafile accessor method to more appropriate location
  • Loading branch information
pthompson127 committed Jun 23, 2020
commit 6e2038d5acadf41f469252c6aa0a01d6020d7373
18 changes: 9 additions & 9 deletions optimizely/project_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ def get_typecast_value(self, value, type):
else:
return value

def to_datafile(self):
""" Get the datafile.

Returns:
A JSON string representation of the project datafile.
"""

return self._datafile

def get_version(self):
""" Get version of the datafile.

Expand Down Expand Up @@ -532,12 +541,3 @@ def is_feature_experiment(self, experiment_id):
"""

return experiment_id in self.experiment_feature_map

def to_datafile(self):
""" Get the datafile.

Returns:
A JSON string representation of the project datafile.
"""

return self._datafile
0