Skip to content

Commit

Permalink
Turn --help into a global option
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 committed Aug 30, 2022
1 parent b69f3cc commit e1f4651
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 22 deletions.
1 change: 1 addition & 0 deletions bin/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const handleError = (message, error) => {
}
})
.global('version', false)
.group('help', 'Global Options:')
.fail(handleError)
.middleware(setupOpts)
.middleware(setupLogger)
Expand Down
2 changes: 1 addition & 1 deletion bin/cml.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ describe('command-line interface tests', () => {
environment]
--repo Repository URL or slug[string] [default: infer from the environment]
--token Personal access token [string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]"
`);
});
Expand Down
3 changes: 1 addition & 2 deletions bin/cml/asset/publish.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ describe('CML e2e', () => {
from the CI ENV. [string] [default: infer from the environment]
--token Personal access token
[string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--md Output in markdown format [title || name](url) [boolean]
-t, --title Markdown title [title](url) or ![](url title) [string]
--native Uses driver's native capabilities to upload assets instead
Expand Down
3 changes: 1 addition & 2 deletions bin/cml/check/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ describe('CML e2e', () => {
--repo Repository URL or slug[string] [default: infer from the environment]
--token GITHUB_TOKEN or Github App token. Personal access token won't work
[string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--commit-sha, --head-sha Commit SHA linked to this comment
[string] [default: HEAD]
--conclusion Conclusion status of the check
Expand Down
3 changes: 1 addition & 2 deletions bin/cml/comment/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ describe('Comment integration tests', () => {
environment]
--repo Repository URL or slug[string] [default: infer from the environment]
--token Personal access token [string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--pr Post to an existing PR/MR associated with the
specified commit [boolean]
--commit-sha, --head-sha Commit SHA linked to this comment
Expand Down
5 changes: 1 addition & 4 deletions bin/cml/pr/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ describe('CML e2e', () => {
environment]
--repo Repository URL or slug[string] [default: infer from the environment]
--token Personal access token [string] [default: infer from the environment]
Options:
--help Show help [boolean]
--version Show version number [boolean]"
--help Show help [boolean]"
`);
});
});
3 changes: 1 addition & 2 deletions bin/cml/repo/prepare.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ describe('CML e2e', () => {
environment]
--repo Repository URL or slug[string] [default: infer from the environment]
--token Personal access token [string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--unshallow Fetch as much as possible, converting a shallow repository to a
complete one [boolean]
--user-email Git user email [string] [default: \\"[email protected]\\"]
Expand Down
5 changes: 1 addition & 4 deletions bin/cml/runner/start.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ describe('CML e2e', () => {
environment]
--repo Repository URL or slug[string] [default: infer from the environment]
--token Personal access token [string] [default: infer from the environment]
Options:
--help Show help [boolean]
--version Show version number [boolean]"
--help Show help [boolean]"
`);
});

Expand Down
3 changes: 1 addition & 2 deletions bin/cml/tensorboard/start.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ describe('CML e2e', () => {
[string] [default: infer from the environment]
--token Personal access token
[string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
-c, --credentials TensorBoard credentials as JSON, usually found at
~/.config/tensorboard/credentials/uploader-creds.json
[string] [required]
Expand Down
5 changes: 2 additions & 3 deletions bin/cml/workflow/rerun.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ describe('CML e2e', () => {
environment]
--repo Repository URL or slug[string] [default: infer from the environment]
--token Personal access token [string] [default: infer from the environment]
--help Show help [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--id Run identifier to be rerun [string]"
--id Run identifier to be rerun [string]"
`);
});
});

1 comment on commit e1f4651

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

Please sign in to comment.