-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtasks.py
49 lines (30 loc) · 780 Bytes
/
tasks.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
44
45
46
47
48
49
from invoke import run, task
name = 'coverage-diff'
src = 'coverage_diff'
@task
def isort(c):
run(f'isort {src}')
@task
def lint(c):
run(f'flake8 {src} --ignore E501')
@task
def build(c):
run('python setup.py sdist bdist_wheel')
@task
def clean(c):
run('rm -rf ./build ./dist ./*.egg-info')
@task
def upload_test(c):
run('python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*')
@task
def upload_release(c):
run('python -m twine upload dist/*')
@task
def install_test(c):
run(f'python -m pip install --index-url https://test.pypi.org/simple/ --no-deps --pre -U {name}')
@task
def install_release(c):
run(f'python -m pip install -U {name}')
@task
def uninstall(c):
run(f'python -m pip uninstall {name}')