Emojirades


NameEmojirades JSON
Version 0.13.5 PyPI version JSON
download
home_pagehttps://github.com/emojirades/emojirades
SummaryA Slack bot that understands the Emojirades game!
upload_time2020-10-19 10:57:47
maintainer
docs_urlNone
authorThe Emojirades Team
requires_python~=3.8
licenseGNU
keywords slack slackbot emojirades plusplus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # emojirades
Slack bot that understands the emojirades game and handles score keeping

[![Build Status](https://travis-ci.com/emojirades/emojirades.svg?branch=master)](https://travis-ci.org/emojirades/emojirades) [![PyPI version](https://badge.fury.io/py/Emojirades.svg)](https://badge.fury.io/py/Emojirades)

# Installation Guide
`# Preferably run on a virtualenv`

## Install the dependencies
```bash
pip3 install --upgrade pip wheel

pip3 install -r requirements.txt --upgrade

# If you're developing locally
pip3 install -r test_requirements.txt --upgrade
```

## Install the module ( For Dev )
```bash
cd emojirades
pip3 install -e .
```

## Run the tests
```bash
black .
pytest
```

## Set environment variables
If you're using the built in AWS functionality to persist your data, you'll need to set the appropriate AWS_ environment variables.

## Run the daemon for a single workspace
This command uses locally stored files to keep the game state:

`emojirades single --score-file scores.csv --state-file state.json --auth-file auth.json`

This command uses S3 stored files to keep the game state:

`emojirades single --score-file s3://bucket/scores.csv --state-file s3://bucket/state.json --auth-file s3://bucket/auth.json

## Run the daemon for multiple workspaces
Here we provide a local folder of workspaces and an optional set of workspace ids (will load all in folder by default):

`emojirades mulitple --workspaces-dir path/to/workspaces [--workspace-id A1B2C3D4E]`

Here we provide an S3 path of workspaces and an optional set of workspace ids (will load all in folder by default):

`emojirades multiple --workspaces-dir s3://bucket/path/to/workspaces [--workspace-id A1B2C3D4E]`

Here we provide an S3 path of workspaces and an AWS SQS queue to listen to for new workspaces:

`emojirades multiple --workspaces-dir s3://bucket/path/to/workspaces --onboarding-queue workspace-onboarding-queue`

The workspaces directory must be in the following format (local or s3):
```
./workspaces

./workspaces/shards
./workspaces/shards/0
./workspaces/shards/0/A1B2C3D4E.json
./workspaces/shards/0/Z9Y8X7W6V.json

./workspaces/directory
./workspaces/directory/A1B2C3D4E
./workspaces/directory/A1B2C3D4E/state.json
./workspaces/directory/A1B2C3D4E/scores.json
./workspaces/directory/A1B2C3D4E/auth.json
./workspaces/directory/Z9Y8X7W6V
./workspaces/directory/Z9Y8X7W6V/state.json
./workspaces/directory/Z9Y8X7W6V/scores.json
./workspaces/directory/Z9Y8X7W6V/auth.json
```

The concept above with the two different directories is shards to allow for the bot to scale out horizontally. As the bot(s) get busier, the operator can increase the shard (bot instance) count and new onboarded workspaces are allocated to the next available shard with capacity.

The emojirades bot will take care of running multiple games across different channels in a single workspace.

## 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)
5. Docker Hub will automatically build and deploy on a tagged commit into master (the release does this)

## Building the Container Image
```
docker build --pull --no-cache -t emojirades/emojirades:X.Y.Z -t emojirades/emojirades:latest .
```

## Running the Container
In this example we run the game with S3 hosted configuration for a single workspace.

```
docker run -d \
  --name emojirades \
  --restart=always \
  -v "/path/to/your/.aws/:/root/.aws/:ro" \
  -e "AWS_PROFILE=emojirades" \
  emojirades/emojirades:X.Y.Z \
    --score-file s3://bucket/path/to/scores.json \
    --state-file s3://bucket/path/to/state.json \
    --auth-file s3://bucket/path/to/auth.json \
    -vv
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/emojirades/emojirades",
    "name": "Emojirades",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": "",
    "keywords": "slack slackbot emojirades plusplus",
    "author": "The Emojirades Team",
    "author_email": "support@emojirades.io",
    "download_url": "https://files.pythonhosted.org/packages/cd/7d/d52bcf86c4fa77d1ca9a0d459cbe3b64ea1e1e14bede57e1471c78f43565/Emojirades-0.13.5.tar.gz",
    "platform": "",
    "description": "# emojirades\nSlack bot that understands the emojirades game and handles score keeping\n\n[![Build Status](https://travis-ci.com/emojirades/emojirades.svg?branch=master)](https://travis-ci.org/emojirades/emojirades) [![PyPI version](https://badge.fury.io/py/Emojirades.svg)](https://badge.fury.io/py/Emojirades)\n\n# Installation Guide\n`# Preferably run on a virtualenv`\n\n## Install the dependencies\n```bash\npip3 install --upgrade pip wheel\n\npip3 install -r requirements.txt --upgrade\n\n# If you're developing locally\npip3 install -r test_requirements.txt --upgrade\n```\n\n## Install the module ( For Dev )\n```bash\ncd emojirades\npip3 install -e .\n```\n\n## Run the tests\n```bash\nblack .\npytest\n```\n\n## Set environment variables\nIf you're using the built in AWS functionality to persist your data, you'll need to set the appropriate AWS_ environment variables.\n\n## Run the daemon for a single workspace\nThis command uses locally stored files to keep the game state:\n\n`emojirades single --score-file scores.csv --state-file state.json --auth-file auth.json`\n\nThis command uses S3 stored files to keep the game state:\n\n`emojirades single --score-file s3://bucket/scores.csv --state-file s3://bucket/state.json --auth-file s3://bucket/auth.json\n\n## Run the daemon for multiple workspaces\nHere we provide a local folder of workspaces and an optional set of workspace ids (will load all in folder by default):\n\n`emojirades mulitple --workspaces-dir path/to/workspaces [--workspace-id A1B2C3D4E]`\n\nHere we provide an S3 path of workspaces and an optional set of workspace ids (will load all in folder by default):\n\n`emojirades multiple --workspaces-dir s3://bucket/path/to/workspaces [--workspace-id A1B2C3D4E]`\n\nHere we provide an S3 path of workspaces and an AWS SQS queue to listen to for new workspaces:\n\n`emojirades multiple --workspaces-dir s3://bucket/path/to/workspaces --onboarding-queue workspace-onboarding-queue`\n\nThe workspaces directory must be in the following format (local or s3):\n```\n./workspaces\n\n./workspaces/shards\n./workspaces/shards/0\n./workspaces/shards/0/A1B2C3D4E.json\n./workspaces/shards/0/Z9Y8X7W6V.json\n\n./workspaces/directory\n./workspaces/directory/A1B2C3D4E\n./workspaces/directory/A1B2C3D4E/state.json\n./workspaces/directory/A1B2C3D4E/scores.json\n./workspaces/directory/A1B2C3D4E/auth.json\n./workspaces/directory/Z9Y8X7W6V\n./workspaces/directory/Z9Y8X7W6V/state.json\n./workspaces/directory/Z9Y8X7W6V/scores.json\n./workspaces/directory/Z9Y8X7W6V/auth.json\n```\n\nThe concept above with the two different directories is shards to allow for the bot to scale out horizontally. As the bot(s) get busier, the operator can increase the shard (bot instance) count and new onboarded workspaces are allocated to the next available shard with capacity.\n\nThe emojirades bot will take care of running multiple games across different channels in a single workspace.\n\n## Service configuration\n```\ncp emojirades.service /etc/systemd/system/\nsudo chmod 0664 /etc/systemd/system/emojirades.service\n\n# Edit the /etc/systemd/system/emojirades.service file and update the user and group\n\ncp emojirades.config /etc/emojirades\nsudo chmod 0400 /etc/emojirades\n\n# Edit the /etc/emojirades config file with your configuration for the bot\n\nsudo systemctl daemon-reload\nsudo systemctl enable emojirades\nsudo systemctl start emojirades\n\n```\n# Release process (for master branch)\n1. Create release branch containing new version in setup.py and Dockerfile\n2. Perform a PR into master\n3. Perform release in GitHub\n4. TravisCI will automatically build and deploy on a tagged commit into master (the release does this)\n5. Docker Hub will automatically build and deploy on a tagged commit into master (the release does this)\n\n## Building the Container Image\n```\ndocker build --pull --no-cache -t emojirades/emojirades:X.Y.Z -t emojirades/emojirades:latest .\n```\n\n## Running the Container\nIn this example we run the game with S3 hosted configuration for a single workspace.\n\n```\ndocker run -d \\\n  --name emojirades \\\n  --restart=always \\\n  -v \"/path/to/your/.aws/:/root/.aws/:ro\" \\\n  -e \"AWS_PROFILE=emojirades\" \\\n  emojirades/emojirades:X.Y.Z \\\n    --score-file s3://bucket/path/to/scores.json \\\n    --state-file s3://bucket/path/to/state.json \\\n    --auth-file s3://bucket/path/to/auth.json \\\n    -vv\n```\n\n\n",
    "bugtrack_url": null,
    "license": "GNU",
    "summary": "A Slack bot that understands the Emojirades game!",
    "version": "0.13.5",
    "split_keywords": [
        "slack",
        "slackbot",
        "emojirades",
        "plusplus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "6a5621e4ec356b69830d427f1e3ca394",
                "sha256": "5528bd4751ff74265bdd4d1501fa49d70050a60ac02742a6401da121c0b37010"
            },
            "downloads": -1,
            "filename": "Emojirades-0.13.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a5621e4ec356b69830d427f1e3ca394",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 45309,
            "upload_time": "2020-10-19T10:57:46",
            "upload_time_iso_8601": "2020-10-19T10:57:46.765488Z",
            "url": "https://files.pythonhosted.org/packages/58/6a/a08ec42c6ce5a28ed575617a0bac00fbe4487a174f5d4a2cf8cd45dbd4ca/Emojirades-0.13.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "3f5aa630395c8fb8894254976748d8e5",
                "sha256": "b585a317611dbefb9a28df470a4d6f88069676864b41824667e0dc51e820720f"
            },
            "downloads": -1,
            "filename": "Emojirades-0.13.5.tar.gz",
            "has_sig": false,
            "md5_digest": "3f5aa630395c8fb8894254976748d8e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 22718,
            "upload_time": "2020-10-19T10:57:47",
            "upload_time_iso_8601": "2020-10-19T10:57:47.743279Z",
            "url": "https://files.pythonhosted.org/packages/cd/7d/d52bcf86c4fa77d1ca9a0d459cbe3b64ea1e1e14bede57e1471c78f43565/Emojirades-0.13.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-10-19 10:57:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "emojirades",
    "error": "Could not fetch GitHub repository",
    "lcname": "emojirades"
}
        
Elapsed time: 0.21215s