-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test_coach with failing test with randint returning max value * coach: new query parameter and timeout * New tests * throttling module * throttle imported on core * clima & coach sofrendo throttle * fixed tests * fixed possible `0` value on `total_pages` fixes #41 * flake8 * new badges * markdown mention on user.full_name * flake8 * docker configured * mongoengine installed * mongoengine connect * Status created * env.example * pendulum installed * import Status on db.__init__ * datetime with pendulum * value & sticker properties * now property * new messages * method for status creation * file name changed * aberta & fechada removed from sticker module * house module created with "/aberta", "/fechada" and /status * house handler added * flake8 fixes * dev testing requirements * test with pytest * mongo tear down fixture * Status.__eq__ method * test house Document * fixed requirements * flake8 * save on test * readme * readme organized * wip: readme * readme with mongo & docker * readme fixed * readme * readme completed * DB_AUTH env created * retryWrites=False
- Loading branch information
1 parent
c9894df
commit 62c7ed3
Showing
17 changed files
with
485 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
export BOT_TOKEN=meu_token_123 | ||
export OPENWEATHERMAP_TOKEN=meu_token_123 | ||
export MODE=cmd | ||
export SERVER_URL=https://jerimumhsbot.herokuapp.com | ||
BOT_TOKEN=meu_token_123 | ||
OPENWEATHERMAP_TOKEN=meu_token_123 | ||
MODE=cmd | ||
SERVER_URL=https://jerimumhsbot.herokuapp.com | ||
|
||
MONGO_INITDB_ROOT_USERNAME=mongo | ||
MONGO_INITDB_ROOT_PASSWORD=mongo | ||
|
||
DB_USER=mongo | ||
DB_PASSWORD=mongo | ||
DB_HOST=mongo | ||
DB_NAME=mongo | ||
DB_PORT=27017 | ||
DB_AUTH=admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.7 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Requirements have to be pulled and installed here, otherwise caching won't work | ||
COPY requirements.txt requirements.txt | ||
COPY requirements-dev.txt requirements-dev.txt | ||
RUN pip install -r requirements-dev.txt | ||
|
||
WORKDIR /app | ||
|
||
ADD . /app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,74 @@ | ||
current_dir = $(notdir $(shell pwd)) | ||
|
||
config.env: | ||
cp .env.example .env | ||
|
||
############################## | ||
### LOCAL PYTHON COMMANDS ### | ||
############################# | ||
run: | ||
python run.py | ||
|
||
test: | ||
python -m unittest discover | ||
pytest | ||
|
||
flake8: | ||
flake8 | ||
|
||
config.env: | ||
cp .env.example .env | ||
|
||
pip.install: | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
|
||
############################## | ||
###### DOCKER COMMANDS ###### | ||
############################# | ||
docker.build: | ||
docker-compose build | ||
|
||
docker.logs: | ||
docker-compose logs -f | ||
|
||
docker.up: | ||
docker-compose up -d | ||
|
||
docker.down: | ||
docker-compose down | ||
|
||
docker.bash: | ||
docker-compose run bot bash | ||
|
||
docker.test: | ||
docker-compose run bot pytest | ||
|
||
docker.flake8: | ||
docker-compose run bot flake8 | ||
|
||
docker.bot.stop: | ||
docker stop $(current_dir)_bot_1 | ||
|
||
docker.bot.restart: docker.bot.stop docker.up | ||
|
||
docker.volumes.remove: docker.down | ||
docker volume rm $(current_dir)_mongo_volume | ||
|
||
############################## | ||
###### HEROKU COMMANDS ###### | ||
############################# | ||
heroku.prod.add_remote: | ||
heroku git:remote -a jerimumhsbot | ||
git remote rename heroku heroku-prod | ||
|
||
heroku.prod.deploy: | ||
git push heroku-prod master | ||
|
||
heroku.prod.purge_cache: | ||
heroku repo:purge_cache -a jerimumhsbot | ||
|
||
heroku.dev.add_remote: | ||
heroku git:remote -a jerimumhstestbot | ||
git remote rename heroku heroku-dev | ||
|
||
heroku.dev.deploy: | ||
git push heroku-dev dev:master | ||
|
||
heroku.dev.purge_cache: | ||
heroku repo:purge_cache -a jerimumhstestbot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.