Skip to content

Commit

Permalink
Merge pull request #4 from UW-GAC/feature/better-reporting
Browse files Browse the repository at this point in the history
Add more debugging output when checking expected files
  • Loading branch information
amstilp authored Sep 26, 2024
2 parents a5aa41a + 3ba9d7c commit cd3d870
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,17 @@ def _check_prefetch_against_manifest(self, directory, manifest):
"""Check that prefetch downloaded all the files in the manifest."""
expected_files = self._read_manifest(manifest)
downloaded_files = os.listdir(directory)
print("Found downloaded files:")
print(sorted(downloaded_files))
print("Expected {} files; found {} files.", len(expected_files), len(downloaded_files))
return set(downloaded_files) == set(expected_files)

def _check_prefetch_against_n_files(self, directory, n_files):
"""Check that prefetch downloaded the expected number of files."""
downloaded_files = os.listdir(directory)
print(downloaded_files)
print("Found downloaded files:")
print(sorted(downloaded_files))
print("Expected {} files; found {} files.", n_files, len(downloaded_files))
return len(downloaded_files) == n_files

def _untar(self, directory):
Expand Down
2 changes: 1 addition & 1 deletion fetch_dbgap_files.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ task fetch_files {
}
runtime {
# Pull from DockerHub
docker: "uwgac/fetch-dbgap-files:0.2.0"
docker: "uwgac/fetch-dbgap-files:0.2.1"
disks: "local-disk ${disk_gb} SSD"
}
}

0 comments on commit cd3d870

Please sign in to comment.