A Slack bot that understands the Emojirades game!
Project description
emojirades
Slack bot that understands the emojirades game and handles score keeping
Installation Guide
# Preferably run on a virtualenv
Install the dependencies
pip3 install -r requirements.txt --upgrade
Install the module ( For Dev )
cd emojirades
pip3 install -e .
Run the tests
pip3 install -r test_requirements.txt --upgrade
pycodestyle
pytest
Set environment variables
Register your bot on slack, or pass me your email so I can add you to my Dev Slack workspace
export SLACK_BOT_TOKEN='xoxb-*******'
Optionally if you are saving data into S3, you might need to set the profile to use
export AWS_PROFILE='dev-profile'
Run the daemon
emojirades --score-file scores.csv --state-file state.json -vv
Service configuration
cp emojirades.service /etc/systemd/system/
sudo chmod 0664 /etc/systemd/system/emojirades.service
# Edit the /etc/systemd/system/emojirades.service file and update the user and group
cp emojirades.config /etc/emojirades
sudo chmod 0400 /etc/emojirades
# Edit the /etc/emojirades config file with your configuration for the bot
sudo systemctl daemon-reload
sudo systemctl enable emojirades
sudo systemctl start emojirades
Release process (for master branch)
- Create release branch containing new version in setup.py and Dockerfile
- Perform a PR into master
- Perform release in GitHub
- TravisCI will automatically build and deploy on a tagged commit into master (the release does this)
Dealing with Containers
Currently this repo is set to auto build Docker images and deploy to Dockerhub on each tagged commit to master
Building the Container Image
docker build --pull --no-cache -t michaelrobbins/emojirades:X.Y.Z -t michaelrobbins/emojirades:latest .
Running the Container
docker run -d \
--name emojirades \
--restart=always \
-v "/path/to/your/.aws/:/root/.aws/:ro" \
-e "AWS_PROFILE=emojirades" \
-e "SLACK_BOT_TOKEN=xoxb-111111111111-222222222222222222222222" \
michaelrobbins/emojirades:X.Y.Z \
--score-file /path/to/scores.json \
--state-file /path/to/state.json \
-vv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Emojirades-0.11.0.tar.gz
.
File metadata
- Download URL: Emojirades-0.11.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed3e978132db7104d9c14fc5dd242564017d61920f7fe0435017f0e440b691b |
|
MD5 | 8c5bf693d5c13624103a1cfc0369fc6b |
|
BLAKE2b-256 | 0df94157c77b26dcb26bca924cb2061ab27ad61fb43404d663f93942ec1bc1f2 |
File details
Details for the file Emojirades-0.11.0-py3-none-any.whl
.
File metadata
- Download URL: Emojirades-0.11.0-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a992d399b2078b2894eff7292350c02fbfcb9b85c60f63ced69316a23e05cfce |
|
MD5 | 2c90d9a6cc3761e564117305310126c3 |
|
BLAKE2b-256 | e06017261d8749a1cc30b7f6453e49d922fcfc7cc47c9c028f318a54d9bfe961 |