Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Improve debug logging, and add help links to warnings #1111

Merged
merged 6 commits into from
Jan 2, 2025

Conversation

tushar-composio
Copy link
Collaborator

@tushar-composio tushar-composio commented Dec 31, 2024

🔍 Review Summary

Release Note

Purpose:

  • Enhance logging functionality and improve user guidance with help links.

Changes:

  • Enhancement:

    • Switched logging level to 'debug' in client/collections.py and tools/toolset.py for detailed debugging insights.
    • Updated deprecation warnings with help links using help_msg in utils/decorators.py and plugins/*/toolset.py.
  • New Feature:

    • Introduced help_msg function in utils/__init__.py to append help links to warnings, aiding user support.

Impact:

  • More comprehensive debugging and improved user guidance through help links, facilitating smoother software use and issue resolution.
Original Description

[!IMPORTANT]
Enhance logging to 'debug' level and add help links to warnings across multiple files, including client/collections.py and tools/toolset.py.

  • Logging Enhancements:
    • Change logging level from info to debug in client/collections.py and tools/toolset.py.
    • Remove redundant info log in tools/toolset.py.
  • Warnings with Help Links:
    • Add help_msg() to warnings in client/collections.py, tools/toolset.py, and multiple plugin toolset files.
    • Update deprecation warnings in utils/decorators.py and plugin toolset files to include help_msg().
  • Utilities:
    • Introduce help_msg() function in utils/__init__.py to append help links to warnings.

This description was created by Ellipsis for 5f91e42. It will automatically update as commits are pushed.


Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2025 6:16am

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 50de4db in 51 seconds

More details
  • Looked at 646 lines of code in 15 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. python/composio/client/collections.py:699
  • Draft comment:
    Consider using logger.debug for less critical log messages, as done here. Ensure consistency across similar log messages.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The change from logger.info to logger.debug is appropriate for less critical information, but it should be consistent across similar log messages.
2. python/composio/tools/toolset.py:603
  • Draft comment:
    Consider using logger.debug for less critical log messages, as done here. Ensure consistency across similar log messages.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The change from logger.info to logger.debug is appropriate for less critical information, but it should be consistent across similar log messages.

Workflow ID: wflow_QZkB4gfwfga0oxXw


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

Walkthrough

This update enhances the logging functionality by switching from info to debug level for various log messages, providing more detailed insights during debugging. It also introduces a new utility function help_msg to append help links to warnings, improving user guidance. Deprecated methods across multiple toolset files now include a warning message with help links, ensuring users are informed about the changes and where to seek assistance.

Changes

File(s) Summary
python/composio/client/collections.py Changed logging level from info to debug and added help links to warnings.
python/composio/tools/toolset.py Replaced info logs with debug logs and improved logging messages.
python/composio/utils/__init__.py Introduced help_msg function for user guidance.
python/composio/utils/decorators.py Added help links to deprecation warnings using help_msg.
python/plugins/*/toolset.py Enhanced deprecation warnings with help links across multiple plugins.

🔗 Related PRs

Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @bot + *your message*
Example: @bot Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @bot + *feedback*
Example: @bot Do not comment on `save_auth` function !

@tushar-composio tushar-composio changed the title Improve debug logging, and add help links to warnings chore: Improve debug logging, and add help links to warnings Dec 31, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on d6e455c in 24 seconds

More details
  • Looked at 143 lines of code in 8 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. python/composio/client/collections.py:37
  • Draft comment:
    Organize imports according to PEP 8 guidelines: standard library imports, third-party imports, and local imports. logging should be imported before help_msg.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The import order in Python should follow PEP 8 guidelines, which suggest grouping imports into three categories: standard library imports, related third-party imports, and local application/library-specific imports. Each group should be separated by a blank line. In this file, the import order is incorrect as 'help_msg' is imported before 'logging'.
2. python/composio/utils/__init__.py:7
  • Draft comment:
    Organize imports according to PEP 8 guidelines: standard library imports, third-party imports, and local imports. sys should be imported before get_enum_key.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The import order in Python should follow PEP 8 guidelines, which suggest grouping imports into three categories: standard library imports, related third-party imports, and local application/library-specific imports. Each group should be separated by a blank line. In this file, the import order is incorrect as 'get_enum_key' is imported before 'sys'.

Workflow ID: wflow_NFwlMB8VwA94j2jm


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 866eaba in 19 seconds

More details
  • Looked at 49 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_M0hjGEpOpL09xf98


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 5f91e42 in 24 seconds

More details
  • Looked at 42 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/plugins/langchain/composio_langchain/toolset.py:4
  • Draft comment:
    Duplicate import of 'Signature'. Remove the redundant import statement.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_9OwxjCFBGs9e0xIs


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@tushar-composio tushar-composio merged commit 33beb02 into master Jan 2, 2025
22 of 24 checks passed
@tushar-composio tushar-composio deleted the ENG-2840 branch January 2, 2025 07:04
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