Release History

Derek Morr edited this page Feb 17, 2017 · 88 revisions

1.2.0 (Current Release)

This is the version for the current nightly build. It includes all work-in-progress since the last release version. It may include experimental and other features that are in a state of flux.

Changes merged:

  • Make AngularVelocity a derivative of Angle (PR 173)
  • Fix typo in ElectricPotential: "mircoVolts" to "microVolts" (PR 175). Note this change technically breaks API backwards compatibility.
  • Properly parse temperatures written in scientific notation (PR 183)
  • Don't parse multiple degree symbols (°) in temperature (PR 190). Note this change technically breaks backwards compatibility for data parsing.
  • Support for AcreFeet volume unit (PR 201)
  • Miscellaneous documentation and compiler warning fixes.

Thanks to Shadaj Laddad, Ian McIntosh, and Leif Wickland for their contributions.

1.1.0 (Current Release)

Jan 9th, 2017

Changes merged:

  • Add Rankine to thermal package (PR 161)
  • Add ceil, floor, and rint to Quantity base class (PR 162)
  • Add Troy mass units (grain, pennyweight, ounce, pound), Carat and Tola (PR 164)
  • Add Stone mass unit (PR 166)

1.0.0

Dec 20, 2016

  • Add [Money]/[Price] in place of [Price]*[Money] - NOTE the former still exists but is marked as deprecated.
  • Add Support for Scala 2.12.
  • Moved to the org.typelevel organization.

Thanks to Szabolcs Berecz and golem131 for their contributions.


0.6.2

May 10, 2016

  • Addition of Information and DataRate dimensions
  • Integration with Scala.js
  • Improvements to Vectors including
    • add map methods
    • add angle and polar methods for extracting the polar coordinates
    • rename to SVector with a factory methods for Double and Quantity based Vectors
    • better typing and dimensional conversions
  • Addition of Quantity.map useful for mapping over underlying value without changing the type or units
  • Addition of Time unit Nanoseconds
  • Improve conversions to and from Time and scala.concurrent.Duration to preserve units
  • Addition of Velocity unit KilometersPerSecond
  • Fixed an issue with the KilometersPerHour unit
  • Added ability to initialize Quantities from strings in exponential format
  • Addition of Area.squareRoot and Volume.cubeRoot, each returning a Length
  • Addition of Length unit Angstroms
  • Addition of Energy unit Ergs
  • Addition of Power unit ErgsPerSecond
  • Update of INR currency symbol to
  • Working prototype of generic number support (in squants.experimental in the test code)
  • Add GitHub source code links to scaladocs
  • Addition of AreaDensity units GramsPerSquareCentimeter and KilogramsPerHectare
  • Removed bogus conversion Irradiance / Power -> Area
  • Addition of SpectralIrradiance dimension
  • Addition of Irradiance unit ErgsPerSecondPerSquareCentimeter
  • Addition of support for OSGi

Thanks to Derek Morr, Rmihael, Florian Nussberger, Ajay Chandran, Gia Bảo, Josh Lemer, Dave DeCaprio and Carlos Quiroz for their contributions.

Migration Notes

With the integration of Scala.js, the library needed to be broken down into a few sub projects. This requires a slight change to how the console needs to be loaded. The correct command is now:

sbt squantsJVM/console

Vector has been renamed to SVector and now provides the factory methods for both Quantity and Double based vectors. User code that creates vectors should be modified to use this factory. The improvements to Vectors also removed the various experiments for dimensional conversion. These improvements are significant but still contain experimental API features which are subject to change.

The support for generic numbers will exist only in test code for the project until we move on to 0.7.x development. Prior to that change, a 0.6.x release will be cut that will based on the old (Double) model. The goal will be to fully implement this feature during 0.7.x development.

The new dimension Information was originally called Storage.


0.5.3

June 11, 2015

  • Enhance Quantity model to preserve the unit used in creating the value
  • Rename UnitMultiplier trait to UnitConverter, the multiplier field to conversionFactor, and set access level of all fields to protected (see Migration notes)
  • Rename QuantityCompanion to Dimension
  • Rename Quantity.valueUnit to unit
  • Rename MassFlowRate to MassFlow
  • Rename VolumeFlowRate to VolumeFlow
  • Add dimension value to Quantity
  • Improvements to TimeIntegral and TimeDerivative traits
  • Addition of TimeSquared, an intermediate non-quantity value, and SecondTimeDerivative, SecondTimeIntegral traits, all in support of second order time derivatives conversions.
  • Addition of Acceleration.analyze() method - a candidate for a generic SecondTimeDerivative feature.
  • Addition of KineticEnergy method which takes Mass and Velocity and applies the conversion (Mass, Velocity) => 1/2(Mass * Velocity * Velocity) yielding an Energy value.
  • Addition of KineticEnergy method which takes Mass and Momentum and applies the conversion (Mass, Momentum) => Momentum / (2 * Mass), yielding an Energy value.
  • Addition of Mass units Kilopounds and Megapounds
  • Addition of PowerRamp units WattsPerMinute and KilowattsPerMinutes
  • Addition of MassFlow units PoundsPerSecond, PoundsPerHour, KilopoundsPerHour and MegapoundsPerHour
  • Addition of VolumeFlow unit CubicFeetPerHour
  • Addition of Dimensionless unit Percent
  • Normalize Temperature model
  • Enhance to UnitOfMeasure model to include primaryUnit and siUnit
  • Simplify Json Serializers in experimental.test
  • Removed redundant toString methods from a few classes
  • Update Length/Area/Volume operations to be unit-sensitive
  • Rename CubicMiles to CubicUsMiles
  • Modify constants to use Exp notation where appropriate
  • Update Scala versions to 2.11.6 and 2.10.5
  • Add support for converting Quantity values to a Tuple2 and initializing a Quantity from a Tuple.
  • Addition of PressureChange dimension
  • Correction of Bars / Pascals conversion factor

Thanks to Steve Barham for his contributions.

Migration Notes

The change from UnitMultipler/multiplier -> UnitConverter/conversionFactor will only affect user code where new Quantity or UnitOfMeasure types have been created. That code should only need to be updated to reflect the new names. Code that only uses built-in quantities and units should not be affected.

Modifications to the TimeIntegral and TimeDerivative hide the previously visible change and time fields, which are generally not useful in user code, but may affect Quantity implementations. In addition the TimeIntegral./() implementations have been replaced by a standard implementation within the trait.

The ElementaryConstant value has been moved to the electro package.

The renaming of Dimension, MassFlow, VolumeFlow, and CubicUsMiles may require user code to be updated.

The update to the Quantity model - to preserve the unit used when creating, and rename valueUnit->unit - may affect some users that were accessing the valueUnit directly. Which should generally not be used directly access by user code. This will affect user code used to create new Dimensions, Quantities and Units.


0.4.2

July 6, 2014

Improvements to Market
  • Add Price.in method for directly converting a price to a different currency
  • Add Price.toString(unit) method to support formatting in a specific unit
  • Add Money.toString overload to support formatting in a different currency
  • Refactor Currencies to be objects rather than vals (no change in usage)
  • Add Currency./ method for creating exchange rates
  • Add MoneyNumeric
  • Add Comparisons for cross-currency Money values (==#, !=#, <#, <=#, >#, >=#)
Other General Improvements
  • Add Quantity.toString overload that supports standard number formatting (ie, "%3.2f")
  • Add as another approx operator
  • Add SquantifiedBigDecimal, remove SquantifiedNumeric
  • Factor out common data and behavior to new QuantityCompanion trait - implemented for all data types except Money which currently requires special handling
  • Implement String => Quantity parsing conversions returning Try[Quantity] for all existing types (see Migration Notes below)
  • Additional Units:
    • ElectricCharge: MilliampereHours, MilliampereSeconds
  • Add unapply to UnitOfMeasure trait and deprecate existing extractors in its favor
  • Json Serialization - experimental, test code only
  • Generic Quantity Value - experimental, test code only
  • Add support for Scala cross-version builds (2.10 and 2.11) with 2.11.1 as the default
Bug fixes
  • Fixed SquareInches.symbol

Migration Note

Quantity String Parsing

String parsers no longer return Either[String, Q] but will return a Try[Q] instead (where Q is the specific quantity type). For example, Mass("10 kg") will return a Try[Mass].

On failure the Try.failed will contain a QuantityStringParseException which includes the original string to be parsed. This could be used to recover using an alternative parser.

Quantity Value Model Unification

Quantity types implemented as case classes which stored the ratio components of their value (i.e. Velocity(length, time)) have been refactored to have a single underlying value.

This reduction of all types to a single underlying value has resulted in some loss of precision - reflected in the use of more "approximately equal to" tests. However, this change is a precursor to future work that will support far better precision.

Temperature and Money remain as exceptions to the prevailing model.


0.3.3

April 22, 2014

  • Add the approx method and corresponding =~ and ~= operators
  • Refactor equals implementation to support proper comparisons with null values
  • Add conversions for all Quantity types to console initialCommands.
  • Improvements to Money
  • UnitOfMeasure simplification
  • Vectors (experimental)
  • Additional Units
    • Length: Nanometers
    • Volume: Nanolitres, Microlitres, Centilitres, Decilitres, Hectolitres
    • Energy: Picojoules, Nanojoules, Microjoules, Millijoules, Kilojoules, Megajoules, Gigajoules, Terajoules
    • Money: MYR
  • Arbitrary Numeric type support for Quantity factory methods - All Quantity factory methods will accept arbitrary numeric types for initial values. In the current iteration these values will be converted to a Double within the Quantity object. Nevertheless, this is an important first step to supporting arbitrary numeric types for the underlying value as well.

Thanks to Jeremy Apthorp for his contributions.

Migration Note - The unit Milliliters has been renamed to Millilitres, which may require a change to user code. Implicit conversions are available for both spellings.


0.2.3

April 6, 2014

This is the first "pre-release" version. It includes many features

  • Over 50 Quantity Types
  • Over 180 Units of Measure
  • Support for Money, Prices, and Foreign Exchange
  • Quantity Ranges
  • Natural Language DSL