-
Notifications
You must be signed in to change notification settings - Fork 185
Encode Options #875
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
taylorfturner
merged 17 commits into
capitalone:feature/profile-serialization
from
micdavis:encode-decode-structured-options
Jun 21, 2023
Merged
Encode Options #875
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d139428
encode testing
micdavis c95f246
encode dataLabeler testing
micdavis 45fd152
encode structuredOptions testing
micdavis b670982
cleaned up datalabeler test
micdavis f975b7e
added text options
micdavis c3dffc8
added unstructuredOptions, profilerOptions, and textProfilerOptions test
micdavis 6012392
cleaned up structuredOptions test
micdavis 2b2db26
refactored options encode testing
micdavis b65788b
fixing formatting issue
micdavis 45a33d8
updated test name
micdavis 4c4b8c3
updated test
micdavis e2b3f06
updated profilerOptions test
micdavis 965e810
updated class names
micdavis 42ecf04
fixing data labeler test
micdavis b6244a0
fixing test
micdavis 62c2588
fixing test
micdavis 3ffc639
refactored test
micdavis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
dataprofiler/tests/profilers/profiler_options/test_correlation_options.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import json | ||
|
|
||
| from dataprofiler.profilers.json_encoder import ProfileEncoder | ||
| from dataprofiler.profilers.profiler_options import CorrelationOptions | ||
| from dataprofiler.tests.profilers.profiler_options.test_base_inspector_options import ( | ||
| TestBaseInspectorOptions, | ||
| ) | ||
|
|
||
|
|
||
| class TestCorrelationOptions(TestBaseInspectorOptions): | ||
| def test_json_encode(self): | ||
| option = CorrelationOptions( | ||
| is_enabled=False, columns=["name", "age", "location"] | ||
| ) | ||
|
|
||
| serialized = json.dumps(option, cls=ProfileEncoder) | ||
|
|
||
| expected = { | ||
| "class": "CorrelationOptions", | ||
| "data": {"is_enabled": False, "columns": ["name", "age", "location"]}, | ||
| } | ||
|
|
||
| self.assertDictEqual(expected, json.loads(serialized)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.