Code for the twitch chatbot on andrumpleteazer's stream ( twitch.tv/andrumpleteazer )
- In the root folder, create a virtual environment
On mac/linux:
virtualenv venv
On windows:
See: https://docs.python.org/3/library/venv.html
- Activate the virtual environment
On mac/linux:
source venv/bin/activate
On windows:
venv\Scripts\activate
- Install the requirements:
pip install -r requirements.txt
- Run the tests (pass
-s
to prevent stdout from being suppressed):
python -m pytest -s
on windows, the dyson tests will fail. Run:
python -m pytest -s --ignore-glob="*dyson*"
tip: to run only a subset of tests, use -k <pattern>
e.g.:
python -m pytest -s -k 'test_pomo_text_truncated'
-
Set local environment variables by copying
.example.env
to a new file named.env
, and settingTMI_TOKEN
andCLIENT_ID
. -
Run the bot locally:
python -m main
- install docker desktop
- install wsl and the kernel update
- run PowerShell ISE as an administrator
- if the docker daemon complains about needing elevated privileges, run
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
- making scripts executable: https://www.scivision.dev/git-windows-chmod-executable/