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

hgrecco / pint / 1261
91%

Build:
DEFAULT BRANCH: master
Ran 01 Nov 2019 12:40AM UTC
Jobs 11
Files 160
Run time 5min
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
1261

push

travis-ci

web-flow
Merge #880

880: Global Quantity, Unit, and Measurement r=hgrecco a=crusaderky

This PR addresses several issues I found myself facing when using pint in my own projects.

- I found myself systematically needing to reference UnitRegistry, Quantity, and Unit in sphinx docstrings and typing annotations.
- When prototyping and writing snippet code, I got frequently annoyed by having to typing ``ureg = pint.UnitRegistry()`` every time, even when I was perfectly content with defaults_en.txt (as most novice users will).
-  I found myself needing to access pint._APP_REGISTRY when creating a Quantity in a dask.distributed function.

Changes:
- Define global objects ``pint.Quantity``, ``pint.Unit``, and ``pint.Measurement``. They can be used directly, e.g. ``pint.Quantity(1, "kg")``. They use the global application registry.
- Fix bug where Measurement objects would be accidentally upcast to Quantity upon pickling
- All Exception classes are now accessible from the top-level module (also in intersphinx)
- New function ``pint.get_application_registry``
- Documentation for using ``pint.set_application_registry`` in one's application
- intersphinx users can now reference ``:class:`pint.UnitRegistry` `` instead of the internal implementation module ``:class:`pint.registry.UnitRegistry` ``
- Fixed a wealth of sphinx errors (not all)
- Unit tests for pickling/unpickling custom units through the global registry

Co-authored-by: Guido Imperiale <guido.imperiale@amphorainc.com>
Co-authored-by: Guido Imperiale <crusaderky@gmail.com>
Co-authored-by: Unknown <crusaderky@gmail.com>

84 of 84 new or added lines in 7 files covered. (100.0%)

30067 of 34000 relevant lines covered (88.43%)

9.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1261.1 (UNCERTAINTIES="N" PYTHON="3.3" NUMPY_VERSION=1.9.2 PANDAS=0) 01 Nov 2019 12:40AM UTC 0
86.15
Travis Job 1261.1
2 1261.2 (UNCERTAINTIES="N" PYTHON="3.4" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:40AM UTC 0
86.12
Travis Job 1261.2
3 1261.3 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:40AM UTC 0
86.12
Travis Job 1261.3
4 1261.4 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:40AM UTC 0
88.06
Travis Job 1261.4
5 1261.5 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:40AM UTC 0
86.21
Travis Job 1261.5
6 1261.6 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0) 01 Nov 2019 12:43AM UTC 0
77.88
Travis Job 1261.6
7 1261.7 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=0 PANDAS=0) 01 Nov 2019 12:42AM UTC 0
77.68
Travis Job 1261.7
8 1261.8 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:43AM UTC 0
86.15
Travis Job 1261.8
9 1261.9 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:43AM UTC 0
85.88
Travis Job 1261.9
10 1261.10 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:43AM UTC 0
87.65
Travis Job 1261.10
11 1261.11 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:45AM UTC 0
85.88
Travis Job 1261.11
Source Files on build 1261
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1261
  • e6ae929e on github
  • Prev Build on master (#1257)
  • Next Build on master (#1267)
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