-
Notifications
You must be signed in to change notification settings - Fork 3
/
tasks.py
67 lines (56 loc) · 1.9 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# tasks.py
from invoke import task
import subprocess
PATH_MANIFEST = "./manifest.yml"
PATH_LOGO = "./logo.png"
PATH_LICENSE = "./LICENSE"
PATH_README = "./README.md"
PATH_SETUP = "./src/gh/diffCheck/setup.py"
PATH_INIT = "./src/gh/diffCheck/diffCheck/__init__.py"
PATH_CMAKE = "./CMakeLists.txt"
DIR_IN_GHUSER_COMPONENTS = "./src/gh/components"
DEBUG_DIR_IN_GHUSER_COMPONENTS = "./temp/components"
DIR_OUT_GHUER_COMPONENTS = "./build/gh"
DIR_OUT_YAK = "./build/yak"
@task
def versionize(c):
path_versionize = "./invokes/versionize.py"
c.run(f"python {path_versionize} \
--from-manifest \
--path-manifest {PATH_MANIFEST} \
--path-setup {PATH_SETUP} \
--path-init {PATH_INIT} \
--path-cmake {PATH_CMAKE} \
")
@task
def ghcomponentize(c):
path_ghcomponentizer = "./invokes/ghcomponentize/ghcomponentizer.py"
c.run(f"python {path_ghcomponentizer} \
--ghio ./invokes/ghcomponentize/ghio \
{DIR_IN_GHUSER_COMPONENTS} \
{DIR_OUT_GHUER_COMPONENTS}")
@task
def pypireize(c):
path_pypireize = "./invokes/pypireize.py"
c.run(f"python {path_pypireize} --setup-path {PATH_SETUP}")
@task
def flagerize(c, package_name="diffCheck"):
path_flagerize = "./invokes/flagerize.py"
c.run(f"python {path_flagerize} \
--package {package_name} \
--source {DIR_IN_GHUSER_COMPONENTS} \
--from-manifest \
--path-manifest {PATH_MANIFEST}")
@task
def yakerize(c):
path_yakerize = "./invokes/yakerize.py"
c.run(f"python {path_yakerize} \
--gh-components-dir {DIR_OUT_GHUER_COMPONENTS} \
--build-dir {DIR_OUT_YAK} \
--manifest-path {PATH_MANIFEST} \
--logo-path {PATH_LOGO} \
--license-path {PATH_LICENSE} \
--readme-path {PATH_README}")
@task
def documentize(c):
subprocess.run("conda activate diff_check && sphinx-build -b html -v doc _build", shell=True, check=True)