-
Notifications
You must be signed in to change notification settings - Fork 3
Give Suggestions to User if they Enter an Incorrect Command #221
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
Give Suggestions to User if they Enter an Incorrect Command #221
Conversation
The threshold could change, but noSolutionsShouldBeDisplayed tests should always result in no strings being returned
out(MessageFormat.format("\tdockstore workflow wes logs --id {0}", runId)); | ||
out("To view the workflow run " + STATUS + ", execute: "); | ||
out(MessageFormat.format("\tdockstore workflow {0} {1} {2} {3}", WES, STATUS, ID, runId)); | ||
out(MessageFormat.format("\tdockstore workflow {0} {1} {2} {3}", WES, LOGS, ID, runId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any documentation for the {#}
notation, only examples of it being used. Just wanted to double check I used this correctly.
It appears that all the tests are failing right now due to the rate limit. |
Hmmm, you may need to space out your pushes or group more commits together (since a build starts when you push).
|
Alternatively, I'm experimenting with a webservice update dockstore/dockstore#5346 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a passing build
…display-help-message-if-invalid-parameter-is-entered # Conflicts: # dockstore-cli-integration-testing/src/test/java/io/dockstore/client/cli/GeneralWorkflowIT.java # dockstore-cli-integration-testing/src/test/java/io/dockstore/client/cli/QuayGitHubBasicIT.java
Codecov ReportBase: 68.97% // Head: 69.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #221 +/- ##
=============================================
+ Coverage 68.97% 69.42% +0.44%
- Complexity 1012 1034 +22
=============================================
Files 47 47
Lines 5937 6034 +97
Branches 776 789 +13
=============================================
+ Hits 4095 4189 +94
- Misses 1509 1510 +1
- Partials 333 335 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Removed public modifier
Removed unneeded continue statement
Changed ArrayList<String> to ArrayList<>
Changed ArrayList<String> to ArrayList<>
Put two cases on the same line
Changed <String> to <>
Changed <String> to <>
Changed <String> to <>
Removed unneeded .toString()
Changed System.out.println out
<String> to <> Removed unneeded .toString() Added constant
<String> -> <>
<String> -> <>
Removed unneeded public
Removed unneeded public
SonarCloud Quality Gate failed. |
We have a passing build! I have corrected about 20 of the sonar cloud issues. |
Description
This PR implements a suggestion tool in a few parts of the CLI. It will provide the user the most similar command to the incorrect command they entered. For example,
Whilst implementing this, I also created a lot of constants for strings that were commonly used in the CLI (for example,
"launch"
,"workflow"
and"--entry"
). This is why this PR effects so many files. To make this PR (hopefully) easier to review I have commented on the important files.I have implemented this functionality for the following types of commands:
The following only have 1 flag that is required (generally
--entry
) and the user is told if the flag isn't provided, I haven't included the suggestion functionality on these.Quite a few commands switch statements to process entry commands. After talking with @denis-yuen , it was decided that it would be better leave them as is and create this ticket dockstore/dockstore#5344 to setup the suggestion system after
JCommander
had been added to them.Review Instructions
Issue
DOCK-2172
dockstore/dockstore#4910
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!
./mvnw clean install