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

create-poll, answer-poll, verify-poll: move to 'babbage governance' block #322

Merged
merged 9 commits into from
Oct 5, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Oct 2, 2023

Changelog

- description: |
    create-poll, answer-poll, verify-poll: move to 'babbage governance' block
# 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

Part of fixing #313

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • round trip tests
    • integration tests
      See Running tests for more details
  • NA The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch 3 times, most recently from ad8be80 to f9f9f5f Compare October 2, 2023 14:06
@smelc smelc force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch 2 times, most recently from fc10f21 to ea30fe7 Compare October 2, 2023 19:04
@smelc smelc force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch 6 times, most recently from 886bdb5 to 3ac7b6f Compare October 3, 2023 11:42
@smelc smelc marked this pull request as ready for review October 3, 2023 12:31
@smelc smelc force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch from 3ac7b6f to e5ed4f8 Compare October 3, 2023 12:31
@@ -1,6 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}

module Test.Golden.Shelley.Governance.AnswerPoll where
module Test.Golden.Babbage.Governance.AnswerPoll where
Copy link
Contributor

@newhoggy newhoggy Oct 3, 2023

Choose a reason for hiding this comment

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

The Shelley in Test.Golden.Shelley.Governance.AnswerPoll doesn't mean Shelley era, it means "Shelley Based Era", which is confusing.

When in era-based, we shouldn't organise by era because it can get complicated. We should omit both era and eon.

Maybe the module should beTest.Golden.EraBased.Governance.AnswerPoll to say we are testing era-based commands.

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 I see 👍

I changed to Test.Golden.EraBased.Governance.AnswerPoll.

expectedAnswerFile <- noteInputFile "test/cardano-cli-golden/files/golden/shelley/governance/polls/basic.answer.0.json"
hprop_golden_babbageGovernanceAnswerPoll0 :: Property
hprop_golden_babbageGovernanceAnswerPoll0 = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be test/cardano-cli-golden/files/input/governance/polls/basic.json

That is:

  • Replace golden with input because this is not a golden file.
  • Delete babbage.

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 did the change 👍

@newhoggy newhoggy force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch from e5ed4f8 to 55f92db Compare October 4, 2023 13:12
@smelc smelc force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch 3 times, most recently from 8fabc26 to 5add478 Compare October 4, 2023 15:25
(Maybe Word) -- ^ Answer index
(Maybe (File () Out)) -- ^ Tx file
| GovernanceVerifyPoll -- ^ Verify answer to a given SPO poll
(BabbageEraOnwards era) {- TODO smelc, use BabbageEraOnly here instead -}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these TODOs still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes they are, because the poll commands are babbage only, whereas this is babbage onwards.

@newhoggy
Copy link
Contributor

newhoggy commented Oct 4, 2023

A few more comments. Merge when you're ready.

@smelc smelc force-pushed the smelc/clean-up-era-governance-commands-issue-313 branch from c847186 to 834d66e Compare October 5, 2023 07:58
@smelc smelc added this pull request to the merge queue Oct 5, 2023
Merged via the queue into main with commit 4c615c9 Oct 5, 2023
19 checks passed
@smelc smelc deleted the smelc/clean-up-era-governance-commands-issue-313 branch October 5, 2023 08:29
[--out-file FILE]

Verify an answer to a given SPO poll

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, an oversight in my review. We're not actually supposed to delete the legacy commands. These need to be kept in tact. We will eventually delete all the legacy commands in one go, but not right now.

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

2 participants