Explain how to attach the source code during development
adrianbartnik opened this issue · comments
More of a question then actual feature request, but I tried to extend this plugin with a feature to search for pyproject.toml
files also in subdirectories. I encounter this quite frequently, when the actual python project including the pyproject.toml
file is in a nested folder relative to the the project root. Usually, there is only one python project and the nesting level is usually 1, so it's directly underneath the project root.
I tried to understand how I would be able to add this myself and also got IntelliJ up-and-running from this repository. However, the development experience is quite frustrating since the PyCharm-sources are not available.
So, my question is two-fold:
- Did you consider searching the project folders recursively in order to find the
pyproject.toml
file? - If not, how can I attach the Pycharm-sources to IntelliJ in order to easily understand the plugin works in order to potentially add this feature myself? If it's possible, I would be happy to add instructions on how to do that to the documentation.
I checked the Jetbrains documentation, but couldn't find any pointers. The closest I could find is this thread in their forum, which leads to nowhere: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010766059-Can-t-find-sources-for-python-ce-jar-when-developing-a-plugin?page=1#community_comment_4404710714130
@adrianbartnik
I'm sorry for my late reply.
- Did you consider searching the project folders recursively in order to find the pyproject.toml file?
A short answer is No. this plugin expects one project for pyproject.toml.
I wouldn't like to search pyproject.toml into a nested directory, Because Pipenv is too.
- If not, how can I attach the Pycharm-sources to IntelliJ in order to easily understand the plugin works in order to potentially add this feature myself? If it's possible, I would be happy to add instructions on how to do that to the documentation.
You can attach a nested project to the current project. It means you open multiple projects in the same window.
https://www.jetbrains.com/help/pycharm/open-projects.html#6e743726
What do you think about it?
Thanks @koxudaxi.
I wouldn't like to search pyproject.toml into a nested directory, Because Pipenv is too.
What would be the consequences of that?
You can attach a nested project to the current project.
Probably the easiest option. I am just wondering, because later version of the IntelliJ-Gradle plugin offer an option to set downloadSources
to true, meaning debugging a plugin and directly inspecting the source from IntelliJ is more comfortable. However, for that I think one would need to upgrade the version of this plugin, which seems to take more time.
Feel free to close this issue. I got the answers I was looking for.