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

Add tool to print SHA256 hashes of dataset files #143

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

cgohlke
Copy link
Member

@cgohlke cgohlke commented Nov 1, 2024

Description

Add tool to print SHA256 hashes of dataset files.

Checklist

  • The pull request title and description are concise.
  • Related issues are linked in the description.
  • New dependencies are explained.
  • The source code and documentation can be distributed under the MIT license.
  • The source code adheres to code standards.
  • New classes, functions, and features are thoroughly tested.
  • New, user-facing classes, functions, and features are documented.
  • New features are covered in tutorials.
  • No files other than source code, documentation, and project settings are added to the repository.

@cgohlke
Copy link
Member Author

cgohlke commented Nov 1, 2024

Hi @bruno-pannunzio. This simple script might be convenient when adding new files to phasorpy.datasets. It prints SHA256 hashes of files in a format that can be copy&pasted to a Python dict.

@bruno-pannunzio
Copy link
Contributor

Thanks @cgohlke! This is very useful.

I tried running for some FBD files but I think there is a problem because the filenames contain the character '$' which is omitted when looking for the path. I also believe that removing the '$' from the filename is not ideal because the file must contain the character to be read correctly by the read_fbd function, if I understood correctly.

With other files that don't contain '$' it works perfectly.

@cgohlke
Copy link
Member Author

cgohlke commented Nov 1, 2024

How did you use the script? On Windows it works as expected, also with $. If single file names fail, try to run the script with the directory name. Or quote the files.

Copy link
Contributor

@bruno-pannunzio bruno-pannunzio left a comment

Choose a reason for hiding this comment

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

I think quoting solved the issue. I believe it was something related to how the MacOS copies the path, not related to this PR then.

This worked great, thanks again Christoph.

@cgohlke cgohlke merged commit a6c3ee5 into phasorpy:main Nov 1, 2024
14 checks passed
@cgohlke cgohlke deleted the sha256 branch November 1, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants