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

hgrecco / pint / 1260
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 01 Nov 2019 12:32AM 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
1260

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>

29922 of 34000 relevant lines covered (88.01%)

9.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1260.1 (UNCERTAINTIES="N" PYTHON="3.3" NUMPY_VERSION=1.9.2 PANDAS=0) 01 Nov 2019 12:32AM UTC 0
86.15
Travis Job 1260.1
2 1260.2 (UNCERTAINTIES="N" PYTHON="3.4" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:32AM UTC 0
86.21
Travis Job 1260.2
3 1260.3 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:32AM UTC 0
86.21
Travis Job 1260.3
4 1260.4 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:32AM UTC 0
88.06
Travis Job 1260.4
5 1260.5 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Nov 2019 12:32AM UTC 0
86.21
Travis Job 1260.5
6 1260.6 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0) 01 Nov 2019 12:35AM UTC 0
77.88
Travis Job 1260.6
7 1260.7 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=0 PANDAS=0) 01 Nov 2019 12:34AM UTC 0
77.68
Travis Job 1260.7
8 1260.8 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:36AM UTC 0
86.15
Travis Job 1260.8
9 1260.9 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:34AM UTC 0
85.88
Travis Job 1260.9
10 1260.10 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:35AM UTC 0
87.74
Travis Job 1260.10
11 1260.11 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.14 PANDAS=0) 01 Nov 2019 12:37AM UTC 0
85.88
Travis Job 1260.11
Source Files on build 1260
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1260
  • e6ae929e on github
  • Prev Build on staging (#1256)
  • Next Build on staging (#1266)
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