astrogo / fitsio

fitsio is a pure-Go package to read and write `FITS` files
BSD 3-Clause "New" or "Revised" License
53 stars 24 forks source link

fitsio: fix float64 formatting #54 #57

Closed bjet007 closed 3 years ago

bjet007 commented 4 years ago

fix: Change printing of float64 from %f to %#20g.

codecov-io commented 4 years ago

Codecov Report

Merging #57 into master will decrease coverage by 1.46%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   69.95%   68.48%   -1.47%     
==========================================
  Files          14       14              
  Lines        2922     2618     -304     
==========================================
- Hits         2044     1793     -251     
+ Misses        728      675      -53     
  Partials      150      150              
Impacted Files Coverage Δ
utils.go 65.12% <100.00%> (-0.77%) :arrow_down:
file.go 72.22% <0.00%> (-4.20%) :arrow_down:
image.go 54.60% <0.00%> (-2.54%) :arrow_down:
encode.go 51.51% <0.00%> (-2.34%) :arrow_down:
fltimg/image.go 52.00% <0.00%> (-2.24%) :arrow_down:
rows.go 87.17% <0.00%> (-1.84%) :arrow_down:
header.go 66.50% <0.00%> (-1.76%) :arrow_down:
table.go 58.61% <0.00%> (-0.59%) :arrow_down:
binary.go 92.76% <0.00%> (-0.41%) :arrow_down:
... and 5 more

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 0188015...d518e00. Read the comment docs.

bjet007 commented 3 years ago

While re-reading the spec, I realized that the exponent letter need to be uppercased. So I change the formatting to do that and I did add few other test.

I kept the commit separated for review, but I can squash them before the merge.

Ben

sbinet commented 3 years ago

(I'll squash when I'll merge that PR in)

sbinet commented 3 years ago

needs https://github.com/astrogo/license/pull/5

sbinet commented 3 years ago

thanks again.