• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hgrecco / pint / 1399
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 18 Dec 2019 09:02PM UTC
Jobs 14
Files 170
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1399

push

travis-ci

web-flow
Merge #933

933: Pretty print - once more, this time with feeling r=hgrecco a=crusaderky

I found out how those ``<sup>`` tags worked before I removed them in #928.

My previous PR fixed units with underscores when you have a numpy magnitude *and broke them when you don't*. It *also* broke exponential representation. :tired_face:

New manual test:
```python
import pint
from IPython.display import display_html, display_latex

for f in ("{!s}", "{!r}", "{:P}", display_html, display_latex):
    print('-------------')
    print(f.__name__ if callable(f) else f)
    print('-------------')
    if isinstance(f, str):
        s = f
        f = lambda x: print(s.format(x))

    f(pint.Unit("kg * m^2 / s"))
    f(pint.Quantity(1, "kg * m^2 / s"))
    f(pint.Quantity([1, 2], "kg * m^2 / s"))
    f(pint.Quantity(1, "kg * m^2 / s").plus_minus(1))
    f(pint.Quantity([1, 2], "kg * m^2 / s"))
    f(pint.Unit("oil_barrel"))
    f(pint.Quantity(1, "oil_barrel"))
    f(pint.Quantity(1, "oil_barrel").plus_minus(1))
    f(pint.Quantity([1, 2], "oil_barrel"))
    f(pint.Quantity(3e20, "m"))
    f(pint.Quantity(3e-20, "m"))
    f(pint.Quantity(3e20, "m").plus_minus(1e19))
    f(pint.Quantity(3e-20, "m").plus_minus(1e-21))
```

Output:
Before #928: https://www.dropbox.com/s/tr4dplosrhzfn40/Before_928.html?dl=0
After this PR: https://www.dropbox.com/s/nfjzy45vhkne7jn/After_933.html?dl=0

**Note:** github has trouble rendering the HTML version. My first attempt was to upload the notebook to gist, but it didn't go well for this reason. You'll need to click "direct download" in the links above. Sorry for the inconvenience.

Co-authored-by: Guido Imperiale <crusaderky@gmail.com>

30574 of 35781 relevant lines covered (85.45%)

11.03 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1399.1 (PKGS="python=3.7 flake8 black isort") 18 Dec 2019 09:02PM UTC 0
Travis Job 1399.1
2 1399.2 (PKGS="python=3.6") 18 Dec 2019 09:02PM UTC 0
76.14
Travis Job 1399.2
3 1399.3 (PKGS="python=3.7") 18 Dec 2019 09:02PM UTC 0
76.14
Travis Job 1399.3
4 1399.4 (PKGS="python=3.8") 18 Dec 2019 09:02PM UTC 0
76.53
Travis Job 1399.4
5 1399.5 (PKGS="python=3.6 uncertainties=3.0") 18 Dec 2019 09:03PM UTC 0
89.13
Travis Job 1399.5
6 1399.6 (PKGS="python=3.7 uncertainties=3.0") 18 Dec 2019 09:04PM UTC 0
89.22
Travis Job 1399.6
7 1399.7 (PKGS="python=3.6 numpy=1.14") 18 Dec 2019 09:04PM UTC 0
85.07
Travis Job 1399.7
8 1399.8 (PKGS="python=3.7 numpy=1.14") 18 Dec 2019 09:04PM UTC 0
85.16
Travis Job 1399.8
9 1399.9 (PKGS="python=3.8 numpy=1.17") 18 Dec 2019 09:05PM UTC 0
87.48
Travis Job 1399.9
10 1399.10 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 18 Dec 2019 09:05PM UTC 0
87.03
Travis Job 1399.10
11 1399.11 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 18 Dec 2019 09:07PM UTC 0
87.12
Travis Job 1399.11
12 1399.12 (PKGS="python=3.6 numpy uncertainties") 18 Dec 2019 09:06PM UTC 0
89.13
Travis Job 1399.12
13 1399.13 (PKGS="python=3.7 numpy uncertainties") 18 Dec 2019 09:07PM UTC 0
89.22
Travis Job 1399.13
14 1399.14 (PKGS="python=3.8 numpy uncertainties") 18 Dec 2019 09:07PM UTC 0
89.4
Travis Job 1399.14
Source Files on build 1399
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1399
  • 4c3114c7 on github
  • Prev Build on staging (#1392)
  • Next Build on staging (#1405)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc