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

Fix conversion of fractional units #335

Merged
merged 6 commits into from
May 26, 2020
Merged

Conversation

briochemc
Copy link
Contributor

@briochemc briochemc commented May 16, 2020

Fix #327

@briochemc briochemc mentioned this pull request May 16, 2020
@codecov-io
Copy link

Codecov Report

Merging #335 into master will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
+ Coverage   80.23%   80.32%   +0.08%     
==========================================
  Files          15       15              
  Lines        1174     1174              
==========================================
+ Hits          942      943       +1     
+ Misses        232      231       -1     
Impacted Files Coverage Δ
src/conversion.jl 83.87% <100.00%> (ø)
src/units.jl 85.61% <0.00%> (+0.68%) ⬆️

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 e97233b...ecd3d42. Read the comment docs.

@briochemc
Copy link
Contributor Author

briochemc commented May 16, 2020

@ajkeller34 could you check this?

BTW, I think these comments in line 14–15 that say:

    # fact1 is what would need to be multiplied to get to base SI units
    # fact2 is what would be multiplied to get from the result to base SI units

should be updated to refer to inex1 and inex2 instead? (But I'm not sure, so I did not suggest a correction for that.)

Copy link
Collaborator

@giordano giordano left a comment

Choose a reason for hiding this comment

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

Ok, I think this is good, let's see how it goes

src/conversion.jl Outdated Show resolved Hide resolved
@giordano giordano changed the title Update conversion.jl Fix conversion of fractional units May 26, 2020
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2020

Codecov Report

Merging #335 into master will decrease coverage by 0.51%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
- Coverage   80.23%   79.72%   -0.52%     
==========================================
  Files          15       15              
  Lines        1174     1174              
==========================================
- Hits          942      936       -6     
- Misses        232      238       +6     
Impacted Files Coverage Δ
src/conversion.jl 83.87% <100.00%> (ø)
src/types.jl 91.48% <0.00%> (-2.13%) ⬇️
src/units.jl 82.87% <0.00%> (-2.06%) ⬇️
src/logarithm.jl 62.55% <0.00%> (-0.86%) ⬇️

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 e97233b...feb7ab2. Read the comment docs.

@giordano giordano merged commit 65bdaf8 into PainterQubits:master May 26, 2020
briochemc added a commit to briochemc/Unitful.jl that referenced this pull request Aug 10, 2020
* upstream/master: (22 commits)
  Fix printing of complex and logarithmic quantities (PainterQubits#366)
  Remove @_doctables (PainterQubits#363)
  Fix a doctest (PainterQubits#365)
  Release v1.3.0
  Add page headers to documentation (PainterQubits#361)
  Fix link to documentation in README.md: latest -> dev. (PainterQubits#360)
  Properly document Quantity constructor (PainterQubits#357)
  Delete show(::IO, ::Type) methods. Closes PainterQubits#321 (PainterQubits#322)
  Throw error for div etc. with affine quantities (PainterQubits#354)
  Fixes for the documentation (PainterQubits#356)
  Enable Travis on macOS (PainterQubits#355)
  Switch to a more standard Documenter setup (PainterQubits#353)
  Update repo URL (PainterQubits#352)
  Delete duplicate @affineunit docstring in the documentation (PainterQubits#349)
  Fix some doctests (PainterQubits#345)
  Add AbstractQuantity docstring to docs (PainterQubits#351)
  Provide Base.isless() for LogScaled values (PainterQubits#315)
  Small fixes to documentation (PainterQubits#341)
  Add CompatHelper, reduce frequency of TagBot to once per day (PainterQubits#337)
  Fix conversion of fractional units (PainterQubits#335)
  ...
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.

denominator error when converting fractional units
4 participants