-
Notifications
You must be signed in to change notification settings - Fork 59
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
vdk-ipython: package ipython correctly #2471
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8f0ff8b
control-service: use full url for control service
fb5ab36
control-service: use full url for control service
c166963
control-service: use full url for control service
ca7fbef
control-service: use full url for control service
ff90761
control-service:fix failing pipelines
f5ae9e3
control-service:fix failing pipelines
e960889
control-service:fix failing pipelines
5ce8400
control-service:fix failing pipelines
1139082
control-service: test trino full url
bb07a33
control-service: test trino full url
05be46c
control-service: test trino full url
6fef7f8
control-service: test trino full url
80a24d4
control-service: test trino full url
e834930
vdk-ipython: package ipython correctly
38bb0c5
csv
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't understand the fix. Removing it seems like bad idea. We keep sources in "src" folder so we use setuptools.find_namespace_packages to automatically find all the Python packages within the directory
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.
@tozka there are no packages in that python project. There is just a single python file at the root of source.
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.
Oh, that's not following the plugin templates.
The source code should be in in "src" directory in package starting with
vdk.plugin.<plugin-name>....
That's the structure of all other plugins . It's the one setup if a plugin is created using the cookiecutter - https://github.com/tozka/cookiecutter-vdk-plugin/tree/main
But I don't get the problems? Which files are not included? And why do we need them?
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.
vdk_ipython.py is at the root of the source folder. It is not in a package so if that line is in the setup.py then this file is dropped.
@duyguHsnHsn do you think we could put the plugin in a package or would it make it less usable for customers do you think?
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 think I got the problem.
find_namespace_packages
doesn't include files that are not in a directory (aka package), and those that are at the root level specified are ignored. I find this a bit strange to be honest. And slightly problematic. I would expect find_namespace_packages to assume root level files are in the global namespace/package.The current approach you are doing would also have a namespace/package. If you unzip the tar you will see the file is inside a "src" folder . So a user would need to do
you can test it yourself by installing
pip install dist/vdk-ipython-0.1.0.tar.gz
The test pass because they assume "src" structure is kept and set src on the PythonPath and ignore setup.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.
I am in favour of changing it to
src/vdk/plugin/ipython.py
Then when the extension is loaded it would look like
load_ext vdk.plugin.ipython