mirror of
https://github.com/dtomlinson91/tembo.git
synced 2025-12-22 08:05:43 +00:00
adding coverage duty
This commit is contained in:
17
duties.py
17
duties.py
@@ -8,9 +8,24 @@ def test(ctx):
|
|||||||
|
|
||||||
@duty
|
@duty
|
||||||
def update_deps(ctx, dry: bool = True):
|
def update_deps(ctx, dry: bool = True):
|
||||||
# duty update_deps dry=False
|
"""Update the dependencies using Poetry.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
`duty update_deps dry=False`
|
||||||
|
"""
|
||||||
dry_run = "--dry-run" if dry else ""
|
dry_run = "--dry-run" if dry else ""
|
||||||
ctx.run(
|
ctx.run(
|
||||||
["poetry", "update", dry_run],
|
["poetry", "update", dry_run],
|
||||||
title=f"Updating poetry deps {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"])
|
||||||
|
|||||||
Reference in New Issue
Block a user