-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.py
More file actions
40 lines (28 loc) · 680 Bytes
/
tasks.py
File metadata and controls
40 lines (28 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from invoke import task
@task
def init(ctx, development=False):
if development:
ctx.run("pip install -r requirements/development.txt")
else:
ctx.run("pip install -r requirements.txt")
@task
def migrate(ctx):
ctx.run("alembic upgrade head")
@task(post=[init, migrate])
def install(ctx):
ctx.run("sudo ln -s config/python-cli.conf /etc/init")
@task
def lint(ctx):
commands = (
"flake8 &&"
"pylint -r n db &&"
"pylint -r n misc &&"
"pylint -r n tests"
)
ctx.run(commands)
@task
def test(ctx):
ctx.run("nosetests --rednose --force-color")
@task(pre=[lint, test])
def build(ctx):
pass