Skip to main content

A Slack bot that understands the Emojirades game!

Project description

emojirades

Slack bot that understands the emojirades game and handles score keeping

Build Status PyPI version

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)

  1. Create release branch containing new version in setup.py and Dockerfile
  2. Perform a PR into master
  3. Perform release in GitHub
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Emojirades-0.11.2.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

Emojirades-0.11.2-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file Emojirades-0.11.2.tar.gz.

File metadata

  • Download URL: Emojirades-0.11.2.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

Hashes for Emojirades-0.11.2.tar.gz
Algorithm Hash digest
SHA256 101dabf817645a64c366201b41711882a31b9b7e3093864ec7631b569baf7216
MD5 322ada540adb5650b0026c3f51040ce6
BLAKE2b-256 17441e44a25e1b360fde13cefde93c5d95e296f4ef9d0414e4e4ddce6bb18464

See more details on using hashes here.

File details

Details for the file Emojirades-0.11.2-py3-none-any.whl.

File metadata

  • Download URL: Emojirades-0.11.2-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

Hashes for Emojirades-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 22c82f326018d5cd6ca28de119004458c007c83b5a1ae17460cc7cf8f616ec4d
MD5 d787c429285be7e461f3fbf119a4db0e
BLAKE2b-256 5c784d81a40484b13e4c0d3618a220d5a5e737d1e5e5aff77739a375ea5e5ae4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page