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

Remove md5sum for versions.yml file #1511

Merged
merged 10 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Very minor patch release to fix the full size AWS tests and re-run the template
- Remove traces of markdownlint in the template ([#1486](https://github.com/nf-core/tools/pull/1486)
- Remove accidentally added line in `CHANGELOG.md` in the template ([#1487](https://github.com/nf-core/tools/pull/1487))
- Update linting to check that `.editorconfig` is there and `.yamllint.yml` isn't.
- Remove md5sum for versions.yml
mirpedrol marked this conversation as resolved.
Show resolved Hide resolved

## [v2.3.1 - Mercury Vulture Formatting](https://github.com/nf-core/tools/releases/tag/2.3.1) - [2022-03-23]

Expand Down
30 changes: 16 additions & 14 deletions nf_core/modules/test_yml_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,22 @@ def create_test_file_dict(self, results_dir, is_repeat=False):
test_files = []
for root, dir, file in os.walk(results_dir):
for elem in file:
mirpedrol marked this conversation as resolved.
Show resolved Hide resolved
elem = os.path.join(root, elem)
test_file = {"path": elem} # add the key here so that it comes first in the dict
# Check that this isn't an empty file
if self.check_if_empty_file(elem):
if not is_repeat:
self.errors.append(f"Empty file found! '{os.path.basename(elem)}'")
# Add the md5 anyway, linting should fail later and can be manually removed if needed.
# Originally we skipped this if empty, but then it's too easy to miss the warning.
# Equally, if a file is legitimately empty we don't want to prevent this from working.
elem_md5 = self._md5(elem)
test_file["md5sum"] = elem_md5
# Switch out the results directory path with the expected 'output' directory
test_file["path"] = elem.replace(results_dir, "output")
test_files.append(test_file)
# Check that the file is not versions.yml
if elem != "versions.yml":
elem = os.path.join(root, elem)
test_file = {"path": elem} # add the key here so that it comes first in the dict
# Check that this isn't an empty file
if self.check_if_empty_file(elem):
if not is_repeat:
self.errors.append(f"Empty file found! '{os.path.basename(elem)}'")
# Add the md5 anyway, linting should fail later and can be manually removed if needed.
# Originally we skipped this if empty, but then it's too easy to miss the warning.
# Equally, if a file is legitimately empty we don't want to prevent this from working.
elem_md5 = self._md5(elem)
test_file["md5sum"] = elem_md5
# Switch out the results directory path with the expected 'output' directory
test_file["path"] = elem.replace(results_dir, "output")
test_files.append(test_file)
mirpedrol marked this conversation as resolved.
Show resolved Hide resolved

test_files = sorted(test_files, key=operator.itemgetter("path"))

Expand Down