Relax version string validation for SAS 7#379
Open
hpoettker wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
An issue has been reported in pyreadstat with a sample file: Roche/pyreadstat#340
There are two problems:
7.00.00B, which fails a validation in the SAS header parsing.This PR is only about the first problem. Soft-deleted rows are handled in #366.
Proposed Change
The release string
7.00.00Bhas a slightly different format than the more usual8.0202M0or9.0401M7.The PR suggests to disable the failing validation when the major version is 7 or below.
The
retention_tagkeeps being read as.but the variable is only used in the validation. Major version, minor version, and revision are being passed to the metadata as7,0, and0, which seems reasonable.Validation
With the fix, the command
shows the correct metadata.
The command
also produces a CSV with a single row. But this row is actually intended to be soft-deleted. The only non-deleted row is at the very end of the file.
Without the fix, both commands fail on the release string validation.