Skip to content

Commit e172272

Browse files
Merge pull request #2 from onlinejudge95/dev
Adds, travis support
2 parents 6c6ea7e + c9bd660 commit e172272

File tree

5 files changed

+38
-5
lines changed

5 files changed

+38
-5
lines changed

.isort.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
line_length=80
3+
multi_line_output=3
4+
known_first_party=app
5+
default_section=THIRDPARTY
6+
import_heading_stdlib=Standard Libs
7+
import_heading_thirdparty=Third Party Libs
8+
import_heading_firstparty=First Party Libs
9+
lines_after_imports=2

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
dist: xenial
2+
3+
language: python
4+
5+
python:
6+
- "3.6"
7+
- "3.7"
8+
- "3.7-dev"
9+
- "3.8-dev"
10+
11+
cache: pip
12+
13+
install:
14+
- pip install --cache-dir .pip.cache/ --progress-bar emoji --upgrade pip setuptools
15+
- pip install --cache-dir .pip.cache/ --progress-bar emoji --requirement requirements/test.txt
16+
17+
script:
18+
- safety check --full-report --file requirements/prod.txt
19+
- safety check --full-report --file requirements/dev.txt
20+
- safety check --full-report --file requirements/test.txt
21+
- black --verbose --line-length 79 --target-version py37 *.py app
22+
- isort --verbose --force-alphabetical-sort-within-sections --case-sensitive --lines-after-imports 2 --lines-between-types 1 *.py app/*.py app/**/*.py
23+
- python manage.py test

app/src/controller/ping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
22
Module to provide ping controller functionality
33
"""
4-
from flask_restplus import Resource
5-
64
from ..service import ping as service
75
from ..utils import decorators, dto
6+
from flask_restplus import Resource
7+
88

99
api = dto.PingDto.api
1010

app/src/utils/decorators.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import functools
1+
from .dto import PingDto
22
from flask import request
33

4-
from .dto import PingDto
4+
import functools
5+
56

67
api = PingDto.api
78

app/src/utils/dto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"Module to implement ping data objects"
2-
from flask_restplus import Namespace, fields
2+
from flask_restplus import fields, Namespace
33

44

55
class PingDto:

0 commit comments

Comments
 (0)