Skip to content
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

fix: change datafile accessor feature to return a string representation of datafile #283

Merged
merged 5 commits into from
Jul 24, 2020

Conversation

pthompson127
Copy link
Contributor

@pthompson127 pthompson127 commented Jul 9, 2020

Summary

  • Updated datafile to ensure that it is being stored and returned as a string type instead of previous bytes type

Test Plan

  • Ran manual tests

Note

  • Sohail mentioned that tests were failing in fullstack_prod_suite because the bytes datafile was not iterable, so I changed it to return a string

@pthompson127 pthompson127 requested a review from a team as a code owner July 9, 2020 20:59
@pthompson127 pthompson127 self-assigned this Jul 9, 2020
@coveralls
Copy link

coveralls commented Jul 9, 2020

Coverage Status

Coverage remained the same at 97.154% when pulling 6357c04 on peter/datafile-accessor-json into 5d35a59 on master.

@pthompson127 pthompson127 removed their assignment Jul 9, 2020
@@ -40,7 +40,7 @@ def __init__(self, datafile, logger, error_handler):
"""

config = json.loads(datafile)
self._datafile = datafile
self._datafile = str(datafile)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will have to specify encoding here if I understand correctly. It should be utf-8.

Python 2 by default does ascii and Python 3 does utf-8.

Copy link
Contributor

@aliabbasrizvi aliabbasrizvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change needed.

Copy link
Contributor

@Mat001 Mat001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -40,7 +40,7 @@ def __init__(self, datafile, logger, error_handler):
"""

config = json.loads(datafile)
self._datafile = datafile
self._datafile = str(datafile)
Copy link
Contributor

@Mat001 Mat001 Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is per @mjc1283 's request. That's fine w me if we want to return a string. though SOhail prefers JSON, but Peter found a way to still return string and then convert it back to JSON in the FSC.

Copy link

@mjc1283 mjc1283 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please wait for Ali's approval before merging.

Copy link
Contributor

@aliabbasrizvi aliabbasrizvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be good now, but we should only merge when we have run against compatibility suite tests.

@pthompson127
Copy link
Contributor Author

Reran FSC tests with datafile accessor flag and passed. Merging.

@pthompson127 pthompson127 merged commit 3417408 into master Jul 24, 2020
@pthompson127 pthompson127 deleted the peter/datafile-accessor-json branch July 24, 2020 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants