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

Allow me to create a Custom Constraint Class and use it in the same file (filepath=None) #1223

Merged
merged 9 commits into from
Feb 3, 2023

Conversation

amontanez24
Copy link
Contributor

resolves #1205

@amontanez24 amontanez24 requested a review from a team as a code owner February 2, 2023 03:43
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2023

Codecov Report

Base: 95.54% // Head: 95.56% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (b40ee73) compared to base (272616d).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@              Coverage Diff               @@
##           V1.0.0.dev    #1223      +/-   ##
==============================================
+ Coverage       95.54%   95.56%   +0.01%     
==============================================
  Files              44       44              
  Lines            3547     3559      +12     
==============================================
+ Hits             3389     3401      +12     
  Misses            158      158              
Impacted Files Coverage Δ
sdv/data_processing/data_processor.py 96.78% <100.00%> (+0.05%) ⬆️
sdv/multi_table/base.py 99.41% <100.00%> (+0.01%) ⬆️
sdv/single_table/base.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

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

Just a few comments, but then it should be good!
Also I realized there are no integration tests for multi_table for both load and add do you mind adding those ? Or we can address it later.

sdv/data_processing/data_processor.py Outdated Show resolved Hide resolved
sdv/data_processing/data_processor.py Show resolved Hide resolved
@amontanez24 amontanez24 force-pushed the issue-1205-custom-constraint-same-file branch from 7650330 to 85c17ea Compare February 2, 2023 21:31
Copy link
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

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

🚢 LG to me.

Copy link
Member

@fealho fealho left a comment

Choose a reason for hiding this comment

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

Pretty good 👍

@@ -10,12 +10,14 @@ def is_valid(column_names, data):

def transform(column_names, data):
"""Transform the constraint."""
return data[column_names] ** 2
data[column_names] = data[column_names] ** 2
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@amontanez24 amontanez24 merged commit ff5d11d into V1.0.0.dev Feb 3, 2023
@amontanez24 amontanez24 deleted the issue-1205-custom-constraint-same-file branch February 3, 2023 21:17
amontanez24 added a commit that referenced this pull request Feb 17, 2023
… file (`filepath=None`) (#1223)

* Adding method and fixing test

* refactoring to store class objects instead of filepaths

* adding and fixing unit tests

* adding multi-table methods

* adding tests

* fixing tests

* moving name validation to its own method

* adding integration tests

* fixing integration test
amontanez24 added a commit that referenced this pull request Mar 23, 2023
… file (`filepath=None`) (#1223)

* Adding method and fixing test

* refactoring to store class objects instead of filepaths

* adding and fixing unit tests

* adding multi-table methods

* adding tests

* fixing tests

* moving name validation to its own method

* adding integration tests

* fixing integration test
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