-
Install PostgreSQL, Python and Poetry
brew install postgresql@15 pyenv pyenv install 3.10 # Add pyenv to the path pyenv shell 3.10 curl -sSL https://install.python-poetry.org | python3 -
-
Install Python dependencies
make install
-
Set up database
make db/reset migrate
-
Verify types and run tests
make test
-
Check PEP-8 compliance and code format
make check
-
Configure environment variables
cp .env.example .env vi .env
-
Run app
make run
- In Settings → Project: multiproject-python → Python Interpreter set the Python interpreter for the top-level project to be the existing Python interpreter created via the command line.
- Attach each Python subproject to the IDE project with File → Open... → Attach project.... Note: On Open..., navigate to subproject, click Open and when prompted, click Attach. Repeat for each subproject.
- In Settings → Project: multiproject-python → Python Interpreter set the Python interpreter for each Python subproject to be the existing Python interpreter created via the command line.
- Manually set up dependencies between Python subprojects in Settings → Project: multiproject-python → Project
Dependencies.
This is clunky, and PyCharm should be able to infer this information from the subprojects'
pyproject.toml
files. Watch the open issue in YouTrack for developments. - In Settings → Tools → Black configure PyCharm to use the Black formatter on code reformat and on save.
cd applications/starter_app
poetry export --without-hashes -f requirements.txt > ../../requirements.txt
cd ../..
sed -i.backup "s?$(pwd)?/workspace?" requirements.txt
pack build multiproject-python --builder=gcr.io/buildpacks/builder:v1
docker run -p 8080:8080 multiproject-python