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

Compatibility with SIUnits.jl #2

Open
fbruetting opened this issue Dec 20, 2016 · 3 comments
Open

Compatibility with SIUnits.jl #2

fbruetting opened this issue Dec 20, 2016 · 3 comments

Comments

@fbruetting
Copy link

fbruetting commented Dec 20, 2016

Please make your code compatible with https://github.com/Keno/SIUnits.jl that would be great!

@ma-laforge
Copy link
Owner

That question was a bit vague to me until I read the issue you opened in SIUnits.

As far as I know: NumericIO is not incompatible with SIUnits in any way. I think SIUnits would simply have to make use of NumericIO.

I suppose both could be merged into a single package: NumericIO's functionality is relatively simple - it might not really deserve to be its own package... but I find convincing people to adopt my solutions can be difficult at times. As a comment: NumericIO could also probably be integrated into with https://github.com/JuliaGraphics/Showoff.jl.

@ma-laforge
Copy link
Owner

I just added a section:
https://github.com/ma-laforge/NumericIO.jl/blob/master/README.md#Sample_Applications

To get things working with SIUnits.jl, you could add something similar to the following to your ~/.juliarc.jl file:

using NumericIO
Base.show(io::IOContext{Base.Terminals.TTYTerminal}, v::Float64) = print(formatted(io, :SI, ndigits=4), v)

Again, this is not really recommended. You are changing the behaviour of some relatively low-level functions.

@briochemc
Copy link

Sorry for digging this up, but wanted to link this issue to that one on Unitful.jl: PainterQubits/Unitful.jl#240, in case someone wants to add the functionality here into Unitful.jl.

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

No branches or pull requests

3 participants