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

hgrecco / pint / 1771
91%

Build:
DEFAULT BRANCH: master
Ran 15 Jun 2020 10:52PM 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
1771

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>

3605 of 4007 relevant lines covered (89.97%)

11.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1771.1 (PKGS="python=3.7 flake8 black isort") 15 Jun 2020 10:52PM UTC 0
0.0
Travis Job 1771.1
2 1771.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:54PM UTC 0
0.0
Travis Job 1771.2
3 1771.3 (PKGS="python=3.6") 15 Jun 2020 10:52PM UTC 0
75.1
Travis Job 1771.3
4 1771.4 (PKGS="python=3.7") 15 Jun 2020 10:53PM UTC 0
75.1
Travis Job 1771.4
5 1771.5 (PKGS="python=3.8") 15 Jun 2020 10:52PM UTC 0
75.43
Travis Job 1771.5
6 1771.6 (PKGS="python=3.6 uncertainties=3.0") 15 Jun 2020 10:55PM UTC 0
88.27
Travis Job 1771.6
7 1771.7 (PKGS="python=3.7 uncertainties=3.0") 15 Jun 2020 10:55PM UTC 0
88.27
Travis Job 1771.7
8 1771.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 15 Jun 2020 10:55PM UTC 0
84.63
Travis Job 1771.8
9 1771.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 15 Jun 2020 10:56PM UTC 0
84.63
Travis Job 1771.9
10 1771.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 15 Jun 2020 10:57PM UTC 0
87.42
Travis Job 1771.10
11 1771.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 15 Jun 2020 10:57PM UTC 0
85.75
Travis Job 1771.11
12 1771.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 15 Jun 2020 10:58PM UTC 0
85.68
Travis Job 1771.12
13 1771.13 (PKGS="python=3.6 numpy uncertainties") 15 Jun 2020 10:58PM UTC 0
88.27
Travis Job 1771.13
14 1771.14 (PKGS="python=3.7 numpy uncertainties") 15 Jun 2020 10:58PM UTC 0
88.27
Travis Job 1771.14
15 1771.15 (PKGS="python=3.8 numpy uncertainties") 15 Jun 2020 11:00PM UTC 0
88.42
Travis Job 1771.15
16 1771.16 (PKGS="python=3.8 numpy uncertainties sparse xarray netCDF4") 15 Jun 2020 11:00PM UTC 0
88.52
Travis Job 1771.16
Source Files on build 1771
  • Tree
  • List 18
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1771
  • af723fac on github
  • Prev Build on master (#1769)
  • Next Build on master (#1776)
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