Skip to content

feat: rename --desc to --description #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nominal/cli/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ def get(rid: str, client: NominalClient) -> None:
@attachment_cmd.command("upload")
@click.option("-n", "--name", required=True)
@click.option("-f", "--file", required=True, help="path to the file to upload")
@click.option("-d", "--desc")
@click.option("-d", "--description", help="description of the attachment")
@client_options
@global_options
def upload(name: str, file: str, desc: str | None, client: NominalClient) -> None:
def upload(name: str, file: str, description: str | None, client: NominalClient) -> None:
"""Upload attachment from a local file with a given name and description and display the details of the newly
created attachment to the user.
"""
path = Path(file)
file_type = FileType.from_path(path)
with open(path, "rb") as f:
attachment = client.create_attachment_from_io(f, name, file_type, desc)
attachment = client.create_attachment_from_io(f, name, file_type, description)
click.echo(attachment)


Expand Down
6 changes: 3 additions & 3 deletions nominal/cli/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def dataset_cmd() -> None:
),
help="interpretation the primary timestamp column",
)
@click.option("-d", "--desc")
@click.option("-d", "--description", help="description of the dataset")
@click.option("--wait/--no-wait", default=True, help="wait until the upload is complete")
@client_options
@global_options
Expand All @@ -51,7 +51,7 @@ def upload_csv(
file: str,
timestamp_column: str,
timestamp_type: _LiteralAbsolute,
desc: str | None,
description: str | None,
wait: bool,
client: NominalClient,
) -> None:
Expand All @@ -63,7 +63,7 @@ def upload_csv(
name,
timestamp_column=timestamp_column,
timestamp_type=timestamp_type,
description=desc,
description=description,
)

# block until ingestion completed, if requested
Expand Down
6 changes: 3 additions & 3 deletions nominal/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def run_cmd() -> None:
@click.option("-n", "--name", required=True)
@click.option("-s", "--start", required=True)
@click.option("-e", "--end", required=True)
@click.option("-d", "--desc")
@click.option("-d", "--description", help="description of the run")
@click.option("properties", "--property", type=(str, str), multiple=True)
@click.option("labels", "--label", type=str, multiple=True)
@client_options
Expand All @@ -27,7 +27,7 @@ def create(
name: str,
start: str,
end: str,
desc: str | None,
description: str | None,
properties: Sequence[tuple[str, str]],
labels: Sequence[str],
client: NominalClient,
Expand All @@ -37,7 +37,7 @@ def create(
name,
_SecondsNanos.from_flexible(start).to_nanoseconds(),
_SecondsNanos.from_flexible(end).to_nanoseconds(),
desc,
description,
properties=dict(properties),
labels=labels,
)
Expand Down
Loading