To work on the Python scripts in bin/
directory, in IntelliJ IDEA, add import
the directory as a module.
- Open Project Structure (
cmd + ;
). - In Project Settings -> Modules, choose the project name from the list.
Press the
+
button, and choose Import Module from the dropdown. - Open the
bin/
directory in the file explorer. - In the Import Module modal that comes up, do the following steps:
- Choose Create module from existing sources, press Next.
- Check the correct location on the list, press Next.
- Choose correct Python interpreter on the list of SDKs (if it's not on the list, it must be added there [just point to the Python executable]), press Next.
- Press Finish.
- Press Apply and exit the Project Structure window with OK button.
pip install -r bin/requirements.txt
Some scripts require environment variables set. To unset them, use this one-liner:
for var in $(export | grep -E '(POSTGRES|SPRING)' | awk -F'=' '{print $1}'); do unset "$var"; done
Note that in the above code snippet, grep
's use of -E
flag may not work
outside of macOS.
Each script supports --help
option that displays the docstring of the script.
Use that to display all information about the script.
- Press the Configure Python interpreter button on the warning, or go
straight to Project Structure (
cmd + ;
). - Choose
bin
module on the list. - On the right-hand side, choose Module SDK to the right Python version.
- Save the changes by pressing Apply and OK buttons. The warning should go away after IntelliJ IDEA re-indexes the module changes.