-
Notifications
You must be signed in to change notification settings - Fork 76
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
Resolve circular dependency #787
Conversation
Please review @edublancas |
@neelasha23 I was about to review this but now I see that the tests are failing. what's the status? I guess there are merge conflicts due to recent changes in master? |
Yes the snippets related tests started failing after I rebased. Fixed now. Please review. |
8cadc07
to
153ca93
Compare
Please review @edublancas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that I had reviewed this before but never submitted my observations (they still appeared as "pending" but I think that means you'll never saw them), so I'm submitting them now.
there's a lot of changes in this PR so please write a brief description so I know what to expect. e.g., "moved functions from a.py, b.py, moved functions from c.py into a separate module"
i guess this is mostly moving stuff around and not adding any new stuff so please explain
CHANGELOG.md
Outdated
@@ -12,6 +12,8 @@ | |||
* [Fix] `ResultSet` footer only displayed when `feedback=2` | |||
* [Fix] Current connection and switching connections message only displayed when `feedback>=1` | |||
* [Fix] `--persist/--persist-replace` perform `ROLLBACK` automatically when needed | |||
* [Fix] Resolve circular dependency issue occurring due to multiple imports in `util.py` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are internal changes, we don't put those in the changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG.md
Outdated
@@ -12,6 +12,8 @@ | |||
* [Fix] `ResultSet` footer only displayed when `feedback=2` | |||
* [Fix] Current connection and switching connections message only displayed when `feedback>=1` | |||
* [Fix] `--persist/--persist-replace` perform `ROLLBACK` automatically when needed | |||
* [Fix] Resolve circular dependency issue occurring due to multiple imports in `util.py` | |||
* [Fix] Handling of DuckDB `Parser Error` and `pyodbc.ProgrammingError` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changelog is intended for end-users, please rephrase it so it's more readable for them. as they likely don't know what a parser or programming error is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/sql/connection/connection.py
Outdated
raise exceptions.UsageError(detailed_msg) | ||
else: | ||
print(e) | ||
ErrorHandler(e).handle_exception() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the implementation and I don't see a need for this to be a class. lets turn this into a function (the function can internally call other functions to break the logic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/tests/test_inspect.py
Outdated
@@ -11,6 +11,13 @@ | |||
from sql import inspect, connection | |||
|
|||
|
|||
EXPECTED_SUGGESTIONS_MESSAGE = "Did you mean :" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have an extra space before the :
EXPECTED_SUGGESTIONS_MESSAGE = "Did you mean :" | |
EXPECTED_SUGGESTIONS_MESSAGE = "Did you mean:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog fix moved store lint added fixture error handler typo test import fix import fix return fixed docstrings util test Minor import fix rebase added store_util test modified import
Addressed your comments and updated the PR description @edublancas |
@neelasha23 good work! when writing your initial comment, write each issue on a separate line: closes #X because if you do closes #X #Y github won't close both issues |
Describe your changes
store
utility functions like getting all saved snippets, finding dependents of key, etc tostore_utils.py
, and corresponding tests moved totest_store.py
.util.py
toinspect.py
, and corresponding tests moved totest_inspect.py
error_messages.py
toerror_handler.py
and structured the code by adding more internal functions.util.py
.util.py
. this is needed for the detailed error message logic.Issue number
Closes #749 #545
Checklist before requesting a review
pkgmt format
📚 Documentation preview 📚: https://jupysql--787.org.readthedocs.build/en/787/