Pint 0.5: now with uncertainties!

Today I have released version 0.5 of Pint, a Python units library.

Pint is Python package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. It allows arithmetic operations between them and conversions from and to different units.

It provides a comprehensive and extensive list of physical units, prefixes and constants defined in a standalone text file. The registry can parse prefixed and pluralized forms of units resulting in a much shorter and maintainable unit definition list.

It also provides great NumPy integration, with implicit unit conversion and an emphasis on correctness.

What's new

Pint 0.5 brings a long awaited feature: the integration with uncertainties, a great package by Eric Lebigot. Pint Measurement Class is now built using uncertainties ufloat class. The integration will be complete in 0.6 when we add support for all math operations.

By the way, the integration of uncertainties in Pint is a really nice example of collaboration between open source projects. From an issue that Eric posted on the tracker, we worked out together modifications to both projects that made the integration easier and more productive.

Pint 0.5 also brings performance improvements. Some operations are much faster due to internal caching of common unit conversions. Importing the package is faster too as the default registry is only loaded when needed.
There are no backwards incompatible changes in this version. But we have added the __call__ method to UnitRegistry. We suggest that you use it instead of __getitem__ which will be deprecated in future versions.

A few internal things have been improved. Better documentation of the code. Better logging, warnings and error messages. More configurations to testing configuration to our continous integration at travis. The test coverage, which was quit good since the begining of the project (~ 80%), is now even better (93%). And we are keeping an eye on this using coveralls.

There a lot of other improvements, you can look at the full list of changes.

Thanks to the people that contributed bug reports, suggestions and patches since 0.4. In particular to: Eduard Bopp, Felix Hummel, Jim Turner, Joel B. Mohler, Kenneth D. Mankof, Luke Campbell, Peter Grayson, Sundar Raman, Tom Ritchford and coutinho. (Please let me know if I am forgetting someone!)

Interested? Install it and give it a try!

Submit your bug reports, comments and suggestions in the Issue Tracker. There are already some ideas for version 0.6. Check them out, comment and add yours.

Read the docs:
or fork the code:


Popular posts from this blog

Communicating with instruments using PyVISA but without NI-VISA

Running Python code in a LaTeX document

Lantz 0.3 is out: better PyVISA support, leaner drivers, great GUI building blocks