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

PLT-6750: Parsing pretty printed Marlowe contracts #687

Merged
merged 23 commits into from Aug 29, 2023
Merged

Conversation

yveshauser
Copy link
Member

@yveshauser yveshauser commented Aug 11, 2023

This PR addresses #645

Run marlowe-cli format --help to display the help of the newly introduced command.

The goal is to provide a command line tool to allow conversion between pretty-printed Marlowe contracts and the JSON representation of a Marlowe contract (default). Note, that with another ticket we will introduce also an official grammar for pretty printed Marlowe in https://github.com/input-output-hk/marlowe, that will also allow blockchain agnositc parsing of Marlowe contracts.

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Test report is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
      • Review required
      • Substantial changes to code, test, or documentation
      • Change made to Marlowe validator (@bwbush and @palas must be included as reviewers)
      • Review not required
      • Minor changes to non-critical code, documentation, nix derivations, configuration files, or scripts
      • Formatting, spelling, grammar, or reorganization
    • Reviewer requested

@yveshauser yveshauser force-pushed the PLT-6750 branch 2 times, most recently from 92fa4f8 to 940a265 Compare August 16, 2023 08:23
@yveshauser yveshauser marked this pull request as ready for review August 16, 2023 08:50
Copy link
Collaborator

@palas palas left a comment

Choose a reason for hiding this comment

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

Nicely done! I am quite convinced the code is correct, and the test you wrote should give good coverage. I have written a couple of suggestions for improved usability and a couple of other minor things

marlowe-cli/src/Language/Marlowe/CLI/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/command/Language/Marlowe/CLI/Command/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/src/Language/Marlowe/CLI/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/tests/Spec/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/command/Language/Marlowe/CLI/Command/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/command/Language/Marlowe/CLI/Command/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/command/Language/Marlowe/CLI/Command/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/command/Language/Marlowe/CLI/Command/Format.hs Outdated Show resolved Hide resolved
marlowe-cli/command/Language/Marlowe/CLI/Command.hs Outdated Show resolved Hide resolved
Copy link
Collaborator

@bwbush bwbush left a comment

Choose a reason for hiding this comment

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

Looks good, aside from the one concern I noted in a comment. Thanks!

@yveshauser yveshauser force-pushed the PLT-6750 branch 2 times, most recently from 0e1afc9 to 7f5b316 Compare August 23, 2023 09:38
Copy link
Collaborator

@palas palas left a comment

Choose a reason for hiding this comment

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

Nice 👍

@yveshauser yveshauser merged commit 04fba8f into main Aug 29, 2023
6 checks passed
@yveshauser yveshauser deleted the PLT-6750 branch August 29, 2023 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants