Cleanup : Removing hardcoded strings#222
Merged
AkhileshNegi merged 7 commits intomainfrom Jun 18, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
AkhileshNegi
requested changes
Jun 13, 2025
| return bool(self.SMTP_HOST and self.EMAILS_FROM_EMAIL) | ||
|
|
||
| EMAIL_TEST_USER: EmailStr = "test@example.com" | ||
| EMAIL_TEST_USER: EmailStr |
Collaborator
There was a problem hiding this comment.
the idea is also to check if we are using these variables and if not then remove it
Collaborator
Author
There was a problem hiding this comment.
This variable is being used in test cases for user and login routes
backend/app/core/config.py
Outdated
| # 60 minutes * 24 hours * 1 days = 1 days | ||
| ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 1 | ||
| FRONTEND_HOST: str = "http://localhost:5173" | ||
| FRONTEND_HOST: str |
Collaborator
There was a problem hiding this comment.
do we need FRONTEND_HOST ?
Collaborator
Author
There was a problem hiding this comment.
We don't, hence I have removed it from config.py and everything else related to frontend configuration
AkhileshNegi
approved these changes
Jun 16, 2025
avirajsingh7
approved these changes
Jun 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Target issue is #209
Notes on changes made
Along with removing hardcoded strings (EMAIL TEST USER and FRONTEND_HOST) , The removal of the prefix for the AWS S3 bucket ("ai-platform-documents") was done in this pr as well , as it was hardcoded in config.py. Additionally, the variavle was moved to .env for it to fetch the prefix from there.
Additionally, the ENVIRONMENT variable is not hardcoded in config.py. The code supports fetching it from the .env file, and if it's not provided, it defaults to "local".
Removed all SMTP-related credentials and variables associated with frontend configurations. Removed test cases that were using SMTP credentials for sending recovery emails and related functionalities.
Eliminated CORS middleware setup in both the configuration file and
app/main.pyas the service will not have a frontend in the near future.Additional Explanation: