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

[DSCP-351] improve keygen commands #305

Merged
merged 2 commits into from Nov 3, 2018

Conversation

Martoon-00
Copy link
Contributor

@Martoon-00 Martoon-00 commented Oct 30, 2018

Description

Improves keygen interface. Adds help messages for each command of the keygen.

For instance:
dscp-keygen --seed --command "address:hex" -> dscp-keygen --seed address --hex.

YT issue

https://issues.serokell.io/issue/DSCP-351

Checklist

Hint: a perfect PR has all the checkmarks set.

Possible related changes (conditional):

  • I added tests if required, in case they are:
    • Covering new introduced functionality (feature).
    • Regression tests preventing the bug from silently reappearing again (bugfix).
  • I have checked the sample config and launch scripts and updated them if it was necessary (especially if executables or CLIs were changed).
  • I have checked READMEs and changed them accordingly if it's necessary (the main README.md as well as subproject READMEs for all related executables).
  • If a public API structure or/and data serialization was changed, I made sure that these changes are reflected in the:
  • If any public documentation was written, I have spellchecked it.

Stylistic (obligatory):

  • My commit history is clean, descriptive and do not contain merge or revert commits or commits like "WIP".
  • My code complies with the style guide.
  • My code is documented (haddock) and these docs are decent (full enough and spellchecked).

@Martoon-00 Martoon-00 force-pushed the martoon/dscp351-improve-keygen-commands branch from b06995b to b9256a5 Compare October 30, 2018 19:54
@Martoon-00 Martoon-00 changed the title Martoon/dscp351 improve keygen commands [DSCP-351] improve keygen commands Nov 1, 2018
tools/README.md Outdated Show resolved Hide resolved
tools/README.md Outdated Show resolved Hide resolved
tools/README.md Outdated Show resolved Hide resolved
@@ -32,7 +31,7 @@ secretDataTypeParser = asum
, CommSecret <$> option auto
(long "comm-sec" <>
metavar "N" <>
help "Use given committee secret and derive secret key of N-th \
help "Use giencodeIntegerven committee secret and derive secret key of N-th \
Copy link
Contributor

Choose a reason for hiding this comment

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

You've mistakenly inserted encodeInteger in the middle of the other word.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:wtf:

tools/src/keygen/KeygenOptions.hs Outdated Show resolved Hide resolved

, command "student-submission" $ info
(fmap PrintStudentSubmission . strOption $
long "seed" <>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any other way to solve this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I extracted that parser and one below, if you were talking about it.

@DisciplinaOU DisciplinaOU deleted a comment from Martoon-00 Nov 3, 2018
@Martoon-00 Martoon-00 force-pushed the martoon/dscp351-improve-keygen-commands branch from 6ef1591 to bec5a87 Compare November 3, 2018 19:42
@Martoon-00 Martoon-00 force-pushed the martoon/dscp351-improve-keygen-commands branch from bec5a87 to b5411d8 Compare November 3, 2018 19:54
@Martoon-00 Martoon-00 merged commit 886b489 into master Nov 3, 2018
@Martoon-00 Martoon-00 deleted the martoon/dscp351-improve-keygen-commands branch November 3, 2018 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants