Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Explain how to attach the source code during development #261

Open
adrianbartnik opened this issue Aug 4, 2021 · 2 comments
Open

Explain how to attach the source code during development #261

adrianbartnik opened this issue Aug 4, 2021 · 2 comments

Comments

@adrianbartnik
Copy link

adrianbartnik commented Aug 4, 2021

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:

  1. Did you consider searching the project folders recursively in order to find the pyproject.toml file?
  2. 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

@koxudaxi
Copy link
Owner

@adrianbartnik
I'm sorry for my late reply.

  1. 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.

  1. 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?

@adrianbartnik
Copy link
Author

adrianbartnik commented Sep 4, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants