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

cylc help fixes #2653

Merged
merged 5 commits into from
May 4, 2018
Merged

cylc help fixes #2653

merged 5 commits into from
May 4, 2018

Conversation

matthewrmshin
Copy link
Contributor

Use 1st sentence of JOSS paper as description in cylc help.
Fix: cylc help control ....
Fix: cylc CATEGORY COMMAND --help
Fix: cylc trigger abbreviation example.
Mention cylc COMMAND --help.

Fix #2650.

Use 1st sentence of JOSS paper as description in `cylc help`.
Fix: `cylc help control ...`.
Fix: `cylc CATEGORY COMMAND --help`
Fix: `cylc trigger` abbreviation example.
Mention `cylc COMMAND --help`.
@matthewrmshin matthewrmshin added the bug Something is wrong :( label May 2, 2018
@matthewrmshin matthewrmshin added this to the next release milestone May 2, 2018
@matthewrmshin matthewrmshin self-assigned this May 2, 2018
Copy link
Collaborator

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

First two fixes are addressed, but it seems (here as on 'master') that there is still undesired behaviour for one-letter/number ambiguous abbreviations, e.g.:

[sbarth@eld318 bin]$ cylc sc                
"sc" is ambiguous.
These commands match the abbreviation "sc":
scan
scp-transfer
[sbarth@eld318 bin]$ cylc s 
cylc-scan	   cylc-set-verbosity  cylc-spawn  cylc-submit
cylc-scp-transfer  cylc-show	       cylc-start  cylc-suite-state
cylc-search	   cylc-shutdown       cylc-stop
Something has gone terribly wrong if you are here...

Additionally, one-letter/number abbreviations which are unambiguous are not getting recognised as such:

[sbarth@eld318 bin]$ cylc 5
cylc-5to6
Something has gone terribly wrong if you are here...
[sbarth@eld318 bin]$ cylc w
cylc-warranty
Something has gone terribly wrong if you are here...

@matthewrmshin
Copy link
Contributor Author

Should now be good.

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Seems much better. The only problem I've found on testing now, is abbreviation doesn't work for the prefix help form with category given: cylc prep pri --help works, but cylc help prep pri fails. Happy to leave for another PR though (in which we could consider dropping categories)

Copy link
Collaborator

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Feedback addressed suitably. Approval waiting on either fix or delegation to a new PR for latest problem spotted by @hjoliver.

@matthewrmshin
Copy link
Contributor Author

Should now be better.

@matthewrmshin
Copy link
Contributor Author

(I have consolidated the logic to select abbreviated sub-commands.)

Copy link
Collaborator

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Another issue has been introduced in the new commit, unfortunately:

[sbarth@eld318 bin]$ cylc a
/home/h06/sbarth/cylc.git/bin/cylc: line 193: /net/home/h06/sbarth/cylc.git/bin/cylc-: No such file or directory
[sbarth@eld318 bin]$ cylc nonsense
/home/h06/sbarth/cylc.git/bin/cylc: line 193: /net/home/h06/sbarth/cylc.git/bin/cylc-: No such file or directory

@matthewrmshin
Copy link
Contributor Author

3rd time lucky?

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

That seems to have got it.

@matthewrmshin
Copy link
Contributor Author

(I have now added a test battery file to stop us from getting it all wrong again.)

@sadielbartholomew
Copy link
Collaborator

Good idea! Just having a quick look but the test file should now do all the hard work :)

help_util "$@"
exit 0
:;;
version|--version|-V|-v)
version|--version|-V)
Copy link
Collaborator

@sadielbartholomew sadielbartholomew May 4, 2018

Choose a reason for hiding this comment

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

Why has the -v option been removed (so it becomes a 'unknown utility'); I assume we want to stick with either the lower or upper case alias & lower-case v is commonly used for verbosity specification? If there is agreement about this I am also happy, but we will need to change line 177 of cylc-help i.e. the relevant help line accordingly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Otherwise everything is fine!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Type "cylc help all" for a list of utilities.
__STDERR__
run_fail "${TEST_NAME_BASE}-license-aardvark" cylc license aardvark
cmp_ok "${TEST_NAME_BASE}-license-aardvark.stderr" <<'__STDERR__'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not essential, but could consolidate this comparison with the identical expected output from the above command - indeed this would be better as it would ensure they produce the same.

Copy link
Collaborator

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

All good now.

@sadielbartholomew sadielbartholomew merged commit 9567515 into cylc:master May 4, 2018
@matthewrmshin matthewrmshin deleted the cylc-help branch May 4, 2018 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :( small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants