🏗️ Fix project skeleton and align dependencies#90
Conversation
Greptile OverviewGreptile SummaryThis PR fixes module resolution by adding Key Changes:
Issues Found:
Confidence Score: 3/5
Important Files Changed
|
|
|
||
| def __init__(self): | ||
| """Initialize Telegram bot with credentials from environment.""" | ||
| self.bot_token = global_config.TELEGRAM_BOT_TOKEN |
There was a problem hiding this comment.
TELEGRAM_BOT_TOKEN not defined in common/global_config.py. Add this field to the Config class or this will fail at runtime.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/utils/integration/telegram.py
Line: 15:15
Comment:
`TELEGRAM_BOT_TOKEN` not defined in `common/global_config.py`. Add this field to the `Config` class or this will fail at runtime.
How can I resolve this? If you propose a fix, please make it concise.| Optional[int]: The message ID if successful, None otherwise | ||
| """ | ||
| # Get chat ID from configuration | ||
| chat_id = getattr(global_config.telegram.chat_ids, chat_name, None) |
There was a problem hiding this comment.
global_config.telegram.chat_ids not defined in config structure. Add the telegram field with nested chat_ids to Config class or this will fail at runtime.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/utils/integration/telegram.py
Line: 84:84
Comment:
`global_config.telegram.chat_ids` not defined in config structure. Add the `telegram` field with nested `chat_ids` to `Config` class or this will fail at runtime.
How can I resolve this? If you propose a fix, please make it concise.| """Telegram Bot integration for sending alerts and notifications.""" | ||
|
|
||
| import requests | ||
| from loguru import logger as log | ||
| from requests.exceptions import RequestException | ||
|
|
||
| from common import global_config |
There was a problem hiding this comment.
Missing setup_logging() call. Per logging standards, import and call setup_logging() from src.utils.logging_config at module level.
| """Telegram Bot integration for sending alerts and notifications.""" | |
| import requests | |
| from loguru import logger as log | |
| from requests.exceptions import RequestException | |
| from common import global_config | |
| """Telegram Bot integration for sending alerts and notifications.""" | |
| import requests | |
| from loguru import logger as log | |
| from requests.exceptions import RequestException | |
| from common import global_config | |
| from src.utils.logging_config import setup_logging | |
| setup_logging() |
Context Used: Context from dashboard - Standards for using logging in the project. (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/utils/integration/telegram.py
Line: 1:7
Comment:
Missing `setup_logging()` call. Per logging standards, import and call `setup_logging()` from `src.utils.logging_config` at module level.
```suggestion
"""Telegram Bot integration for sending alerts and notifications."""
import requests
from loguru import logger as log
from requests.exceptions import RequestException
from common import global_config
from src.utils.logging_config import setup_logging
setup_logging()
```
**Context Used:** Context from `dashboard` - Standards for using logging in the project. ([source](https://app.greptile.com/review/custom-context?memory=ec5af2c7-d139-40b0-99e5-0f4bf1fee1d7))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Summary
__init__.pyfiles to all source directories to satisfy Ruff'sINP001(implicit namespace package) rule and improve LSP reliability.pydantic,numpy, andrequeststo direct dependencies to fixdeptrytransitive dependency warnings.deptryinpyproject.tomlto ignore development/testing tools in CI checks.