invoke/poetry: updated version in toml file and added invoke commands
This commit is contained in:
parent
3949bd6d1b
commit
fb21909dad
2 changed files with 46 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "core"
|
||||
version = "6.4.0"
|
||||
version = "6.6.0"
|
||||
description = ""
|
||||
authors = []
|
||||
|
||||
|
|
52
tasks.py
52
tasks.py
|
@ -2,13 +2,51 @@ from invoke import task
|
|||
|
||||
|
||||
@task
|
||||
def core(c):
|
||||
c.run(
|
||||
"poetry run sudo python3 scripts/core-daemon "
|
||||
"-f data/core.conf -l data/logging.conf"
|
||||
)
|
||||
def daemon(c):
|
||||
"""
|
||||
Runs core-daemon.
|
||||
"""
|
||||
with c.cd("daemon"):
|
||||
poetry = c.run("which poetry").stdout.strip()
|
||||
c.run(
|
||||
f"sudo {poetry} run scripts/core-daemon "
|
||||
"-f data/core.conf -l data/logging.conf"
|
||||
)
|
||||
|
||||
|
||||
@task
|
||||
def core_pygui(c):
|
||||
c.run("poetry run python3 scripts/core-pygui")
|
||||
def gui(c):
|
||||
"""
|
||||
Run core-pygui.
|
||||
"""
|
||||
with c.cd("daemon"):
|
||||
c.run("poetry run scripts/core-pygui")
|
||||
|
||||
|
||||
@task
|
||||
def test(c):
|
||||
"""
|
||||
Run core tests.
|
||||
"""
|
||||
with c.cd("daemon"):
|
||||
poetry = c.run("which poetry").stdout.strip()
|
||||
c.run(f"sudo {poetry} run pytest -v --lf -x tests", pty=True)
|
||||
|
||||
|
||||
@task
|
||||
def test_mock(c):
|
||||
"""
|
||||
Run core tests using mock to avoid running as sudo.
|
||||
"""
|
||||
with c.cd("daemon"):
|
||||
c.run("poetry run pytest -v --mock --lf -x tests", pty=True)
|
||||
|
||||
|
||||
@task
|
||||
def test_emane(c):
|
||||
"""
|
||||
Run core emane tests.
|
||||
"""
|
||||
with c.cd("daemon"):
|
||||
poetry = c.run("which poetry").stdout.strip()
|
||||
c.run(f"sudo {poetry} run pytest -v --lf -x tests/emane", pty=True)
|
||||
|
|
Loading…
Reference in a new issue