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

hgrecco / pint / 1869
91%

Build:
DEFAULT BRANCH: master
Ran 17 Aug 2020 03:47AM 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
1869

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)

3649 of 4072 relevant lines covered (89.61%)

11.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1869.1 (PKGS="python=3.7 flake8 black isort") 17 Aug 2020 03:47AM UTC 0
0.0
Travis Job 1869.1
2 1869.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:49AM UTC 0
0.0
Travis Job 1869.2
3 1869.3 (PKGS="python=3.6") 17 Aug 2020 03:48AM UTC 0
74.69
Travis Job 1869.3
4 1869.4 (PKGS="python=3.7") 17 Aug 2020 03:49AM UTC 0
74.76
Travis Job 1869.4
5 1869.5 (PKGS="python=3.8") 17 Aug 2020 03:48AM UTC 0
75.14
Travis Job 1869.5
6 1869.6 (PKGS="python=3.6 uncertainties=3.0") 17 Aug 2020 03:50AM UTC 0
88.09
Travis Job 1869.6
7 1869.7 (PKGS="python=3.7 uncertainties=3.0") 17 Aug 2020 03:50AM UTC 0
88.09
Travis Job 1869.7
8 1869.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 17 Aug 2020 03:51AM UTC 0
84.34
Travis Job 1869.8
9 1869.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 17 Aug 2020 03:52AM UTC 0
84.34
Travis Job 1869.9
10 1869.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 17 Aug 2020 03:51AM UTC 0
87.31
Travis Job 1869.10
11 1869.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 17 Aug 2020 03:53AM UTC 0
85.37
Travis Job 1869.11
12 1869.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 17 Aug 2020 03:53AM UTC 0
85.29
Travis Job 1869.12
13 1869.13 (PKGS="python=3.6 numpy uncertainties") 17 Aug 2020 03:53AM UTC 0
88.09
Travis Job 1869.13
14 1869.14 (PKGS="python=3.7 numpy uncertainties") 17 Aug 2020 03:54AM UTC 0
88.09
Travis Job 1869.14
15 1869.15 (PKGS="python=3.8 numpy uncertainties") 17 Aug 2020 03:54AM UTC 0
88.19
Travis Job 1869.15
16 1869.16 (PKGS="python=3.8 numpy uncertainties sparse xarray netCDF4") 17 Aug 2020 03:55AM UTC 0
88.31
Travis Job 1869.16
Source Files on build 1869
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1869
  • dea623a7 on github
  • Prev Build on master (#1860)
  • Next Build on master (#1873)
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