koxudaxi / poetry-pycharm-plugin

A PyCharm plugin for poetry

Home Page:https://koxudaxi.github.io/poetry-pycharm-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project dependency detection via pyproject.toml

benfiola opened this issue · comments

So, say I have the following folder structure:

root/
    library/
        poetry.lock
        pyproject.toml
    dependency/
       poetry.lock
       pyproject.toml

I would attach root/library and root/dependency as individual Pycharm projects - each with their own Poetry environments.

However, these projects can also depend on each other:

#root/library/pyproject.toml
...

[tool.poetry.dependencies]
dependency = {path = "../dependency", develop = true}

While this all works pretty well, I still need to go into Preferences -> Project -> Project Dependencies and specify how these projects depend on one another manually. Is it possible for the Poetry plugin to detect these dependencies and automatically configure the Preferences -> Project -> Project Dependencies panel accordingly?

If it's possible (I'm unfamiliar with the Pycharm plugin APIs and would have to look around) and there's interest, I'd love to contribute a PR to support this as it'd be really useful in my opinion.

@benfiola
Thank you for your suggestion.
OK, I will check that the plugin detects and set the dependency.