-
Notifications
You must be signed in to change notification settings - Fork 8
/
fabfile.py
43 lines (32 loc) · 901 Bytes
/
fabfile.py
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
41
42
43
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""./fabric.py
Copyright (c) 2015 David Vuong <[email protected]>
Licensed MIT
"""
from fabric.api import task, local
@task
def clean():
"""Cleans up compiled or trash files"""
local('find . -type f -name "*.pyc" -delete')
local('find . -type f -name ".DS_Store" -delete')
local('find . -type d -name "__pycache__" -delete')
@task(alias='pep')
def pep8():
"""Validate syntax style against PEP8"""
local('pep8 pynodebb/ --ignore=E501') # Ignore >79 char lines.
@task
def test():
"""Runs unit tests"""
clean()
local('nosetests test/*')
@task
def cover():
"""Determines test coverage"""
clean()
local('nosetests test/* --with-coverage --cover-package=pynodebb')
@task
def deploy():
"""Deploys the current pynodebb version to pypi"""
clean()
local('python setup.py sdist upload')