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

Significant digits REPL representation #30

Merged

Conversation

BeastyBlacksmith
Copy link
Contributor

shows only significant digits of Measurement objects in the REPL.
Relates to #5 as a proof of concept.

shows only significant digits of `Measurement` objects in the REPL.
Relates to JuliaPhysics#5 as a proof of concept.
@codecov-io
Copy link

codecov-io commented Dec 19, 2018

Codecov Report

Merging #30 into master will decrease coverage by 0.28%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
- Coverage   97.27%   96.98%   -0.29%     
==========================================
  Files           8        8              
  Lines         513      531      +18     
==========================================
+ Hits          499      515      +16     
- Misses         14       16       +2
Impacted Files Coverage Δ
src/Measurements.jl 78.94% <88.23%> (+4.58%) ⬆️

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 0a44e6f...f6615ad. Read the comment docs.

@@ -101,6 +101,17 @@ measurement
# Type representation
Base.show(io::IO, measure::Measurement) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this method (or the method you defined can use the signature of this one)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mine is already using this in the else branch, since print will call show

@giordano
Copy link
Member

Thanks for addressing this, I was thinking about something like this.

Please, add some tests to the "Test representation" @testset.

@BeastyBlacksmith
Copy link
Contributor Author

still need to implement it for Complex

@BeastyBlacksmith
Copy link
Contributor Author

That should be all?

@giordano giordano merged commit 3e3263b into JuliaPhysics:master Dec 23, 2018
@giordano
Copy link
Member

Merged, thanks!

@BeastyBlacksmith BeastyBlacksmith deleted the BeastyBlacksmith-sig-REPL branch January 3, 2019 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants