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

[--output-format json|--output-format json] format becomes [--output-yaml|--output-json] #523

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Dec 14, 2023

Warning

In addition to changing governance commands, I changed the behavior of transaction view too; to be consistent.
If we don't want to change transaction view (which is a historical command right?), LMK I will revert this part of the change.

Changelog

- description: |
    In `transaction view` and `governance action view`, replace:
    
    `--output-format json` by `--output-json`
    `--output-format yaml` by `--output-yaml`
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

How to trust this PR

Look at the diff of golden files

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@@ -1164,7 +1164,7 @@ Usage: cardano-cli shelley transaction txid

Print a transaction identifier.

Usage: cardano-cli shelley transaction view [--output-format STRING]
Usage: cardano-cli shelley transaction view [--json | --yaml]
Copy link
Contributor

@carbolymer carbolymer Dec 14, 2023

Choose a reason for hiding this comment

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

I'm wondering if we should prefix those formats with output or similar keyword e.g. --output-json. It would be better to logically group them together in case we would like to add new output formats in the future e.g. cbor, bson, messagepack, xml...

Copy link
Contributor

@Jimbo4350 Jimbo4350 Dec 14, 2023

Choose a reason for hiding this comment

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

In response to your question --as-json | --as-yaml? It reads well however you can prepend output instead if you think that is preferable.

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 think I prefer the shorter flags, but no strong opinion. @Jimbo4350> what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK so went for --output-json and --output-yaml after seeing @Jimbo4350's similar opinion below 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep that's fine 👍

@smelc smelc force-pushed the smelc/output-format->yaml-json branch 2 times, most recently from 1f7897e to 87db026 Compare December 14, 2023 13:53
@@ -1164,7 +1164,7 @@ Usage: cardano-cli shelley transaction txid

Print a transaction identifier.

Usage: cardano-cli shelley transaction view [--output-format STRING]
Usage: cardano-cli shelley transaction view [--json | --yaml]
Copy link
Contributor

@Jimbo4350 Jimbo4350 Dec 14, 2023

Choose a reason for hiding this comment

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

In response to your question --as-json | --as-yaml? It reads well however you can prepend output instead if you think that is preferable.

@smelc smelc force-pushed the smelc/output-format->yaml-json branch from 87db026 to 7bb38c3 Compare December 14, 2023 15:28
@smelc smelc added this pull request to the merge queue Dec 14, 2023
@smelc smelc changed the title --output format becomes --yaml|--json [--output-format json|--output-format json] format becomes [--output-yaml|--output-json] Dec 14, 2023
Merged via the queue into main with commit 559b403 Dec 14, 2023
21 checks passed
@smelc smelc deleted the smelc/output-format->yaml-json branch December 14, 2023 16:55
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.

3 participants