mirror of
https://github.com/dtomlinson91/tembo.git
synced 2025-12-22 09:35:44 +00:00
32 lines
615 B
Python
32 lines
615 B
Python
from duty import duty
|
|
|
|
|
|
@duty
|
|
def test(ctx):
|
|
ctx.run(["echo", "test"], title="test command")
|
|
|
|
|
|
@duty
|
|
def update_deps(ctx, dry: bool = False):
|
|
"""Update the dependencies using Poetry.
|
|
|
|
Example:
|
|
`duty update_deps dry=False`
|
|
"""
|
|
dry_run = "--dry-run" if dry else ""
|
|
ctx.run(
|
|
["poetry", "update", dry_run],
|
|
title=f"Updating poetry deps {dry_run}",
|
|
)
|
|
|
|
|
|
@duty
|
|
def coverage(ctx):
|
|
"""Generate a coverage HTML report.
|
|
|
|
Example:
|
|
`duty coverage`
|
|
"""
|
|
ctx.run(["coverage", "run", "--source", "tembo", "-m", "pytest"])
|
|
ctx.run(["coverage", "html"])
|