refactor: rename Wizamart to Orion across entire codebase
Replace all ~1,086 occurrences of Wizamart/wizamart/WIZAMART/WizaMart with Orion/orion/ORION across 184 files. This includes database identifiers, email addresses, domain references, R2 bucket names, DNS prefixes, encryption salt, Celery app name, config defaults, Docker configs, CI configs, documentation, seed data, and templates. Renames homepage-wizamart.html template to homepage-orion.html. Fixes duplicate file_pattern key in api.yaml architecture rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -145,7 +145,7 @@ api_endpoint_rules:
|
||||
- Dependencies (app/api/deps.py) - authentication/authorization validation
|
||||
- Services (app/services/) - business logic validation
|
||||
|
||||
The global exception handler catches all WizamartException subclasses and
|
||||
The global exception handler catches all OrionException subclasses and
|
||||
converts them to appropriate HTTP responses.
|
||||
|
||||
WRONG (endpoint raises exception):
|
||||
@@ -213,7 +213,6 @@ api_endpoint_rules:
|
||||
file_pattern:
|
||||
- "app/api/v1/vendor/**/*.py"
|
||||
- "app/modules/*/routes/api/store*.py"
|
||||
file_pattern:
|
||||
- "app/api/v1/storefront/**/*.py"
|
||||
- "app/modules/*/routes/api/storefront*.py"
|
||||
discouraged_patterns:
|
||||
|
||||
@@ -44,17 +44,17 @@ exception_rules:
|
||||
- "exc_info=True"
|
||||
|
||||
- id: "EXC-004"
|
||||
name: "Domain exceptions must inherit from WizamartException"
|
||||
name: "Domain exceptions must inherit from OrionException"
|
||||
severity: "error"
|
||||
description: |
|
||||
All custom domain exceptions must inherit from WizamartException (or its
|
||||
All custom domain exceptions must inherit from OrionException (or its
|
||||
subclasses like ResourceNotFoundException, ValidationException, etc.).
|
||||
This ensures the global exception handler catches and converts them properly.
|
||||
pattern:
|
||||
file_pattern:
|
||||
- "app/exceptions/**/*.py"
|
||||
- "app/modules/*/exceptions.py"
|
||||
required_base_class: "WizamartException"
|
||||
required_base_class: "OrionException"
|
||||
example_good: |
|
||||
class VendorNotFoundException(ResourceNotFoundException):
|
||||
def __init__(self, vendor_code: str):
|
||||
@@ -65,7 +65,7 @@ exception_rules:
|
||||
severity: "error"
|
||||
description: |
|
||||
The global exception handler must be set up in app initialization to
|
||||
catch WizamartException and convert to HTTP responses.
|
||||
catch OrionException and convert to HTTP responses.
|
||||
pattern:
|
||||
file_pattern: "app/main.py"
|
||||
required_patterns:
|
||||
|
||||
@@ -157,7 +157,7 @@ javascript_rules:
|
||||
- Page URLs (not API calls) like window.location.href = `/vendor/${vendorCode}/...`
|
||||
|
||||
Why this matters:
|
||||
- Including vendorCode causes 404 errors ("/vendor/wizamart/orders" not found)
|
||||
- Including vendorCode causes 404 errors ("/vendor/orion/orders" not found)
|
||||
- The JWT token already identifies the vendor
|
||||
- Consistent with the API design pattern
|
||||
pattern:
|
||||
|
||||
@@ -154,16 +154,16 @@ module_rules:
|
||||
severity: "warning"
|
||||
description: |
|
||||
Self-contained modules should have an exceptions.py file defining
|
||||
module-specific exceptions that inherit from WizamartException.
|
||||
module-specific exceptions that inherit from OrionException.
|
||||
|
||||
Structure:
|
||||
app/modules/{module}/exceptions.py
|
||||
|
||||
Example:
|
||||
# app/modules/analytics/exceptions.py
|
||||
from app.exceptions import WizamartException
|
||||
from app.exceptions import OrionException
|
||||
|
||||
class AnalyticsException(WizamartException):
|
||||
class AnalyticsException(OrionException):
|
||||
"""Base exception for analytics module."""
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user