RDatasets.jl icon indicating copy to clipboard operation
RDatasets.jl copied to clipboard

Specify file format explicitly

Open devmotion opened this issue 4 years ago • 3 comments

This PR fixes https://github.com/JuliaStats/RDatasets.jl/issues/117 - and does not seem to break the tests. It specifies the file format explicitly when loading ".rda" files instead of relying on the automatic discovery in FileIO. This PR is an alternative to https://github.com/JuliaStats/RDatasets.jl/pull/118.

@timholy My guess is that FileIO 1.6 changed the query mechanism. It seems it prioritized the file ending in FileIO <= 1.5 but with FileIO 1.6 the file type is determined incorrectly as Gzip due to the magic bytes of compressed RData files.

devmotion avatar Mar 06 '21 23:03 devmotion

Codecov Report

Merging #119 (47b34c2) into master (c2b17d0) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #119   +/-   ##
=======================================
  Coverage   84.00%   84.00%           
=======================================
  Files           4        4           
  Lines          25       25           
=======================================
  Hits           21       21           
  Misses          4        4           
Impacted Files Coverage Δ
src/RDatasets.jl 100.00% <ø> (ø)
src/dataset.jl 90.90% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c2b17d0...47b34c2. Read the comment docs.

codecov-io avatar Mar 06 '21 23:03 codecov-io

Bump 😃 What is the general opinion? Should this change be applied, even if FileIO already fixed the original issue?

devmotion avatar Apr 17 '21 08:04 devmotion

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.48%. Comparing base (b1a5959) to head (fc0eedb).

Files Patch % Lines
src/dataset.jl 66.66% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   83.33%   81.48%   -1.86%     
==========================================
  Files           3        4       +1     
  Lines          24       27       +3     
==========================================
+ Hits           20       22       +2     
- Misses          4        5       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 02 '24 11:04 codecov-commenter