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

Add load_from_json and save_to_json to SingleTableMetadata #908

Merged

Conversation

pvk-developer
Copy link
Member

Resolves #874

@pvk-developer pvk-developer marked this pull request as ready for review July 18, 2022 10:40
@pvk-developer pvk-developer requested a review from a team as a code owner July 18, 2022 10:40
@pvk-developer pvk-developer requested review from katxiao and amontanez24 and removed request for a team July 18, 2022 10:40
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2022

Codecov Report

Merging #908 (6362a86) into V1.0.0.dev (5959fe4) will increase coverage by 0.29%.
The diff coverage is 100.00%.

@@              Coverage Diff               @@
##           V1.0.0.dev     #908      +/-   ##
==============================================
+ Coverage       69.18%   69.48%   +0.29%     
==============================================
  Files              39       39              
  Lines            2921     2949      +28     
==============================================
+ Hits             2021     2049      +28     
  Misses            900      900              
Impacted Files Coverage Δ
sdv/metadata/single_table.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5959fe4...6362a86. Read the comment docs.

Copy link
Contributor

@katxiao katxiao left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

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

One thing concerning constraints, but the rest looks good!

'class and version.'
)

return cls._load_from_dict(metadata)
Copy link
Contributor

Choose a reason for hiding this comment

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

The constraint base class has to_dict and from_dict methods that I think we should use here. When someone loads from a json, we should load the constraint instances using that class method, and when they save to a json we should use the constraint's to_dict

Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making the changes!

@pvk-developer pvk-developer force-pushed the issue-874-add-load-from-json-and-save-to-json-stm branch from 67e9a2b to 6362a86 Compare July 19, 2022 21:52
@pvk-developer pvk-developer merged commit fd26ffd into V1.0.0.dev Jul 20, 2022
@pvk-developer pvk-developer deleted the issue-874-add-load-from-json-and-save-to-json-stm branch July 20, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants