Skip to content

Commit c55900d

Browse files
committed
Update TEST env
1 parent 251e3a5 commit c55900d

5 files changed

Lines changed: 16 additions & 16 deletions

File tree

app/api/v1/routes/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def create_api_key(credentials: UserCredentials) -> ApiKeyResponse:
103103
print("\nCreate API key endpoint hit!") # See if we reach this endpoint
104104
print(f"Creating API key for {credentials.email}")
105105
print("\nCreating API key...")
106-
print(f"Test environment: {settings.ENVIRONMENT == 'DEV'}; SKIP EMAIL VERIFICATION: {settings.SKIP_EMAIL_VERIFICATION}")
106+
print(f"Test environment: {settings.ENVIRONMENT == 'TEST'}; SKIP EMAIL VERIFICATION: {settings.SKIP_EMAIL_VERIFICATION}")
107107
log = f"Authenticating user {credentials.email} with password {credentials.password}"
108108
user = await backend.authenticate_user(credentials.email, credentials.password)
109109
log = f"User authenticated: {user}"

app/core/security.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def verify_token(request: Request, credentials: Optional[HTTPAuthorization
124124
"""Verify JWT token and return user info with credits"""
125125
try:
126126
# Skip email verification in test environment
127-
if settings.ENVIRONMENT == "DEV" and settings.SKIP_EMAIL_VERIFICATION:
127+
if settings.ENVIRONMENT == "TEST" and settings.SKIP_EMAIL_VERIFICATION:
128128
print("Test environment detected - skipping email verification")
129129
is_guest = not credentials
130130
if is_guest:

aux_tools/convert_file.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ def convert_harmonica_to_request(
3232
for i, text in enumerate(parts):
3333
speaker = "user" if i % 2 == 0 else "assistant"
3434
paragraphs = [p.strip() for p in text.split('\n') if p.strip()]
35-
36-
for para in paragraphs:
37-
ideas.append(IdeaInput(
38-
id=str(idea_id),
39-
idea=para,
40-
author_id=f"{user_name}_{speaker}"
41-
))
42-
idea_id += 1
35+
if speaker == "user":
36+
for para in paragraphs:
37+
ideas.append(IdeaInput(
38+
id=str(idea_id),
39+
idea=para,
40+
author_id=f"{user_name}_{speaker}"
41+
))
42+
idea_id += 1
4343

4444
return IdeaRequest(
4545
ideas=ideas,
@@ -181,11 +181,11 @@ def convert_request_to_spreadsheet(request_data: dict, output_path: str = "outpu
181181
# Write request to file
182182
output_file = "request.json"
183183
with open(output_file, "w") as f:
184-
json.dump(request.dict(), f, indent=2)
184+
json.dump(request.model_dump(), f, indent=2)
185185
print(f"Request written to {output_file}")
186186

187187
if args.save_as_spreadsheet:
188-
convert_request_to_spreadsheet(request.dict(), "output.xlsx")
188+
convert_request_to_spreadsheet(request.model_dump(), "output.xlsx")
189189

190190
except Exception as e:
191191
print(f"Error: {str(e)}")

supabase/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ otp_expiry = 3600
147147
# sender_name = "Admin"
148148

149149
# Uncomment to customize email template
150-
[auth.email.template.confirmation]
151-
subject = "SimScore - Email Verification"
152-
content_path = "./supabase/templates/email_verification.html"
150+
# [auth.email.template.confirmation]
151+
# subject = "SimScore - Email Verification"
152+
# content_path = "./supabase/templates/email_verification.html"
153153

154154
[auth.sms]
155155
# Allow/disallow new user signups via SMS to your project.

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def is_local_supabase():
268268
@pytest.fixture
269269
def is_test_env():
270270
"""Check if we're in test environment with verification disabled"""
271-
return settings.ENVIRONMENT == "DEV" and settings.SKIP_EMAIL_VERIFICATION
271+
return settings.ENVIRONMENT == "TEST" and settings.SKIP_EMAIL_VERIFICATION
272272

273273
@pytest.fixture(autouse=True)
274274
def disable_limiter():

0 commit comments

Comments
 (0)