Disregard SAS and SPSS format width and precision when identifying date, datetime or time variables#332
Disregard SAS and SPSS format width and precision when identifying date, datetime or time variables#332belegdol wants to merge 4 commits into
Conversation
|
It remains to be clarified how |
|
On a second thought, breaking existing applications is a terrible idea. As such, I went ahead and implemented a way of handling extra formats provided with width and precision gracefully. |
|
Please elaborate what is that change in Readstat, what is this PR trying to achieve (what is the current issue and what is this solving) and why you need to change the current mechanism, I am in principle against changing it. |
|
The change in ReadStat fixes reading format width and precision from 32-bit SAS files, such as ones created with SAS for Windows. As a result, format like |
|
OK, now I get it, thanks for the explanation. Yes, makes fully sense to do this change. Please: 1- Make sure all tests pass Thanks! |
|
Existing tests should hopefully be fixed now. As far as a new test for this PR is concerned: would you mind pulling latest ReadStat to the dev branch? I can only easily generate the test files using Windows version of SAS, and the ReadStat snapshot currently in pyreadstat tree does not read the format widths or precision. |
|
latest Readstat sources are now on dev |
|
Since both PRs would potentially share a single test, maybe you would like to consolidate both in one PR? |
|
Interestingly after updating Readstat sources, my tests are failing for the extra date formats, so my guess is that your PR will solve that =) |
bac2564 to
ab84cb2
Compare
Thank you!
I would prefer not to since what is being changed is only related in a way that it affects timestamp variables.
This is actually good - as such, I do not think this PR no longer requires a separate test. As you have just experienced, with updated ReadStat the existing files no longer work because their now completely read formats are not in the list as it exists in current |
For this PR ok, yes, but for your other PR I still want a test with the new format that has fractions of seconds, and check that those fractional seconds are read as expected (as shown in SAS), so anyway the test I requested is still needed. |
|
Of course, for the second PR I will provide a test. |
This should help retain robust identification following WizardMac/ReadStat@5c44678.