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

Move input files out of golden directory #454

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

newhoggy
Copy link
Contributor

Changelog

- description: |
    Move input files out of `golden` directory
# 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

Only golden files should live in the golden directory.

A new CI check has been added to enforce this.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

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

@newhoggy newhoggy marked this pull request as ready for review November 14, 2023 12:39
@newhoggy newhoggy force-pushed the newhoggy/move-input-files-out-of-golden-directory branch 3 times, most recently from 6b36414 to fa0012c Compare November 14, 2023 12:52
.github/workflows/haskell.yml Outdated Show resolved Hide resolved
run: cabal test all
run: |
cabal test all
rm -rf cardano-cli/test/cardano-cli-golden/files/golden
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this rm followed by rerunning the test suite should be explained by a comment.

It looks like an unusual pattern and we will forget why it's there in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh woow yeah I overlooked that. Windows is so unusual, my mind doesn't even consider it 😆

@smelc
Copy link
Contributor

smelc commented Nov 14, 2023

Did a first pass, @newhoggy> ping me when the CI passes, I'll have another look 👍

@newhoggy newhoggy force-pushed the newhoggy/move-input-files-out-of-golden-directory branch 4 times, most recently from 070a4f3 to b17f193 Compare November 23, 2023 10:01
@newhoggy newhoggy force-pushed the newhoggy/move-input-files-out-of-golden-directory branch from b17f193 to 4db6514 Compare December 12, 2023 13:45
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM!

import qualified Hedgehog.Extras.Test.Golden as H

{- HLINT ignore "Use camelCase" -}

hprop_golden_shelleyGenesisInitialTxIn :: Property
hprop_golden_shelleyGenesisInitialTxIn = propertyOnce $ do
verificationKeyFile <- noteInputFile "test/cardano-cli-golden/files/input/shelley/keys/genesis_verification_keys/genesis-utxo.vkey"
goldenUtxoHashFile <- noteInputFile "test/cardano-cli-golden/files/golden/shelley/keys/genesis_utxo_hashes/utxo_hash"
goldenUtxoHashFile <- H.note "test/cardano-cli-golden/files/golden/shelley/keys/genesis_utxo_hashes/utxo_hash"
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you intentionally not change golden -> input here?

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 because goldenUtxoHashFile is not used as an input file. The code before was misleading.

@newhoggy newhoggy force-pushed the newhoggy/move-input-files-out-of-golden-directory branch from 4db6514 to b351b1b Compare December 13, 2023 10:51
@newhoggy newhoggy requested a review from smelc December 13, 2023 10:57
@newhoggy newhoggy force-pushed the newhoggy/move-input-files-out-of-golden-directory branch from b351b1b to 2381388 Compare January 5, 2024 03:35
@newhoggy newhoggy added this pull request to the merge queue Jan 7, 2024
Merged via the queue into main with commit 658243b Jan 7, 2024
20 checks passed
@newhoggy newhoggy deleted the newhoggy/move-input-files-out-of-golden-directory branch January 7, 2024 12:01
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.

4 participants