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
Showing
11 changed files
with
164 additions
and
5 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,6 @@ | ||
build/ | ||
dist/ | ||
tartiflette_aiohttp.egg-info/ | ||
__pycache__ | ||
.coverage | ||
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,36 @@ | ||
language: python | ||
dist: xenial | ||
sudo: true | ||
python: | ||
- "3.6" | ||
# Activate addons when integration tests will be | ||
# implemented with Tartiflette | ||
# addons: | ||
# apt: | ||
# packages: | ||
# - build-essential | ||
# - clang | ||
# - cmake | ||
# - bison | ||
# - flex | ||
# | ||
# Compliant with Gazr Specification | ||
# https://gazr.io | ||
# https://github.com/dailymotion/gazr | ||
# make style | test-unit | test-functional | init | ||
script: | ||
- make test-unit | ||
- make test-functional | ||
- make style | ||
- make complexity | ||
cache: pip | ||
install: | ||
- make init | ||
- pip install -e .[test] | ||
deploy: | ||
provider: pypi | ||
user: dailymotion | ||
password: | ||
secure: "lvwOKPdsFwO9QWpG5Eu423XiYms4hfP8DMhkH2Ku1ivZcES2NZ0FRYrJ0UyCSx9A1k9xfSYjRDe0KxMTPo4HwJjMhl/3JDO7OrI5NqpJiNVG6NQ8djBc+gwj5epugJ6duXe1MPXaNs3Ppo2EOwoslOJDl711YFaBXZsGfQvQ3Z22LyWVQ/QzWth4IzHkI3E0fOg7sPvI83hlhI0Pzfp5DdX6byoQssr65Hs1HvfEbWS3VgA+xZ1lznXMV0Dwl3o8aY2+FbOM8vUvR9HX9Rfm4t1/vOpuKF/9fciJUsCd42FnRayCjt1HsNKW0+EtkaV++oqzB7Dop0BasCc+MGx66iGFIrrAb8HIuIMwR1lMkJr6r9cbQpR7irkuCmMW3O1g52rLM1ky3vBhTzpodk4E9LQ96M9rVxPSez+nXvp94MNk9P6KdqYmgWCKym/kyrXPQrR0vq6URigtGl54HwzvxZfQaLxIPIbPRGqygS282ewzHIEcPm5cJQB1EZb/ZbK1xju7LNzkL933YE0u5kU93/5h15Q0QWo28umo4dhJWH3g47rSqYjnapJwHrj1+yJpjqR3zalLVJbA/H+VmAiG3vy0oJ10nb8SXsFkcN9KcYC84GVR5cvn3UHnYYhMg2x//t8kmY1J4AU8qKk2xipmN2uEAC9ff2SqwnqMIPEQGh4=" | ||
on: | ||
branch: master |
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,43 @@ | ||
|
||
.PHONY: init | ||
init: | ||
true | ||
|
||
.PHONY: format | ||
format: | ||
black -l 79 --py36 tartiflette_aiohttp setup.py | ||
|
||
.PHONY: check-format | ||
check-format: | ||
black -l 79 --py36 --check tartiflette_aiohttp setup.py | ||
|
||
.PHONY: style | ||
style: check-format | ||
pylint tartiflette_aiohttp --rcfile=pylintrc | ||
|
||
.PHONY: complexity | ||
complexity: | ||
xenon --max-absolute B --max-modules B --max-average A tartiflette_aiohttp | ||
|
||
.PHONY: test-integration | ||
test-integration: clean | ||
true | ||
|
||
.PHONY: test-unit | ||
test-unit: clean | ||
mkdir -p reports | ||
py.test -s tests/unit --junitxml=reports/report_unit_tests.xml --cov . --cov-config .coveragerc --cov-report term-missing --cov-report xml:reports/coverage_func.xml | ||
|
||
.PHONY: test-functional | ||
test-functional: clean | ||
mkdir -p reports | ||
py.test -s tests/functional --junitxml=reports/report_func_tests.xml --cov . --cov-config .coveragerc --cov-report term-missing --cov-report xml:reports/coverage_unit.xml | ||
|
||
.PHONY: test | ||
test: test-integration test-unit test-functional | ||
|
||
.PHONY: clean | ||
clean: | ||
find . -name '*.pyc' -exec rm -fv {} + | ||
find . -name '*.pyo' -exec rm -fv {} + | ||
find . -name '__pycache__' -exec rm -frv {} + |
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,71 @@ | ||
# -*- mode: conf -*- | ||
[GENERAL] | ||
init-hook='import sys; sys.path.append("/usr/src/app")' | ||
|
||
[BASIC] | ||
# Good variable names which should always be accepted, separated by a comma | ||
# i,j,k = loop control vars, sq=search query, fn=function/lambda, fh=file handle, ts=timestamp, rx=regular expression | ||
good-names=_,__,___,e,i,j,k,sq,fn,fh,js,ts,rx,logger | ||
|
||
## Bad variable names which should always be refused, separated by a comma | ||
# balls/qballs is specific to one of the guys | ||
bad-names=foo,bar,baz,toto,tata,tutu,coucou | ||
|
||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{1,40}|(__.*__))$ | ||
function-rgx=[a-z_][a-z0-9_]{2,50}$ | ||
method-rgx=[a-z_][a-z0-9_]{2,50}$ | ||
|
||
[MESSAGE CONTROL] | ||
# CHANGED: | ||
# C0111: Missing docstring | ||
# E0602: Undefined variable %r | ||
# I0011: Locally disabled messages | ||
# I0012: Locally enabled messages | ||
# R0801: Similar lines in files | ||
# R0903: Too few public methods | ||
# W0141: Bad-builtins | ||
# W0142: Use of * or ** magic | ||
# W0223: Abstract method not overridden | ||
# W0603: Using the global statement | ||
# W1202: Logging with '{}' formating instead of '%' | ||
# C0330: Wrong hanging indentation before block (add 4 spaces). | ||
# "bad-continuation" is currently disabled because of that issue -> https://github.com/PyCQA/pylint/issues/289 | ||
disable=C0111,E0602,I0011,I0012,R0801,R0903,W0141,W0142,W0223,W0603,W1202,C0303,C0330,C0301 | ||
|
||
[DESIGN] | ||
## Maximum number of arguments for function / method | ||
max-args=8 | ||
|
||
## Maximum number of locals for function / method body | ||
max-locals=10 | ||
|
||
## Maximum number of return / yield for function / method body | ||
max-returns=10 | ||
|
||
## Maximum number of branch for function / method body | ||
max-branchs=45 | ||
|
||
## Maximum number of statements in function / method body | ||
max-statements=100 | ||
|
||
## Maximum number of public methods for a class (see R0904). | ||
max-public-methods=30 | ||
|
||
max-attributes=15 | ||
|
||
[FORMAT] | ||
max-line-length=80 | ||
|
||
## Maximum number of lines in a module | ||
max-module-lines=1000 | ||
|
||
# String used as indentation unit. We found that two spaces is the best balance for readability, easy typing, etc. | ||
indent-string=' ' | ||
|
||
[MISCELLANEOUS] | ||
# List of note tags to take in consideration, separated by a comma. One of our guys uses qballs when he wants to flag something for himself. | ||
notes=FIXME,NINJA | ||
|
||
[TYPECHECK] | ||
# Ignore some modules which don't work well with rapidjons | ||
ignored-modules=rapidjson |
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,2 @@ | ||
def hello(): | ||
return "World" |
Empty file.
Empty file.
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 @@ | ||
def test_hello(): | ||
assert True == True |
Empty file.
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 @@ | ||
def test_hello(): | ||
assert True == True |