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

Update log_example_reports.py #2182

Merged
merged 5 commits into from
Oct 10, 2024
Merged

Conversation

DhruvKadam-git
Copy link
Contributor

  1. Added logging: Imported the logging module and set up a logger in the main function. This allows for better error tracking and debugging.

  2. Improved file reading: Used a with statement to ensure the file is properly closed after reading. Also added error handling to catch and log any issues when reading the file.

  3. Error handling for Slack SDK import: Added a try-except block to handle cases where the slack_sdk might not be installed.

  4. Enhanced Slack message sending: Added error handling and logging for the Slack message sending process. This will help identify any issues with the Slack integration.

What does this PR do?

Fixes # (issue)

Before submitting

  • [ x ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ x ] Did you read the contributor guideline,
    Pull Request section?
  • [ x ] Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • [ x ] Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines.
  • [ x ] Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

1. Added logging: Imported the logging module and set up a logger in the main function. This allows for better error tracking and debugging.

2. Improved file reading: Used a with statement to ensure the file is properly closed after reading. Also added error handling to catch and log any issues when reading the file.

3. Error handling for Slack SDK import: Added a try-except block to handle cases where the slack_sdk might not be installed.

4. Enhanced Slack message sending: Added error handling and logging for the Slack message sending process. This will help identify any issues with the Slack integration.
@kashif kashif added the ✨ enhancement New feature or request label Oct 7, 2024
Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

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

Thanks @DhruvKadam-git ! LGTM

@DhruvKadam-git
Copy link
Contributor Author

if everything is ok then please merge it

@qgallouedec qgallouedec merged commit 6c32c8b into huggingface:main Oct 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants