Skip to content
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

enhance(client): tune dataset head cli output #2381

Merged
merged 1 commit into from
Jun 25, 2023

Conversation

tianweidut
Copy link
Member

Description

  • simplify default output
    image
  • support --show-types option
    image
  • add more helpful info in the client help output
     ❯ swcli dataset head --help
    Usage: swcli dataset head [OPTIONS] DATASET
    
      Print the first n rows of the dataset
    
      DATASET: argument use the `Dataset URI` format, so you can remove the whole
      dataset or a specified-version dataset.
    
      Examples:
    
              - print the first 5 rows of the mnist dataset
              swcli dataset head -n 5 mnist
    
              - print the first 10 rows of the mnist(v0 version) dataset and show raw data
              swcli dataset head -n 10 mnist/v0 --show-raw-data
    
              - print the data types of the mnist dataset
              swcli dataset head mnist --show-types
    
              - print the remote cloud dataset's first 5 rows
              swcli dataset head cloud://cloud-cn/project/test/dataset/mnist -n 5
    
    Options:
      -n, --rows INTEGER     Print the first NUM rows of the dataset  [default: 5]
      -srd, --show-raw-data  Fetch raw data content
      -st, --show-types      Show data types
      --help                 Show this message and exit.
    

Modules

  • Client

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

@tianweidut tianweidut added this to the 0.4.10 milestone Jun 21, 2023
@tianweidut tianweidut self-assigned this Jun 21, 2023
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #2381 (c7242f2) into main (6d2a2fe) will increase coverage by 8.51%.
The diff coverage is 83.33%.

@@             Coverage Diff              @@
##               main    #2381      +/-   ##
============================================
+ Coverage     82.58%   91.09%   +8.51%     
============================================
  Files           429       98     -331     
  Lines         23013    11174   -11839     
  Branches       1352        0    -1352     
============================================
- Hits          19005    10179    -8826     
+ Misses         3396      995    -2401     
+ Partials        612        0     -612     
Flag Coverage Δ
console ?
controller ?
standalone 91.09% <83.33%> (+<0.01%) ⬆️
unittests 91.09% <83.33%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/starwhale/core/dataset/view.py 65.45% <83.33%> (+0.85%) ⬆️

... and 331 files with indirect coverage changes

Copy link
Member

@anda-ren anda-ren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anda-ren anda-ren merged commit e76d21c into star-whale:main Jun 25, 2023
@tianweidut tianweidut deleted the enhance/dataset-head branch September 5, 2023 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants