Mercurial > code > home > repos > homeauto
annotate service/reasoning/tasks.py @ 756:f3f667769aef
python 3! and some types and cleanups
Ignore-this: 3453a547ee745fa83668f36956c835cd
author | drewp@bigasterisk.com |
---|---|
date | Fri, 14 Feb 2020 00:07:23 -0800 |
parents | a93fbf0d0daa |
children |
rev | line source |
---|---|
756
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
1 from invoke import Collection, task |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
2 import sys |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
3 sys.path.append('/my/proj/release') |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
4 from serv_tasks import serv_tasks |
351
7716b1810d6c
reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff
changeset
|
5 |
756
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
6 ns = Collection() |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
7 serv_tasks(ns, 'serv.n3', 'reasoning') |
571
53a2664f450a
build/import update for reasoning service
drewp@bigasterisk.com
parents:
463
diff
changeset
|
8 |
756
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
9 @ns.add_task |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
10 @task(pre=[ns['build']]) |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
11 def local_run_mock(ctx): |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
12 ctx.run(f'docker run --name reasoning_local_run_mock --rm -it -p 9071:9071 -v `pwd`:/opt --dns 10.2.0.1 --dns-search bigasterisk.com --net=host bang6:5000/reasoning:latest python3 reasoning.py -iro --mockoutput', pty=True) |
351
7716b1810d6c
reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff
changeset
|
13 |
756
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
14 @ns.add_task |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
15 @task(pre=[ns['build']]) |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
16 def pytype(ctx): |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
17 ctx.run(f'docker run ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
18 f'--name reasoning_pytype ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
19 f'--rm -it ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
20 f'-v `pwd`:/opt ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
21 f'--dns 10.2.0.1 ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
22 f'--dns-search bigasterisk.com ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
23 f'--net=host bang6:5000/reasoning:latest ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
24 f'pytype --pythonpath /usr/local/lib/python3.6/dist-packages:. ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
25 f'--jobs 4 ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
26 f'actions.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
27 f'escapeoutputstatements.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
28 f'graphop.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
29 f'httpputoutputs.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
30 f'inference.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
31 f'inputgraph.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
32 f'private_ipv6_addresses.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
33 f'rdflibtrig.py ' |
f3f667769aef
python 3! and some types and cleanups
drewp@bigasterisk.com
parents:
722
diff
changeset
|
34 f'reasoning.py', pty=True) |