Skip to content

Commit

Permalink
style(docs): fix docstrings in tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
fmind committed Jul 27, 2024
1 parent d9a87c7 commit 5595a8b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tasks/cleans.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ def all(_: Context) -> None:

@task(pre=[all, sources, projects])
def reset(_: Context) -> None:
"""Run all tools, folders, and sources tasks."""
"""Run all tools, folders, sources, and projects tasks."""
4 changes: 2 additions & 2 deletions tasks/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def compose(ctx: Context) -> None:

@task(pre=[packages.build])
def build(ctx: Context, tag: str = IMAGE_TAG) -> None:
"""Build the container image with the given tag."""
"""Build the container image."""
ctx.run(f"docker build --tag={ctx.project.name}:{tag} .")


@task
def run(ctx: Context, tag: str = IMAGE_TAG) -> None:
"""Run the container image with the given tag."""
"""Run the container image."""
ctx.run(f"docker run --rm {ctx.project.name}:{tag}")


Expand Down
4 changes: 2 additions & 2 deletions tasks/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

@task
def serve(ctx: Context, format: str = DOC_FORMAT, port: int = 8088) -> None:
"""Serve the API docs with pdoc using the given format and computer port."""
"""Serve the API docs with pdoc."""
ctx.run(f"poetry run pdoc --docformat={format} --port={port} src/{ctx.project.name}")


@task
def api(ctx: Context, format: str = DOC_FORMAT, output_dir: str = OUTPUT_DIR) -> None:
"""Document the API with pdoc using the given format and output directory."""
"""Generate the API docs with pdoc."""
ctx.run(
f"poetry run pdoc --docformat={format} --output-directory={output_dir} src/{ctx.project.name}"
)
Expand Down
4 changes: 2 additions & 2 deletions tasks/mlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

@task
def doctor(ctx: Context) -> None:
"""Run mlflow doctor to diagnose issues."""
"""Run mlflow doctor."""
ctx.run("poetry run mlflow doctor")


@task
def serve(
ctx: Context, host: str = "127.0.0.1", port: str = "5000", backend_uri: str = "./mlruns"
) -> None:
"""Start mlflow server with the given host, port, and backend uri."""
"""Start the mlflow server."""
ctx.run(
f"poetry run mlflow server --host={host} --port={port} --backend-store-uri={backend_uri}"
)
Expand Down
2 changes: 1 addition & 1 deletion tasks/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@task(pre=[cleans.dist])
def build(ctx: Context, format: str = BUILD_FORMAT) -> None:
"""Build a python package with the given format."""
"""Build the python package."""
ctx.run(f"poetry build --format={format}")


Expand Down
2 changes: 1 addition & 1 deletion tasks/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def environment(ctx: Context) -> None:

@task
def run(ctx: Context, job: str) -> None:
"""Run an mlflow project from MLproject file."""
"""Run an mlflow project from the MLproject file."""
ctx.run(
f"mlflow run --experiment-name={ctx.project.name}"
f" --run-name={job.capitalize()} -P conf_file=confs/{job}.yaml ."
Expand Down

0 comments on commit 5595a8b

Please sign in to comment.