populationgenomics / metamist

Sample level metadata system
MIT License
1 stars 1 forks source link

Create or validate md5s script #870

Closed EddieLF closed 1 month ago

EddieLF commented 1 month ago

Removes the existing (and broken) check_md5s.py script, and adds a way to check md5s with the existing create_md5s.py script, now renamed to create_or_validate_md5s.py

Script will now create md5s for files in the dir that don't have one, and either validate those that do have md5s, or overwrite old md5s with new md5s if the --force-recreate-existing flag is present.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.49%. Comparing base (e2dd775) to head (56aec2e). Report is 1 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #870 +/- ## ======================================= Coverage 80.49% 80.49% ======================================= Files 172 172 Lines 14540 14540 ======================================= Hits 11704 11704 Misses 2836 2836 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

EddieLF commented 1 month ago

@illusional thanks for the feedback. I've implemented the mode based on if a user sets --validate-existing-only or if they set --create-only.

Originally I thought it might be nice if we created MD5s where they didn't exist and validated them where they did - all in a single pass. But it probably makes more sense to split this out into two possible options. Either create the md5s OR validate them, don't try and do both in one run.