Skip to content

Commit

Permalink
Merge pull request #51 from prio-data/fix_transform_response
Browse files Browse the repository at this point in the history
fix response to viewser transform show
  • Loading branch information
jimdale authored Nov 20, 2023
2 parents 7b70a7e + acb44a1 commit 730ca79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "viewser"
version = "6.0.1"
version = "6.0.2"
description = "The Views 3 CLI tool"
authors = ["peder2911 <[email protected]>"]
readme = "README.md"
Expand Down
7 changes: 2 additions & 5 deletions viewser/commands/documentation/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,10 @@ def show_transform(
response_dict = json.loads(obj["operations"].show(transform_name))

if len(response_dict['entries'])>0:
response_df = pd.DataFrame.from_dict(response_dict['entries'])[['name', 'path']].sort_values(by='name').reset_index(drop=True).to_string()
response_df = pd.DataFrame.from_dict(response_dict['entries'])['path'].sort_values().reset_index(drop=True).to_string()
click.echo(response_df)
else:
click.echo(response_dict['name'])
click.echo(response_dict['data'].items())
for key,value in response_dict['data'].items():
click.echo(':'.join([key,str(value)]))
click.echo(response_dict['data']['docstring'])


@transforms_cli.command(name="annotate", short_help="add documentation text")
Expand Down

0 comments on commit 730ca79

Please sign in to comment.