-
Notifications
You must be signed in to change notification settings - Fork 77
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
snippets display improvement #716
snippets display improvement #716
Conversation
@bbeat2782 you don't need to query the tables. instead, you can create a table that displays the snippet names e.g.
you can use this: Line 10 in 4b938ed
|
@edublancas Oh that is what you meant when you said table. Thanks. Will make the change. |
Output of Output of The above images are screen captured images from snippet_display_improvement.ipynb.zip |
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.
looks good. Added one comment about the test.
src/tests/test_magic_cmd.py
Outdated
), | ||
), | ||
( | ||
"%sqlcmd snippets -d high_price_a", |
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.
Deleting a snippet might affect some other tests. To make sure we are not, I think you can create a new snippet and see if it's in the table. then, clean up these snippets. I would test the following cases: no snippets, 1, 2, and 3 snippets.
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.
@yafimvo
To ensure it doesn't affect other tests, I created a new @pytest.fixture
for this test function for creating and deleting snippets.
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.
lgtm!
Describe your changes
Change
%sqlcmd snippets
output into displaying 1. snippet name 2. snippet query 3. snippet table.Still working on 1. figuring out how to retrieve
SqlMagic.displaylimit
2. adding test functions 3. update documentation if needed, but I want to know whether it's on the right direction or not.Issue number
Closes #648
Checklist before requesting a review
pkgmt format
📚 Documentation preview 📚: https://jupysql--716.org.readthedocs.build/en/716/