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 --piionly flag #82

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

add --piionly flag #82

wants to merge 17 commits into from

Conversation

purna2U
Copy link
Contributor

@purna2U purna2U commented Jun 15, 2023

Description: Adds --piionly flag

JIRA: Link to JIRA ticket

Dependencies: dependencies on other outstanding PRs, issues, etc.

Merge deadline: List merge deadline (if any)

Installation instructions: List any non-trivial installation
instructions.

Testing instructions:

  1. Open page A
  2. Do thing B
  3. Expect C to happen
  4. If D happened instead - check failed.

Reviewers:

  • tag reviewer
  • tag reviewer

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)

Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.

@purna2U purna2U requested a review from a team as a code owner June 15, 2023 00:14
@purna2U purna2U changed the title feat: update app.py add --piionly flag Jun 15, 2023
@@ -239,6 +239,8 @@ def write_sql(self, raw_schema, no_pii=False):
else:
if no_pii:
view_types = ["SAFE"]
elif pii_only:
view_types = ["PII"]
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

might want to add an erro here if someone specifies both flags. Probably a ValueError ? The flags should be exclusive

Copy link
Contributor

Choose a reason for hiding this comment

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

I just saw the below, though I think this could still benefit from something to prevent someone from accidentally making an api call to this with both flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dnuzz Sounds good, added an initial condition to raise an exception

],
"models": [],
}
if not pii_only:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe take the approach as below and just append to the sources if not pii_only just to make this a bit cleaner and easier to follow. I know I was the one who started this trend so I accept this is me asking you to fix my mistake 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, rearranged

@dnuzz
Copy link
Contributor

dnuzz commented Jun 16, 2023

Oh, can you also add a test to confirm the flag has the expected behavior/ output?

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.

2 participants