-
Notifications
You must be signed in to change notification settings - Fork 135
/
tasks.py
34 lines (26 loc) · 856 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
from invoke import task
@task
def build_docs(context):
context.run("aizynthcli -h > ./docs/cli_help.txt")
context.run("sphinx-apidoc -o ./docs ./aizynthfinder")
context.run("sphinx-build -M html ./docs ./docs/build")
@task
def full_tests(context):
cmd = (
"pytest --black --mccabe "
"--cov aizynthfinder --cov-branch --cov-report html:coverage --cov-report xml "
"tests/"
)
context.run(cmd)
@task
def run_mypy(context):
context.run("mypy --ignore-missing-imports --show-error-codes aizynthfinder")
@task
def run_linting(context):
print("Running mypy...")
context.run("mypy --install-types", pty=True)
context.run(
"mypy --ignore-missing-imports --show-error-codes --implicit-optional aizynthfinder"
)
print("Running pylint...")
context.run("pylint aizynthfinder")