SAM (install from here)
git pull
- Open in PyCharm
- Open Preferences, go to
Project:<project name> -> Project interpreter
, click the gear, and "Add" - Add a Virtualenv environment, click "Apply" and "OK"
- In Preferences, go to
Tools -> Python Integrated Tools
, and set the Package Requirements File - When prompted (you may need to open a code file), "Install Requirements"
- Make code changes
- Update with
./liveUpdate.sh
- If you have changed dependencies, you'll instead need to rebuild with
sam build -u
(-u
helps because it gets around Python version mismatches. Or you can mangle your PATH - your choice)
- If you have changed dependencies, you'll instead need to rebuild with
- Run locally with
./startLocally.sh
- TODO - figure out attaching a debugger. I suspect I need the following snippet:
import ptvsd
# Enable ptvsd on 0.0.0.0 address and on port 5890 that we'll connect later with our IDE
ptvsd.enable_attach(address=('0.0.0.0', 5890), redirect_output=True)
ptvsd.wait_for_attach()
pytest .