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

tweak the client #257

Merged
merged 1 commit into from
Apr 1, 2024
Merged

tweak the client #257

merged 1 commit into from
Apr 1, 2024

Conversation

emrgnt-cmplxty
Copy link
Contributor

@emrgnt-cmplxty emrgnt-cmplxty commented Apr 1, 2024

Ellipsis 🚀 This PR description was created by Ellipsis for commit 80a6183.

Summary:

This PR enhances error handling and logging in the Client class in client.py by importing additional modules and modifying exception handling.

Key points:

  • Added logging and time modules to client.py.
  • Changed exception handling in _initialize_database method of Client class to catch all exceptions.
  • Changed MetaData instantiation in Client class constructor.

Generated with ❤️ by ellipsis.dev

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review April 1, 2024 07:19
Copy link

vercel bot commented Apr 1, 2024

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

Name Status Preview Updated (UTC)
r2r-docs 🔄 Building (Inspect) Visit Preview Apr 1, 2024 7:19am

@emrgnt-cmplxty emrgnt-cmplxty merged commit 7389c31 into main Apr 1, 2024
1 of 2 checks passed
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.

❌ Changes requested.

  • Reviewed the entire pull request up to 80a6183
  • Looked at 41 lines of code in 1 files
  • Took 1 minute and 6 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. r2r/vecs/client.py:68:
  • Assessed confidence : 50%
  • Comment:
    Consider making the schema name a configurable option instead of hardcoding it. This would provide more flexibility if the schema name needs to be different in some cases.
  • Reasoning:
    The MetaData object is being created with a hardcoded schema name 'vecs'. This might not be an issue if the schema name is not expected to change. However, if there's a possibility that the schema name might need to be different in some cases, it would be better to make this a configurable option.

Workflow ID: wflow_ohYhy9qxdLr1oSos


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. We'll respond in a few minutes. Learn more here.

@@ -78,7 +82,7 @@ def _initialize_database(self):
self._create_extension(sess)
self._get_vector_version(sess)
return
except sqlalchemy.exc.OperationalError as e:
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider catching specific exceptions that you expect might be thrown in this block of code. Catching a general Exception could potentially hide other issues that are not related to OperationalErrors.

@emrgnt-cmplxty emrgnt-cmplxty deleted the feature/tweak-client branch April 2, 2024 06:33
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.

1 participant