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

Compression MIME addition and checksum identification expanded #99

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
---

## [Unreleased]

---

## [5.1.0] - 2024-07-08
### Added
- Add validation flowchart
- Add support for unmapped BAM
- Add additional MIME type for GZIP compressed files
- Add support for checksum files formatted with any whitespace separator

---

## [5.0.0] - 2024-02-16
Expand Down
2 changes: 1 addition & 1 deletion pipeval/generate_checksum/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _validate_checksums(path:Path):
def _compare_hash(hash_type:str, path:Path, hash_path:Path):
''' Compares existing hash to generated hash '''
# Read only the hash and not the filename for comparison
existing_hash = hash_path.read_text().split(' ')[0].strip()
existing_hash = hash_path.read_text().split()[0].strip()

if hash_type == 'md5':
return existing_hash == _generate_md5(path)
Expand Down
1 change: 1 addition & 0 deletions pipeval/validate/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def _identify_compression(path:Path):
''' Identify compression type and returns appropriate file handler '''
compression_handlers = {
'application/x-gzip': gzip.open,
'application/gzip': gzip.open,
'application/x-bzip2': bz2.open
}

Expand Down