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

hgrecco / pint / 1770
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 15 Jun 2020 10:43PM UTC
Jobs 16
Files 18
Run time 7min
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
1770

push

travis-ci

web-flow
Merge #1106

1106: Fix exponent superscripting in HTML r=hgrecco a=clarkgwillison

- [ ] Closes # (no issue filed)
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file

This PR fixes two issues with exponent rendering of decimal quantities. The first was causing units with exponents that were longer than 1 character not to superscript properly in HTML views, such as used by Jupiter, and the second was causing rendered exponents in the terminal to look less than ideal.

## HTML View
In electronics, noise density is often expressed in units of Volts per sqrt(Hertz), but prior to this change that unit rendered like so:

![image](https://user-images.githubusercontent.com/253574/83940713-0ee6d600-a79b-11ea-8467-0889b46fb311.png)

By adding brackets around the exponent in the format string, we achieve the following:

![image](https://user-images.githubusercontent.com/253574/83941036-f1b30700-a79c-11ea-870e-e457f93c919b.png)

## Terminal Pretty Print
Using the unicode dot operator instead of a plain period (.) makes decimal exponents looks slightly more natural.

Before:
```
nV/Hz⁰.⁵
```
After:
```
nV/Hz⁰⋅⁵
```

Co-authored-by: Clark Willison <clarkgwillison@gmail.com>

1 of 1 new or added line in 1 file covered. (100.0%)

3601 of 4007 relevant lines covered (89.87%)

11.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1770.1 (PKGS="python=3.7 flake8 black isort") 15 Jun 2020 10:43PM UTC 0
0.0
Travis Job 1770.1
2 1770.2 (PKGS="python=3.7 ipython matplotlib nbsphinx numpy pandas jupyter_client ipykernel python-graphviz graphviz xarray sparse dask[complete] sphinx Pygments==2.3.1 docutils==0.14 alabaster commonmark==0.8.1 recommonmark==0.5.0") 15 Jun 2020 10:45PM UTC 0
0.0
Travis Job 1770.2
3 1770.3 (PKGS="python=3.6") 15 Jun 2020 10:43PM UTC 0
75.1
Travis Job 1770.3
4 1770.4 (PKGS="python=3.7") 15 Jun 2020 10:44PM UTC 0
75.1
Travis Job 1770.4
5 1770.5 (PKGS="python=3.8") 15 Jun 2020 10:45PM UTC 0
75.43
Travis Job 1770.5
6 1770.6 (PKGS="python=3.6 uncertainties=3.0") 15 Jun 2020 10:46PM UTC 0
88.2
Travis Job 1770.6
7 1770.7 (PKGS="python=3.7 uncertainties=3.0") 15 Jun 2020 10:46PM UTC 0
88.27
Travis Job 1770.7
8 1770.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 15 Jun 2020 10:47PM UTC 0
84.56
Travis Job 1770.8
9 1770.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 15 Jun 2020 10:48PM UTC 0
84.63
Travis Job 1770.9
10 1770.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 15 Jun 2020 10:48PM UTC 0
87.42
Travis Job 1770.10
11 1770.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 15 Jun 2020 10:48PM UTC 0
85.75
Travis Job 1770.11
12 1770.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 15 Jun 2020 10:49PM UTC 0
85.75
Travis Job 1770.12
13 1770.13 (PKGS="python=3.6 numpy uncertainties") 15 Jun 2020 10:49PM UTC 0
88.27
Travis Job 1770.13
14 1770.14 (PKGS="python=3.7 numpy uncertainties") 15 Jun 2020 10:50PM UTC 0
88.27
Travis Job 1770.14
15 1770.15 (PKGS="python=3.8 numpy uncertainties") 15 Jun 2020 10:50PM UTC 0
88.42
Travis Job 1770.15
16 1770.16 (PKGS="python=3.8 numpy uncertainties sparse xarray netCDF4") 15 Jun 2020 10:50PM UTC 0
88.52
Travis Job 1770.16
Source Files on build 1770
  • Tree
  • List 18
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1770
  • af723fac on github
  • Prev Build on staging (#1768)
  • Next Build on staging (#1775)
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

© 2025 Coveralls, Inc