Releases

Latest development release

Version: 2.14.2
Released: 2021-06-24
  • updated predefined physical constants to CODATA 2018 values.

  • switched to more permissive MIT license.

  • add feet to the available length/distance unit conversions.

2.14 (2021-06-18)

2.13 (2020-10-13)

  • Allow currency symbols in compound units (ex: $/oz or lbs/$).

2.12 (2020-07-25)

  • bug fix release.

2.11 (2020-07-19)

2.10 (2020-03-2)

  • Added negligible, tight_units, nan, and inf preferences.

  • Added negligible argument to render.

  • Added infinity_symbol attribute.

  • Changed the return values for Quantity.is_nan() and Quantity.is_infinite().

2.9 (2020-01-28)

2.8 (2020-01-08)

  • Fix nit in installer (setup.py).

2.7 (2019-12-17)

  • improve the ability of both Quantity.add() and Quantity.scale() to retain attributes.

  • added accept_binary preference.

  • support all preferences as class attributes.

  • allow radix and comma to be replaced by adding radix and comma preferences.

2.6 (2019-09-24)

  • now support Quantity arguments with Quantity.extract().

  • allow plus and minus signs to be replaced with Unicode equivalents.

2.5 (2019-01-16)

2.4 (2018-09-12)

  • fixed bug in format that resulted in several format codes ignoring width

  • follow Python convention of right-justifying numbers by default.

  • add Quantity.add() (adds a number to a quantity returning a new quantity)

  • added # alternate form of string formatting.

  • change show_si to form (argument on Quantity.set_prefs() and Quantity.render() (show_si is now obsolete, use form=’si’ instead).

  • added concept of equivalent units for unit conversion to documentation.

  • enhance UnitConversion so that it supports nonlinear conversions.

2.3 (2018-03-11)

  • enhanced Quantity.extract()

    • non-conforming lines are now ignored

    • values may be expressions

    • values need not be quantities

    • can specify a quantity name distinct from dictionary name

  • enhanced the formatting capabilities.

2.2 (2017-11-22)

2.1 (2017-07-30)

The primary focus of this release was on improving the documentation, though there are a few small feature enhancements.

  • added support for SI standard composite units

  • added support for non-breaking space as spacer

  • removed constraint in Quantity.extract() that names must be identifiers

2.0 (2017-07-15)

This is a ‘coming of age’ release where the emphasis shifts from finding the right interface to providing an interface that is stable over time. This release includes the first formal documentation and a number of new features and refinements to the API.

  • created formal documentation

  • enhanced label_fmt to accept {V}

  • allow quantity to be passed as value to Quantity

  • replaced Quantity.add_to_namespace with Quantity.extract()

  • raise NameError rather than AssertionError for unknown preferences

  • added Quantity.all_from_conv_fmt() and Quantity.all_from_si_fmt()

  • change assign_rec to support more formats

  • changed Constant() to add_constant()

  • changed the way preferences are implemented

  • changed name of preference methods: set_preferencesset_prefs, get_preferenceget_pref

  • added Quantity.prefs() (preferences context manager)

  • split label_fmt preference into two: label_fmt and label_fmt_full

  • added show_desc preference

  • allow show_label to be either ‘a’ or ‘f’ as well True or False

  • renamed strip_dp option to strip_radix

  • added number_fmt option

1.3 (2017-03-19)

  • reworked constants

  • added unit systems for physical constants

1.2 (2017-02-24)

  • allow digits after decimal point to be optional

  • support underscores in numbers

  • allow options to be monkey-patched on to Quantity objects

  • add strip_dp option

  • fix some issues in full precision mode

  • ranamed some options, arguments and methods

1.1 (2016-11-27)

  • added known_units preference.

  • added get_preference class method.

1.0 (2016-11-26)

  • initial production release.