-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cd204b
commit 7aa90b7
Showing
45 changed files
with
2,120 additions
and
296 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Python CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-python/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/python:3.6.1 | ||
|
||
# Specify service dependencies here if necessary | ||
# CircleCI maintains a library of pre-built images | ||
# documented at https://circleci.com/docs/2.0/circleci-images/ | ||
# - image: circleci/postgres:9.4 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: | ||
name: install dependencies | ||
command: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install -r requirements.txt | ||
- save_cache: | ||
paths: | ||
- ./venv | ||
key: v1-dependencies-{{ checksum "requirements.txt" }} | ||
|
||
- run: | ||
name: run tests | ||
command: | | ||
. venv/bin/activate | ||
python runtests.py | ||
- run: | ||
name: lint | ||
command: | | ||
. venv/bin/activate | ||
pylint **/*.py -E | ||
pylint **/*.py --exit-zero | ||
- store_artifacts: | ||
path: test-reports | ||
destination: test-reports |
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,2 @@ | ||
.git | ||
.venv |
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,5 +1,6 @@ | ||
*.pyc | ||
config.json | ||
config_savelink.json | ||
config_solvetracker.json | ||
*.bin | ||
*.log | ||
|
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,8 @@ | ||
# Changelog | ||
All notable changes to this project will be kept in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [0.1.0] - 2019-09-10 | ||
Initial release |
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,10 +1,14 @@ | ||
FROM python:3 | ||
|
||
# Bundle app source | ||
COPY . /src/ | ||
WORKDIR /src/ | ||
WORKDIR /src | ||
|
||
# Copy requirements | ||
COPY ./requirements.txt /src | ||
|
||
# Install requirements | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy rest of source | ||
COPY . /src | ||
|
||
CMD ["python", "run.py"] |
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,13 +1,28 @@ | ||
PWD = $(shell pwd) | ||
|
||
image: | ||
build: | ||
docker build . -t otabot | ||
|
||
lint: | ||
image: | ||
docker images | grep otabot || docker build . -t otabot | ||
|
||
lint: image | ||
docker run --rm -v ${PWD}/:/src/ otabot pylint **/*.py -E | ||
|
||
run: image | ||
checklint: image | ||
docker run --rm -v ${PWD}/:/src/ otabot pylint **/*.py --exit-zero | ||
|
||
run: build | ||
docker run --rm -it otabot | ||
|
||
runlocal: | ||
runlocal: image | ||
docker run --rm -it -v ${PWD}/:/src/ otabot | ||
|
||
test: | ||
docker run --rm -v ${PWD}/:/src/ otabot python3 runtests.py | ||
|
||
background: image | ||
docker run --rm -d --name otabot otabot | ||
|
||
stop: | ||
docker stop otabot |
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
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,10 +1,12 @@ | ||
from abc import ABC, abstractmethod | ||
from abc import ABC | ||
|
||
|
||
class Command(ABC): | ||
"""Defines the command interface.""" | ||
|
||
def __init__(self): pass | ||
def __init__(self): | ||
pass | ||
|
||
@classmethod | ||
def execute(cls, slack_client, args, channel_id, user, user_is_admin): pass | ||
def execute(cls, slack_wrapper, args, timestamp, channel_id, user_id, user_is_admin): | ||
pass |
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
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
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,7 @@ | ||
{ | ||
"git_repo": "user/repo", | ||
"git_branch": "master", | ||
"staticman-token": "", | ||
"allowed_users": [], | ||
"repo_link_url": "" | ||
} |
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
"syscalls_handler", | ||
"bot_handler", | ||
"admin_handler", | ||
"wolfram_handler" | ||
"wolfram_handler", | ||
"linksave_handler" | ||
] |
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.