forked from MolecularAI/aizynthfinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.py
28 lines (21 loc) · 762 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
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 --ignore-missing-imports --show-error-codes aizynthfinder")
print("Running pylint...")
context.run("pylint aizynthfinder")