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

[MAINTENANCE] Refactor RuleBasedProfilerConfig #4882

Merged

Conversation

cdkini
Copy link
Member

@cdkini cdkini commented Apr 18, 2022

Changes proposed in this pull request:

  • Remove class_name and module_name as arguments in the config constructor (as they as consistent between objects)
  • Modify existing code and tests to fit with this new behavior.

Definition of Done

Please delete options that are not relevant.

  • My code follows the Great Expectations style guide
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run any local integration tests and made sure that nothing is broken.

Thank you for submitting!

@netlify
Copy link

netlify bot commented Apr 18, 2022

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit 8ca2148
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/625ef7daf412360008a5ae18
😎 Deploy Preview https://deploy-preview-4882--niobium-lead-7998.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cdkini cdkini marked this pull request as draft April 18, 2022 12:30
@cdkini cdkini self-assigned this Apr 18, 2022
@cdkini cdkini marked this pull request as ready for review April 19, 2022 13:42
Comment on lines 100 to 102
if config.get("class_name") == "RuleBasedProfiler":
config.pop("class_name", None)
config.pop("module_name", None)
Copy link
Member Author

Choose a reason for hiding this comment

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

Ugh this is ugly - how do I differentiate between subclasses that want these attrs and those that don't?

Comment on lines +419 to +420
config.pop("class_name", None)
config.pop("module_name", None)
Copy link
Member Author

Choose a reason for hiding this comment

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

Overrode the parent method because we need to pop these values. Could this be done in a cleaner fashion?

Copy link
Contributor

@Shinnnyshinshin Shinnnyshinshin left a comment

Choose a reason for hiding this comment

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

Love it. Thank you @cdkini

Copy link
Contributor

@alexsherstinsky alexsherstinsky 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

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

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

LGTM!

@cdkini cdkini enabled auto-merge (squash) April 19, 2022 17:56
@cdkini cdkini merged commit abe2ec6 into develop Apr 19, 2022
@cdkini cdkini deleted the maintenance/great-464/great-610/refactor-rbp-config-types branch April 19, 2022 18:33
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

4 participants