#PyCharm monorepo

1 messages · Page 1 of 1 (latest)

spark zenith
#

That’s a good question @short python.

What I do (in general) is open a new IDE instance. I use NeoVim so that just means opening a new tab in the terminal, go the the module’s directory, and open vim from there (I do this with Go modules too). In VS Code that would mean opening a new window for a module.

However, I remember when I used PyCharm daily with Django projects and several private Python libraries used in multiple projects, that you can open a Python project and “attach” to an existing one.

Try this, have PyCharm opened in your existing project, and File > Open the Dagger module’s directory. You should see a dialog with the option to attach to the opened project. Just select that and, assuming you already have the .venv inside the module directory (even if it's in a subdir of your app), PyCharm should now see two interpreters.

If you open a file in your app, you should see the interpreter for your app’s .venv already selected. Then open a file from the module, and you should see the interpreter switch to the module’s .venv automatically. So if you jump to a dagger object, it should open the file in <module source>/sdk/src/dagger/....