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

hgrecco / pint / 1868
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 17 Aug 2020 03:38AM 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
1868

push

travis-ci

web-flow
Merge #1133

1133: Change HTML repr away from LaTeX to a Sparse/Dask-like repr r=hgrecco a=jthielen

While I've never been a big fan of Pint's LaTeX repr in JupyterLab/Jupyter Notebook due to working with large arrays that would crash the renderer, I've recently been working a lot with various wrapping combinations of xarray, Pint, Dask, and Sparse, in which Pint's LaTeX repr performs particularly poorly. Even if Pint's repr were elided (#765), it would still poorly nest with the other HTML reprs.

This motivated me to implement an alternative HTML repr for Pint using a simple HTML table similar to what both Dask and Sparse use. As shown in [this demonstration notebook](https://nbviewer.jupyter.org/urls/dl.dropbox.com/s/jlgqm6s92kzvagi/pint_html_repr_demo.ipynb), this allows much better nesting of HTML reprs. A quick example image is below:

![](https://www.meteor.iastate.edu/~jthielen/Screenshot%20from%202020-07-14%2017-07-51.png)

This doesn't quite take care of [xarray's unit repr discussions](https://github.com/pydata/xarray/issues/2773) (since this only shows up when expanding the data in a dataset), but I still think it is a worthwhile improvement for the expanded view. @keewis do you have any thoughts on this particular interaction?

Marking as a WIP/draft for now to see if this is a welcome format for the HTML repr first before I dig too much into optimizing the implementation and writing tests for it.

- [x] Closes #654 (even though it was already closed in favor of #765, I think the are related but separate issues)
- [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

Tagging @nbren12, @hgrecco, @jondoesntgit, @natezb, @ipcoder, @keewis, and @TomNicholas for input based on past issues (#654, #765, and https://github.com/xarray-contrib/pint-xarray/issues/6).


Co-aut... (continued)

25 of 25 new or added lines in 2 files covered. (100.0%)

3649 of 4072 relevant lines covered (89.61%)

11.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1868.1 (PKGS="python=3.7 flake8 black isort") 17 Aug 2020 03:38AM UTC 0
0.0
Travis Job 1868.1
2 1868.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") 17 Aug 2020 03:40AM UTC 0
0.0
Travis Job 1868.2
3 1868.3 (PKGS="python=3.6") 17 Aug 2020 03:38AM UTC 0
74.76
Travis Job 1868.3
4 1868.4 (PKGS="python=3.7") 17 Aug 2020 03:38AM UTC 0
74.76
Travis Job 1868.4
5 1868.5 (PKGS="python=3.8") 17 Aug 2020 03:38AM UTC 0
75.14
Travis Job 1868.5
6 1868.6 (PKGS="python=3.6 uncertainties=3.0") 17 Aug 2020 03:40AM UTC 0
88.09
Travis Job 1868.6
7 1868.7 (PKGS="python=3.7 uncertainties=3.0") 17 Aug 2020 03:41AM UTC 0
88.09
Travis Job 1868.7
8 1868.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 17 Aug 2020 03:41AM UTC 0
84.34
Travis Job 1868.8
9 1868.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 17 Aug 2020 03:41AM UTC 0
84.34
Travis Job 1868.9
10 1868.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 17 Aug 2020 03:42AM UTC 0
87.31
Travis Job 1868.10
11 1868.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 17 Aug 2020 03:43AM UTC 0
85.37
Travis Job 1868.11
12 1868.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 17 Aug 2020 03:43AM UTC 0
85.37
Travis Job 1868.12
13 1868.13 (PKGS="python=3.6 numpy uncertainties") 17 Aug 2020 03:43AM UTC 0
88.09
Travis Job 1868.13
14 1868.14 (PKGS="python=3.7 numpy uncertainties") 17 Aug 2020 03:45AM UTC 0
88.09
Travis Job 1868.14
15 1868.15 (PKGS="python=3.8 numpy uncertainties") 17 Aug 2020 03:44AM UTC 0
88.26
Travis Job 1868.15
16 1868.16 (PKGS="python=3.8 numpy uncertainties sparse xarray netCDF4") 17 Aug 2020 03:46AM UTC 0
88.31
Travis Job 1868.16
Source Files on build 1868
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1868
  • dea623a7 on github
  • Prev Build on staging (#1859)
  • Next Build on staging (#1872)
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