diff service/frontDoorLock/tasks.py @ 1456:a81def58ecfb

index page rewrite. mqtt subscribe update. new store/events graph uri Ignore-this: f0e59d3487ebfc90f8f4a830a7084023 darcs-hash:45bd18fecdb41c90b786a9e5909111e4a17bfcbe
author drewp <drewp@bigasterisk.com>
date Wed, 25 Sep 2019 17:36:44 -0700
parents fecbac537f63
children
line wrap: on
line diff
--- a/service/frontDoorLock/tasks.py	Wed Sep 25 17:33:32 2019 -0700
+++ b/service/frontDoorLock/tasks.py	Wed Sep 25 17:36:44 2019 -0700
@@ -15,7 +15,9 @@
 
 @task(pre=[build_image])
 def shell(ctx):
-    ctx.run(f'docker run --name={JOB}_shell --rm -it --cap-add SYS_PTRACE --net=host {TAG} /bin/bash', pty=True)
+    ctx.run(f'docker run --name={JOB}_shell --rm -it --cap-add SYS_PTRACE --net=host '
+            f' -v `pwd`/../../stubs:/opt/stubs'
+            f' {TAG} /bin/bash', pty=True)
 
 @task(pre=[build_image])
 def local_run(ctx):
@@ -49,3 +51,13 @@
 def mqtt_force_lock(ctx):
     ctx.run(f'mosquitto_pub -h bang -p 10010 -t frontdoorlock/switch/strike/command -m OFF')
     
+
+@task(pre=[build_image])
+def mypy(ctx):
+    ctx.run(f'docker run --rm -it --name={JOB}_mypy --net=host'
+            f' -v `pwd`/.mypy_cache:/opt/.mypy_cache'
+            f' -v `pwd`/../../stubs:/opt/stubs'
+            f' -e MYPYPATH=/opt/stubs'
+            f' {TAG}'
+            f' /usr/local/bin/mypy -m front_door_lock', pty=True)
+