koxudaxi / poetry-pycharm-plugin

A PyCharm plugin for poetry
https://koxudaxi.github.io/poetry-pycharm-plugin/
Apache License 2.0
180 stars 14 forks source link

Project dependency detection via pyproject.toml #154

Open benfiola opened 3 years ago

benfiola commented 3 years ago

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.

koxudaxi commented 3 years ago

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