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

Generate hash of workbooks #23

Open
ianalexmac opened this issue Apr 29, 2024 · 2 comments
Open

Generate hash of workbooks #23

ianalexmac opened this issue Apr 29, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ianalexmac
Copy link
Collaborator

In order to ensure that the workbooks haven't changed, we would like to generate a hash of the workbooks directory.

We would like this hash to be:

  • A single value
  • Reproducible by anyone
  • Straightforward to generate
  • Not computationally heavy
@ianalexmac ianalexmac self-assigned this Apr 29, 2024
@ianalexmac ianalexmac added the enhancement New feature or request label Apr 29, 2024
@ianalexmac
Copy link
Collaborator Author

ianalexmac commented Apr 29, 2024

The short answer is to use the bash command sha256sum /path/to/file

However, the sha256sum command only works on singular files, not directories. To get around this, we will generate a single .tar file of the directory, then hash that file. The operation happens in two steps:

  • First, we generate the tarball and save it someplace temporary, such as your downloads folder or desktop. The other filepath points towards the workbook directory.
    tar cf /path/to/tarball/output.tar /path/to/workbooks/directory

  • Second, we run the SHA-256 checksum on the generated tarball
    sha256sum /path/to/tarball/output.tar

  • Finally, we compare the generated hash to the documented hash. If different, start worrying. Otherwise, keep coding!

@ianalexmac
Copy link
Collaborator Author

When I follow the above steps, my machine generates the hash 754c947c84bedf1ef2426277d2c50dee7fb51a98a883da09bd6d87ef8840ac7f

@eldobbins or @jikaczmarski perhaps you could replicate my steps and ensure that we are on the right track? If so, we can make this the official V2.0.0 workbooks hash and stash it in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant