-
Notifications
You must be signed in to change notification settings - Fork 23
Sisyphus PyCharm Setup
Some tweaks can be applied to use PyCharm more comfortably with Sisyphus setup folders.
Disable some folders from the indexing:
- Go to Settings -> Project <project_name> -> Project Structure
- Select (if existing, if not yet repeat later) "alias", "output", "work" and click on "Exclude"
If this still does not work for you and PyCharm indexes those directories (you can check via strace -e trace=file -f
), there is another more brutal way: I wrote a PyCharm starter script which allows to have custom python startup code which will set a LD_PRELOAD
to a custom library which will map all disallowed paths to some dummy for all relevant C stdlib functions (open
etc). Thus PyCharm can not access it. pycharm start script /u/zeyer/dotfiles/system-tools/bin/pycharm
, example python startup code /u/zeyer/setups/combined/2021-05-31/.pycharm-startup.py
Make "recipe" a source folder:
- On the project overview, right click on the "recipe" folder
- Select "Mark Directory as" -> "Source Folder"
Add a custom interpreter for correct Python package paths (if e.g. Sisyphus is not part of the env):
- Go to Settings -> Project <project_name> -> Project Interpreter
- Select top bar or gear symbol and click on "show all"
- Click on the plus and add the python interpreter (even if it already exists) that you want to use
- Click on the pen to rename the interpreter to e.g. <project_name>
- Add the
sisyphus
folder inside thesisyphus
repository to the path
Alternatively:
Right-click the directories such as recipe
, sisyphus
etc which should be root source directories to become root source directories.
Then PyCharm treats them as being in the paths (sys.path
).