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

feat(runtime): support output filter for runtime info #2065

Merged
merged 2 commits into from
Apr 11, 2023

Conversation

tianweidut
Copy link
Member

@tianweidut tianweidut commented Apr 10, 2023

Description

asciicast

❯ swcli runtime info --help
Usage: swcli runtime info [OPTIONS] RUNTIME

  Show runtime details

  RUNTIME: argument use the `Runtime URI` format. Version is optional for the
  Runtime URI. If the version is not specified, the latest version will be
  used.

  Example:

            swcli runtime info pytorch # show basic info from the latest version of runtime
            swcli runtime info pytorch/version/v0  # show basic info
            swcli runtime info pytorch/version/v0 --output-filter basic  # show basic info
            swcli runtime info pytorch/version/v1 -of runtime_yaml  # show runtime.yaml content
            swcli runtime info pytorch/version/v1 -of lock # show auto lock file content
            swcli runtime info pytorch/version/v1 -of manifest # show _manifest.yaml content
            swcli runtime info pytorch/version/v1 -of all # show all info of the runtime

Options:
  -of, --output-filter [basic|runtime_yaml|manifest|lock|all]
                                  Filter the output content. Only standalone
                                  instance supports this option.  [default:
                                  basic]
  --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 v0.4.3 milestone Apr 10, 2023
@tianweidut tianweidut self-assigned this Apr 10, 2023
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Merging #2065 (e29a2cd) into main (444e8d0) will increase coverage by 8.35%.
The diff coverage is 82.50%.

@@             Coverage Diff              @@
##               main    #2065      +/-   ##
============================================
+ Coverage     82.22%   90.58%   +8.35%     
============================================
  Files           424       98     -326     
  Lines         21783    10755   -11028     
  Branches       1230        0    -1230     
============================================
- Hits          17912     9742    -8170     
+ Misses         3319     1013    -2306     
+ Partials        552        0     -552     
Flag Coverage Δ
controller ?
standalone 90.58% <82.50%> (-0.18%) ⬇️
unittests 90.58% <82.50%> (-0.18%) ⬇️

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

Impacted Files Coverage Δ
client/starwhale/base/cloud.py 83.33% <ø> (ø)
client/starwhale/core/runtime/model.py 93.39% <65.62%> (-1.45%) ⬇️
client/starwhale/core/runtime/view.py 90.65% <93.75%> (-3.10%) ⬇️

... and 330 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tianweidut
Copy link
Member Author

@xuchuan e29a2 commit has already removed the history output and made latest as the default of runtime URI version.

Copy link
Contributor

@xuchuan xuchuan left a comment

Choose a reason for hiding this comment

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

LGTM

@xuchuan xuchuan merged commit 0b29fd0 into star-whale:main Apr 11, 2023
@tianweidut tianweidut deleted the feat/runtime-info branch April 14, 2023 02:20
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