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

feat: Added loggers in sdk and changed version #682

Merged
merged 4 commits into from
Oct 13, 2024

Conversation

Ashutosh619-sudo
Copy link
Contributor

@Ashutosh619-sudo Ashutosh619-sudo commented Oct 10, 2024

Description

Please add PR description here, add screenshots if needed

Clickup

Please add link here
https://app.clickup.com/1864988/v/l/6-901603904304-1

Summary by CodeRabbit

  • New Features

    • Enhanced logging capabilities for the QBO API to provide more detailed output during debugging.
  • Chores

    • Updated the qbosdk package version to ensure compatibility and access to the latest features.
    • Updated the fyle package version for improved functionality.
    • Updated the fyle-rest-auth package version for better performance.

Copy link

coderabbitai bot commented Oct 10, 2024

Walkthrough

The changes involve updates to two files: fyle_qbo_api/settings.py and requirements.txt. A new logging configuration for the qbosdk.apis.api_base logger has been added in settings.py, enabling a 'console' handler with 'INFO' level and propagation. Additionally, the requirements.txt file has been modified to update the versions of several packages: qbosdk from 0.18.0 to 0.18.1, fyle from 0.37.0 to 0.37.2, and fyle-rest-auth from 1.7.2 to 1.7.3. No other significant changes were made to the logic or structure of the files.

Changes

File Change Summary
fyle_qbo_api/settings.py Added logging configuration for qbosdk.apis.api_base with level INFO.
requirements.txt Updated package versions: qbosdk from 0.18.0 to 0.18.1, fyle from 0.37.0 to 0.37.2, fyle-rest-auth from 1.7.2 to 1.7.3.

Possibly related PRs

  • feat: Add middleware to log all post requests #680: The changes in this PR involve adding a logging middleware that logs POST requests, which is directly related to the new logging configuration introduced in the main PR for the qbosdk.apis.api_base logger.
  • feat: Adding loggers for workspaces api #681: This PR enhances logging for the workspaces API, which aligns with the logging improvements made in the main PR, indicating a broader effort to improve logging across the application.

Suggested labels

size/S

Suggested reviewers

  • ashwin1111

Poem

In the code where bunnies play,
A logger hops in, bright as day.
With INFO tales it now will tell,
As qbosdk grows, all is well!
Hopping forward, we embrace,
Each change brings a joyful trace! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 86e7a64 and f7743d2.

📒 Files selected for processing (1)
  • requirements.txt (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • requirements.txt

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the size/XS Extra Small PR label Oct 10, 2024
Copy link

Tests Skipped Failures Errors Time
261 0 💤 0 ❌ 0 🔥 1m 1s ⏱️

@@ -144,6 +144,11 @@
'handlers': ['console'],
'level': 'INFO',
},
'qbosdk.apis.api_base': {
'handlers': ['console'],
'level': 'DEBUG',
Copy link
Contributor

Choose a reason for hiding this comment

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

let's do INFO by default. When we bash and run some scripts, we can have it DEBUG.

import logging

logger = logging.getLogger('qbosdk.apis.api_base')
logger.setLevel(logging.DEBUG)
<rest of script>

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
fyle_qbo_api/settings.py (1)

147-151: LGTM! Consider adding a comment for clarity.

The new logger configuration for 'qbosdk.apis.api_base' looks good. It follows the suggestion from the previous review to use INFO level by default. The use of the 'console' handler and enabling propagation are consistent with good logging practices.

For consistency with other parts of the configuration, consider adding a brief comment explaining the purpose of this logger:

'qbosdk.apis.api_base': {
    # Logger for QuickBooks Online SDK API base
    'handlers': ['console'],
    'level': 'INFO',
    'propagate': True
},
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7f6ef3f and ea36e61.

📒 Files selected for processing (1)
  • fyle_qbo_api/settings.py (1 hunks)
🧰 Additional context used

Copy link

Tests Skipped Failures Errors Time
261 0 💤 0 ❌ 0 🔥 45.271s ⏱️

Copy link

Tests Skipped Failures Errors Time
261 0 💤 0 ❌ 0 🔥 45.256s ⏱️

Copy link

Tests Skipped Failures Errors Time
261 0 💤 0 ❌ 0 🔥 1m 1s ⏱️

Copy link

codecov bot commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.49%. Comparing base (94f4a67) to head (f7743d2).
Report is 16 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #682      +/-   ##
==========================================
- Coverage   94.70%   94.49%   -0.22%     
==========================================
  Files          61       61              
  Lines        4801     4920     +119     
==========================================
+ Hits         4547     4649     +102     
- Misses        254      271      +17     

see 2 files with indirect coverage changes

@Ashutosh619-sudo Ashutosh619-sudo merged commit 2bdd3ed into master Oct 13, 2024
5 of 6 checks passed
Ashutosh619-sudo added a commit that referenced this pull request Oct 14, 2024
* feat: Added loggers in sdk and changed version

* comment resolved

* bump up fyle-rest-auth and fyle platform version
Ashutosh619-sudo added a commit that referenced this pull request Oct 14, 2024
* feat: Added loggers in sdk and changed version

* comment resolved

* bump up fyle-rest-auth and fyle platform version
@coderabbitai coderabbitai bot mentioned this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Extra Small PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants