Skip to content

Commit

Permalink
Merge pull request #404 from pcattori/beta-cleanup
Browse files Browse the repository at this point in the history
Simplified beta check
  • Loading branch information
pcattori committed Jul 1, 2020
2 parents cfb7d34 + aa55c09 commit 7f643d2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tamr_client/_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@


def check():
beta_flag = "TAMR_CLIENT_BETA"
beta_enabled = "1"
beta = os.environ.get(beta_flag)
env_var = "TAMR_CLIENT_BETA"
is_beta_enabled = os.environ.get(env_var) == "1"

if beta != beta_enabled:
if not is_beta_enabled:
msg = (
f"ERROR: 'tamr_client' package is in BETA, but you do not have the '{beta_flag}' environment variable set to '1'."
"\n\nHINT: Use 'tamr_unify_client' package instead for non-BETA features"
f"\nHINT: Set environment variable '{beta_flag}=1' to opt-in to BETA features."
f"ERROR: 'tamr_client' package is in BETA, but you do not have the '{env_var}' environment variable set to '1'."
"\n\nHINT: For non-BETA features, use only the 'tamr_unify_client' package."
f"\nHINT: To opt-in to BETA features, set environment variable: '{env_var}=1'."
"\n\nWARNING: Do not rely on BETA features in production workflows."
" Support from Tamr may be limited."
)
Expand Down

0 comments on commit 7f643d2

Please sign in to comment.