Skip to content

Commit

Permalink
Add some inline docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenac95 committed Nov 29, 2024
1 parent c2c5cc3 commit 889d265
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion warehouse/oso_lets_go/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def metrics():
@click.option("--dialect", default="duckdb", help="The dialect to render")
@click.pass_context
def render(ctx: click.Context, metric: str, factory_path: str, dialect: str):
"""Renders a given metric query. Useful for testing"""
"""Renders a given metric query. Useful for testing
Usage:
$ oso metrics render <metrics_name>
"""

# Select all the available options for the metric
import importlib.util
Expand All @@ -53,6 +58,8 @@ def render(ctx: click.Context, metric: str, factory_path: str, dialect: str):

from metrics_tools.factory.factory import GLOBAL_TIMESERIES_METRICS

# Run the metrics factory in the sqlmesh project. This uses a single default
# location for now.
spec = importlib.util.spec_from_file_location(
"metrics_mesh.metrics_factories", factory_path
)
Expand Down

0 comments on commit 889d265

Please sign in to comment.