Skip to content

Conversation

@wcf000
Copy link
Contributor

@wcf000 wcf000 commented Jul 29, 2025

This pull request refactors the Supabase integration to improve configuration management and standardize module imports. The most important changes include switching from Django settings to environment variables for configuration, updating the environment variable usage in the Supabase initialization function, and restructuring import paths for better modularity.

Configuration Management Updates:

  • Replaced the use of Django settings (settings) with environment variables (os.getenv) for Supabase configuration in SupabaseService (_service.py). Updated error messages to reflect the new source of configuration.
  • Modified the initialize_supabase function to prioritize the SUPABASE_SERVICE_ROLE_KEY over SUPABASE_ANON_KEY for backend operations, ensuring compatibility with role-based access control. Updated error handling to account for this change. (init.py) [1] [2]

Codebase Restructuring:

  • Updated import paths for Supabase-related modules in various test files to reflect a new directory structure under app.core.third_party_integrations. (tests/conftest.py, tests/test_edge_functions.py, tests/test_integration.py, tests/test_service.py) [1] [2] [3] [4]
  • Adjusted the import path for the environment file loader in init.py to align with the updated project structure.

@TechWithTy TechWithTy merged commit 1e2421c into TechWithTy:main Aug 4, 2025
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