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

Warn for the MD5 sum of empty files in the test.yml files. #1302

Closed
charles-plessy opened this issue Oct 27, 2021 · 2 comments
Closed

Warn for the MD5 sum of empty files in the test.yml files. #1302

charles-plessy opened this issue Oct 27, 2021 · 2 comments

Comments

@charles-plessy
Copy link
Contributor

I would like to suggest to warn for the MD5 sum d41d8cd98f00b204e9800998ecf8427e in the test.yml files, because it is an empty file, which may be a sign that the module is not functioning as expected.

See how often it occurs: https://github.com/nf-core/modules/search?q=d41d8cd98f00b204e9800998ecf8427e

Although empty files may be generated sometimes because test data is light, the best solution in these case would be to improve the tests to that they produce a real output.

@charles-plessy
Copy link
Contributor Author

I found another funny MD5 sum, 7029066c27ac6f5ef18d660d5741979a, for compressed empty files. You can produce it with the following command: printf '' | gzip -n | md5sum.

It is more rare than the previous one, but still occurs in a couple of packages: https://github.com/nf-core/modules/search?q=7029066c27ac6f5ef18d660d5741979a

@ewels ewels added the linting label Nov 24, 2021
@ewels ewels added this to the 2.3 milestone Dec 9, 2021
@ewels ewels removed this from the 2.3 milestone Dec 9, 2021
@ewels ewels closed this as completed Dec 14, 2021
@ewels
Copy link
Member

ewels commented Dec 14, 2021

Done: Linting now checks for these two specific md5sum hashes and warns about them.

The test-yml builder also checks for empty files (or gzipped empty files). If it finds them, it does not add an md5sum to the test.yml and it throws an error at the end of execution. So this can be ignored in exceptions but should hopefully be pretty obvious.

See also nf-core/modules#1167 where I wrote a small helper script to find suspicious md5sums in the YAML files. These two are the only super obvious ones though 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants