Skip to content

Commit 43eea9b

Browse files
committed
Merge branch 'develop'
2 parents f985b03 + 6c12cab commit 43eea9b

File tree

141 files changed

+10488
-700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+10488
-700
lines changed

.codeclimate.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
engines:
2+
duplication:
3+
enabled: true
4+
config:
5+
languages:
6+
- python
7+
fixme:
8+
enabled: true
9+
markdownlint:
10+
enabled: true
11+
pep8:
12+
enabled: true
13+
ratings:
14+
paths:
15+
- "**.py"
16+
exclude_paths:
17+
- docs/
18+
- travis/
19+
- tests/

.coveragerc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
[run]
2-
include = werobot/*
3-
omit =
4-
client
5-
logger
2+
source = werobot
3+
4+
[report]
5+
exclude_lines =
6+
pragma: no cover
7+
8+
def __repr__
9+
10+
raise AssertionError
11+
raise NotImplementedError
12+
13+
if 0:
14+
if __name__ == .__main__.:

.flake8

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[flake8]
2+
max-line-length = 100
3+
max-complexity = 12
4+
exclude =
5+
.git,
6+
__pycache__,
7+
docs,
8+
travis,
9+
venv

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.py[cod]
2+
.python-version
23

34
# C extensions
45
*.so
@@ -9,6 +10,7 @@
910
dist
1011
build
1112
eggs
13+
.eggs/
1214
parts
1315
bin
1416
var
@@ -25,6 +27,7 @@ pip-log.txt
2527
.coverage
2628
.tox
2729
nosetests.xml
30+
.cache/
2831
cover/
2932
htmlcov/
3033

@@ -52,6 +55,9 @@ werobot_session.db
5255

5356
.coveralls.yml
5457

55-
werobot_session
58+
werobot_session*
5659
pip-selfcheck.json
60+
venv
5761

62+
*.sqlite3
63+
/.vscode

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "docs/_themes"]
2-
path = docs/_themes
3-
url = https://github.com/lepture/flask-sphinx-themes.git

.scrutinizer.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
checks:
2+
python:
3+
code_rating: true
4+
duplicate_code: true
5+
filter:
6+
excluded_paths:
7+
- tests/*
8+
- travis/*
9+
- example/*

.travis.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
1-
language: python
2-
python:
3-
- 2.6
4-
- 2.7
5-
- 3.3
6-
- 3.4
7-
- pypy
8-
9-
services:
10-
- mongodb
11-
- redis-server
12-
1+
os: osx
2+
language: generic
3+
osx_image: xcode8 # OS X 10.10
4+
env:
5+
- PYTHON_VERSION=2 PYTHON_INSTALL_METHOD=system
6+
matrix:
7+
include:
8+
- env:
9+
- PYTHON_VERSION="2.7.12 3.4.5 3.5.2 pypy-5.0.0"
10+
- PYTHON_INSTALL_METHOD=tox
11+
- env:
12+
- PYTHON_VERSION=2.7
13+
- PYTHON_INSTALL_METHOD=macpython
14+
- env:
15+
- PYTHON_VERSION=3.4
16+
- PYTHON_INSTALL_METHOD=macpython
17+
- env:
18+
- PYTHON_VERSION=3.5
19+
- PYTHON_INSTALL_METHOD=macpython
20+
- osx_image: xcode7.3 # OS X 10.11
21+
- osx_image: xcode8.2 # macOS 10.12
22+
allow_failures:
23+
- osx_image: xcode8.2
24+
cache:
25+
directories:
26+
- $HOME/.pyenv
1327
install:
14-
- "python setup.py install"
15-
- "pip install -r dev-requirements.txt"
28+
- "source travis/install.sh"
1629

17-
script: coverage run --source=werobot setup.py -q nosetests
30+
script:
31+
- "source travis/script.sh"
1832

19-
after_success: coveralls
33+
after_success:
34+
- pip install codecov
35+
- codecov
2036

2137
notifications:
2238
email: false

MANIFEST.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include requirements.txt
22
include README.rst
33
include LICENSE
4-
include docs/*.rst
5-
include docs/*.py
6-
include docs/Makefile
4+
recursive-include tests *
5+
recursive-exclude tests *.pyc
6+
recursive-exclude tests *.pyo

README.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
WeRoBot
33
====================================
44

5-
.. image:: https://api.travis-ci.org/whtsky/WeRoBot.png?branch=master
6-
:target: http://travis-ci.org/whtsky/WeRoBot
7-
.. image:: https://coveralls.io/repos/whtsky/WeRoBot/badge.png?branch=master
8-
:target: https://coveralls.io/r/whtsky/WeRoBot
9-
.. image:: https://scrutinizer-ci.com/g/whtsky/WeRoBot/badges/quality-score.png?b=master
10-
:target: https://scrutinizer-ci.com/g/whtsky/WeRoBot/?branch=master
5+
.. image:: https://img.shields.io/travis/whtsky/WeRoBot/master.svg?maxAge=3600&label=macOS
6+
:target: https://travis-ci.org/whtsky/WeRoBot
7+
.. image:: https://img.shields.io/appveyor/ci/whtsky/WeRoBot/master.svg?maxAge=3600&label=Windows
8+
:target: https://ci.appveyor.com/project/whtsky/WeRoBot
9+
.. image:: https://semaphoreci.com/api/v1/whtsky/werobot/branches/master/shields_badge.svg
10+
:target: https://semaphoreci.com/whtsky/werobot
11+
.. image:: https://codecov.io/gh/whtsky/WeRoBot/branch/master/graph/badge.svg
12+
:target: https://codecov.io/gh/whtsky/WeRoBot
1113

1214

13-
WeRoBot 是一个微信机器人框架,采用MIT协议发布。
15+
WeRoBot 是一个微信公众号开发框架,采用MIT协议发布。
1416

1517
文档在这里: https://werobot.readthedocs.org/en/latest/
1618

@@ -31,7 +33,7 @@ WeRoBot 是一个微信机器人框架,采用MIT协议发布。
3133
Hello World
3234
=============
3335

34-
一个非常简单的 Hello World 微信机器人,会对收到的所有文本消息回复 Hello World ::
36+
一个非常简单的 Hello World 微信公众号,会对收到的所有文本消息回复 Hello World ::
3537

3638
import werobot
3739

@@ -50,7 +52,7 @@ WeRoBot 在 0.4.0 版本中开始支持 Session , Session 可以用来方便
5052

5153
import werobot
5254

53-
robot = werobot.WeRoBot(token='tokenhere', enable_session=True)
55+
robot = werobot.WeRoBot(token='tokenhere')
5456

5557
@robot.text
5658
def session(message, session):

appveyor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '{branch}-{build}'
2+
build: off
3+
cache:
4+
- '%LOCALAPPDATA%\pip\Cache'
5+
services:
6+
- mongodb
7+
init:
8+
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
9+
- ps: "ls C:/Python*"
10+
install:
11+
- C:\Python35\python -m pip install tox
12+
- choco install redis-64
13+
- redis-server --service-install
14+
- redis-server --service-start
15+
16+
test_script:
17+
- C:\Python35\python -m tox -c tox-win.ini
18+
on_success:
19+
- set PATH=C:\\Python35;C:\\Python35\\Scripts;%PATH%
20+
- pip install codecov coverage
21+
- codecov
22+
on_failure:
23+
- ps: dir "env:"
24+
- ps: get-content .tox\*\log\*
25+
#after_test:
26+
# - "%PYTHON%/Scripts/codecov"

0 commit comments

Comments
 (0)