From a4f9e508c81c76dc0db1b09d0ad70b13b63e2f05 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Sun, 30 Jul 2023 13:59:27 +0200 Subject: [PATCH] [skip ci] Update NEWS.md (#583) --- NEWS.md | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) diff --git a/NEWS.md b/NEWS.md index 5556aac9..f9180920 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,184 @@ +# Unitful.jl changelog + +## v1.15.0 (2023-07-05) + +* ![Feature:](https://img.shields.io/badge/-feature-green) Support for [InverseFunctions.jl](https://github.com/JuliaMath/InverseFunctions.jl) is extended to all supported Julia versions. On Julia < 1.9, InverseFunctions.jl is added as a regular dependency ([#652](https://github.com/PainterQubits/Unitful.jl/pull/652)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) On Julia ≥ 1.9, [ConstructionBase.jl](https://github.com/JuliaObjects/ConstructionBase.jl) is now a weak dependency. On older versions, it is still a regular dependency. ([#658](https://github.com/PainterQubits/Unitful.jl/pull/658)). + +## v1.14.0 (2023-05-11) + +* ![Feature:](https://img.shields.io/badge/-feature-green) On Julia ≥ 1.9, [InverseFunctions.jl](https://github.com/JuliaMath/InverseFunctions.jl) can be used to get the inverse function of `Base.Fix1(ustrip, u::Units)` ([#622](https://github.com/PainterQubits/Unitful.jl/pull/622)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) `<=` now works correctly for `AbstractQuantity{T}` when `T` is a type for which `<=(x::T,y::T)` is different than `x < y || x == y` ([#646](https://github.com/PainterQubits/Unitful.jl/pull/646)). + +## v1.13.1 (2023-04-15) + +* ![Maintenance:](https://img.shields.io/badge/-maintenance-grey) Adapt test suite for Julia 1.9 ([#643](https://github.com/PainterQubits/Unitful.jl/pull/643)). + +## v1.13.0 (2023-04-11) + +* ![Feature:](https://img.shields.io/badge/-feature-green) `Base.sleep` now accepts quantities of time as argument ([#628](https://github.com/PainterQubits/Unitful.jl/pull/628)). +* ![Feature:](https://img.shields.io/badge/-feature-green) `Base.copysign` and `Base.flipsign` can now be called with a plain number as first argument and a quantity as second argument ([#612](https://github.com/PainterQubits/Unitful.jl/pull/612)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) All known method ambiguities of the package are resolved ([#606](https://github.com/PainterQubits/Unitful.jl/pull/606), [#626](https://github.com/PainterQubits/Unitful.jl/pull/626)). +* The package now has a logo. It was created by Leandro Martínez and shows the International Prototype of the Kilogram ([#567](https://github.com/PainterQubits/Unitful.jl/pull/567), [#634](https://github.com/PainterQubits/Unitful.jl/pull/634)). + +## v1.12.4 (2023-02-27) + +* ![Maintenance:](https://img.shields.io/badge/-maintenance-grey) `@fastmath` with quantities now uses functions from `Base.FastMath` instead of intrinsic functions, because the latter may be removed at any time ([#617](https://github.com/PainterQubits/Unitful.jl/pull/617)). + +## v1.12.3 (2023-02-10) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Multiplication is no longer assumed to be commutative, which is wrong for, e.g., quaternions ([#608](https://github.com/PainterQubits/Unitful.jl/pull/608)). +* ![Maintenance:](https://img.shields.io/badge/-maintenance-grey) Adapt the documentation on extending Unitful for Julia ≥ 1.9 ([#600](https://github.com/PainterQubits/Unitful.jl/pull/600)). + +## v1.12.2 (2022-11-30) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Broadcasting `upreferred` over floating-point ranges now works again ([#577](https://github.com/PainterQubits/Unitful.jl/pull/577)). + +## v1.12.1 (2022-11-18) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Fixed `istriu`/`istril` for affine quantities ([#572](https://github.com/PainterQubits/Unitful.jl/pull/572)). + +## v1.12.0 (2022-09-17) + +* ![Feature:](https://img.shields.io/badge/-feature-green) Dimensionless quantities now support `cispi`, `sincospi`, and `modf` ([#533](https://github.com/PainterQubits/Unitful.jl/pull/533), [#539](https://github.com/PainterQubits/Unitful.jl/pull/539)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Ranges of affine quantities are now printed correctly ([#551](https://github.com/PainterQubits/Unitful.jl/pull/551)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) The non-existent functions `convertr` and `convertrp` are no longer exported ([#530](https://github.com/PainterQubits/Unitful.jl/pull/530)). + +## v1.11.0 (2022-02-10) + +* ![Feature:](https://img.shields.io/badge/-feature-green) `Base.zero` now works on heterogeneous arrays of quantities, e.g., `zero([1m, 1s]) == [0m, 0s]` ([#533](https://github.com/PainterQubits/Unitful.jl/pull/533), [#516](https://github.com/PainterQubits/Unitful.jl/pull/516)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) `StepRangeLen`s of complex-valued quantities are now printed correctly ([#513](https://github.com/PainterQubits/Unitful.jl/pull/513)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Method ambiguities of `Base._range` are resolved ([#514](https://github.com/PainterQubits/Unitful.jl/pull/514)). +* ![Maintenance:](https://img.shields.io/badge/-maintenance-grey) Updated `range` implementation for Julia ≥ 1.8 ([#514](https://github.com/PainterQubits/Unitful.jl/pull/514)). + +## v1.10.1 (2022-01-03) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Fixed `isapprox` for arrays of complex-valued quantities ([#468](https://github.com/PainterQubits/Unitful.jl/pull/468)). + +## v1.10.0 (2021-12-27) + +* ![Feature:](https://img.shields.io/badge/-feature-green) Dimensions and units can now be documented by adding a docstring before the `@dimension`, `@refunit`, `@unit`, and `@affineunit` macro calls. The `@dimension`, `@derived_dimension`, `@refunit`, and `@unit` macros have an optional boolean argument `autodocs` to add autogenerated docstrings to some objects generated by these macros. All dimensions, units and constants defined in this package now have docstrings ([#476](https://github.com/PainterQubits/Unitful.jl/pull/476)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Calling `preferunits` with non-pure units (e.g., `preferunits(C/ms)`) no longer results in wrong behavior ([#478](https://github.com/PainterQubits/Unitful.jl/pull/478)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Fixed some invalidations to improve compile times ([#509](https://github.com/PainterQubits/Unitful.jl/pull/509)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Broadcasting `ustrip`, `upreferred`, and `*` over a range now returns another range instead of a `Vector` ([#501](https://github.com/PainterQubits/Unitful.jl/pull/501), [#503](https://github.com/PainterQubits/Unitful.jl/pull/503)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) `LinearAlgebra.norm` now returns a floating-point quantity, which matches the behavior for `Base` numbers ([#500](https://github.com/PainterQubits/Unitful.jl/pull/500)). + +## v1.9.2 (2021-11-12) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) The functions `Unitful.cos_fast`, `Unitful.sin_fast`, and `Unitful.tan_fast` are removed. Due to an implementation error, they always threw a `MethodError`, so removing them is not breaking. This fixes a warning during precompilation ([#497](https://github.com/PainterQubits/Unitful.jl/pull/497)). + +## v1.9.1 (2021-10-27) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Multiplying a `StepRangeLen` by `Units` now preserves the floating-point precision ([#485](https://github.com/PainterQubits/Unitful.jl/pull/485)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Make `^(::AbstractQuantity, ::Rational)` inferrable on Julia ≥ 1.8 ([#487](https://github.com/PainterQubits/Unitful.jl/pull/487)). +* ![Maintenance:](https://img.shields.io/badge/-maintenance-grey) Updated multiplication of range and quantity for Julia ≥ 1.8 compatibility ([#489](https://github.com/PainterQubits/Unitful.jl/pull/489), [#495](https://github.com/PainterQubits/Unitful.jl/pull/495)). + +## v1.9.0 (2021-07-16) + +* ![Feature:](https://img.shields.io/badge/-feature-green) `deg2rad` and `rad2deg` can now be used to convert between `°` and `rad` ([#459](https://github.com/PainterQubits/Unitful.jl/pull/459)). + +## v1.8.0 (2021-05-31) + +* ![Feature:](https://img.shields.io/badge/-feature-green) The `IOContext` property `:fancy_exponent` can be used to control the printing of exponents in units (i.e., `m²` or `m^2`). Previously, this could only be done by setting the environment variable `UNITFUL_FANCY_EXPONENTS`. The `:fancy_exponent` property overrides the environment variable ([#446](https://github.com/PainterQubits/Unitful.jl/pull/446)). + +## v1.7.0 (2021-04-02) + +* ![Feature:](https://img.shields.io/badge/-feature-green) The functions `dimension`, `unit`, `absoluteunit`, `upreferred`, and `numtype` now support `AbstractQuantity` (instead of just `Quantity`) arguments ([#431](https://github.com/PainterQubits/Unitful.jl/pull/431)). +* ![Feature:](https://img.shields.io/badge/-feature-green) Support for conversion between `Unitful.Time` and `Dates.FixedPeriod` types is added ([#331](https://github.com/PainterQubits/Unitful.jl/pull/331)). + +## v1.6.0 (2021-02-14) + +* ![Feature:](https://img.shields.io/badge/-feature-green) Support for the `Base.unordered` function is added ([#406](https://github.com/PainterQubits/Unitful.jl/pull/406)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The CGS units Gauss (`Gauss`), Oersted (`Oe`), and Maxwell (`Mx`) are added ([#397](https://github.com/PainterQubits/Unitful.jl/pull/397)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Removed a wrong use of `@eval` that broke precompilation ([#417](https://github.com/PainterQubits/Unitful.jl/pull/417)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) The traits `Base.ArithmeticStyle` and `Base.OrderStyle` are now implemented correctly to support number types that are not defined in `Base` ([#407](https://github.com/PainterQubits/Unitful.jl/pull/407)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) `==` and `isequal` now work correctly for `Gain`s and `Level`s with bignums ([#404](https://github.com/PainterQubits/Unitful.jl/pull/404)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) `range(start; step, length)` now always creates a functioning range when `start` and `step` have different units ([#411](https://github.com/PainterQubits/Unitful.jl/pull/411)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) It is no longer possible to create a `Level` with non-real value or reference quantity ([#400](https://github.com/PainterQubits/Unitful.jl/pull/400), [#421](https://github.com/PainterQubits/Unitful.jl/pull/421)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Macro hygiene is improved ([#390](https://github.com/PainterQubits/Unitful.jl/pull/390)). + +## v1.5.0 (2020-10-21) + +* ![Feature:](https://img.shields.io/badge/-feature-green) Dimensionless quantities now support inverse and hyperbolic trig functions ([#387](https://github.com/PainterQubits/Unitful.jl/pull/387)). + +## v1.4.1 (2020-09-17) + +* ![Maintenance:](https://img.shields.io/badge/-maintenance-grey) Adapt test suite to Julia ≥ 1.6 type parameter printing ([#380](https://github.com/PainterQubits/Unitful.jl/pull/380)). + +## v1.4.0 (2020-08-11) + +* ![Feature:](https://img.shields.io/badge/-feature-green) It is now possible to divide an array by units ([#369](https://github.com/PainterQubits/Unitful.jl/pull/369)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Complex and mixed quantities are now printed with brackets ([#366](https://github.com/PainterQubits/Unitful.jl/pull/366)). + +## v1.3.0 (2020-06-26) + +* ![Feature:](https://img.shields.io/badge/-feature-green) `isless` is now defined for logarithmic quantities ([#315](https://github.com/PainterQubits/Unitful.jl/pull/315)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Calling `div`, `rem`, etc. with affine quantities now errors ([#354](https://github.com/PainterQubits/Unitful.jl/pull/354)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Custom printing of types was removed ([#322](https://github.com/PainterQubits/Unitful.jl/pull/322)). + +## v1.2.1 (2020-05-26) + +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Fix an error when converting units with fractional power ([#335](https://github.com/PainterQubits/Unitful.jl/pull/335)). + +## v1.2.0 (2020-05-10) + +* ![Feature:](https://img.shields.io/badge/-feature-green) The unit `Year` now allows SI prefixes ([#320](https://github.com/PainterQubits/Unitful.jl/pull/320)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Unit conversions can now return integer-valued quantities if the conversion factor is whole ([#323](https://github.com/PainterQubits/Unitful.jl/pull/323)). + +## v1.1.0 (2020-04-09) + +* ![Feature:](https://img.shields.io/badge/-feature-green) `div`, `fld`, `cld` now allow arguments of different dimensions as long as one of them is a plain number (i.e., not an `AbstractQuantity`), e.g., `div(10m, 3) == 3m` and `cld(10, 3m) == 4/m` ([#317](https://github.com/PainterQubits/Unitful.jl/pull/317)). +* ![Feature:](https://img.shields.io/badge/-feature-green) Unicode superscript can now be used to to display powers in units and dimensions (e.g., `m²` instead of `m^2`). The `UNITFUL_FANCY_EXPONENTS` environment variable can be used to control whether unicode powers are used or not ([#297](https://github.com/PainterQubits/Unitful.jl/pull/297)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The unit `Year` (`yr`) is defined, equal to 365.25 days ([#288](https://github.com/PainterQubits/Unitful.jl/pull/288)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) `round` with the `digits`/`sigdigits` keyword now works correctly for quantities that are not based on floating-point numbers. It returns a float-based quantity in those cases ([#308](https://github.com/PainterQubits/Unitful.jl/pull/308)). + +## v1.0.0 (2020-01-27) + +* ![Feature:](https://img.shields.io/badge/-feature-green) The `uparse` function can be used to parse units and quantities from a string ([#298](https://github.com/PainterQubits/Unitful.jl/pull/298)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The constructors `Float16`, `Float32`, `Float64`, and `BigFloat` can be used to convert a quantity to one based on the specified floating-point type, e.g., `Float64(1m) === 1.0m`. The `float` function can be used to convert a quantity to an appropriate floating-point type ([#296](https://github.com/PainterQubits/Unitful.jl/pull/296)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The unit `Pertenthousand` (`‱`) is added ([#294](https://github.com/PainterQubits/Unitful.jl/pull/294)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Calling the two-argument `atan` with quantities that have the same numeric type and dimension but different units no longer errors ([#293](https://github.com/PainterQubits/Unitful.jl/pull/293)). + +## v0.18.0 (2019-11-27) + +* ![Feature:](https://img.shields.io/badge/-feature-green) `Quantity` types now support the `constructorof` function from the [ConstructionBase.jl](https://github.com/JuliaObjects/ConstructionBase.jl) package ([#280](https://github.com/PainterQubits/Unitful.jl/pull/280)). +* ![Feature:](https://img.shields.io/badge/-feature-green) Using units as conversion functions now supports `missing` ([#278](https://github.com/PainterQubits/Unitful.jl/pull/278)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The unit `Angstrom` (`Å` or `angstrom`) is added ([#271](https://github.com/PainterQubits/Unitful.jl/pull/271)). + +## v0.17.0 (2019-09-08) + +* ![BREAKING:](https://img.shields.io/badge/-BREAKING-red) The unit `rps` (revolutions per second) is now equal to `2π*rad/s` instead of `1/s` and the unit `rpm` (revolutions per minute) is now equal to `2π*rad/minute` instead of `1/minute` ([#268](https://github.com/PainterQubits/Unitful.jl/pull/268)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The derived dimensions `MassFlow` (`𝐌/𝐓`), `MolarFlow` (`𝐍/𝐓`), and `VolumeFlow` (`𝐋^3/𝐓`) are added ([#269](https://github.com/PainterQubits/Unitful.jl/pull/269)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The dimensions power density (`𝐌 𝐋^-1 𝐓^-3`) and work (`𝐋^2 𝐌 𝐓^-2`) are marked as power-like for use with logarithmic quantities ([#267](https://github.com/PainterQubits/Unitful.jl/pull/267)). +* ![Feature:](https://img.shields.io/badge/-feature-green) `zero(::Type{<:AbstractQuantity{T,D}}) where {T,D}` can be used to get an additive identity with numeric type `T` and dimension `D` ([#266](https://github.com/PainterQubits/Unitful.jl/pull/266)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The unit `Molar` (`M`) is added ([#258](https://github.com/PainterQubits/Unitful.jl/pull/258)). +* ![Feature:](https://img.shields.io/badge/-feature-green) `Unitful.register` now extends `Unitful.basefactors`, so packages that define units don’t have to do it themselves ([#251](https://github.com/PainterQubits/Unitful.jl/pull/251)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Ranges of quantities are now printed in a more concise way ([#256](https://github.com/PainterQubits/Unitful.jl/pull/256)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Angular degrees are now printed without a space between the number and unit, in compliance with the SI standard ([#255](https://github.com/PainterQubits/Unitful.jl/pull/255)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) `zero` now errors if the dimension of its argument is unspecified ([#266](https://github.com/PainterQubits/Unitful.jl/pull/266)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) `Unitful.promote_to_derived` works again ([#252](https://github.com/PainterQubits/Unitful.jl/pull/252)). + +## v0.16.0 (2019-07-01) + +* ![BREAKING:](https://img.shields.io/badge/-BREAKING-red) The physical constants are updated to the CODATA 2018 recommended values ([#235](https://github.com/PainterQubits/Unitful.jl/pull/235)). +* ![Feature:](https://img.shields.io/badge/-feature-green) On Julia v1, the rounding functions `round`, `ceil`, `floor`, and `trunc` now accept all keyword arguments that are supported for plain numbers. In addition, the first argument to these functions can be a unit instead of a type ([#246](https://github.com/PainterQubits/Unitful.jl/pull/246), [#249](https://github.com/PainterQubits/Unitful.jl/pull/249), [#250](https://github.com/PainterQubits/Unitful.jl/pull/250)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The functions `Base.complex`, `Base.reim`, and `Base.widen` can now be called with unitful quantities ([#227](https://github.com/PainterQubits/Unitful.jl/pull/227)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The function `upreferred` now supports `missing` ([#224](https://github.com/PainterQubits/Unitful.jl/pull/224)). +* ![Feature:](https://img.shields.io/badge/-feature-green) Two-argument and three-argument `ustrip` now support dimensionless quantities and `missing` ([#212](https://github.com/PainterQubits/Unitful.jl/pull/212)). +* ![Enhancement:](https://img.shields.io/badge/-enhancement-blue) Better support for number types that customize their `MIME"text/plain"` printing ([#213](https://github.com/PainterQubits/Unitful.jl/pull/213)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Ranges which use `Base.TwicePrecision` internally now work correctly ([#245](https://github.com/PainterQubits/Unitful.jl/pull/245)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Fixed some issues around use of `@generated` functions that could lead to world-age errors or wrong behavior ([#233](https://github.com/PainterQubits/Unitful.jl/pull/233), [#243](https://github.com/PainterQubits/Unitful.jl/pull/243)). + +## v0.15.0 (2019-03-05) + +* ![Feature:](https://img.shields.io/badge/-feature-green) The functions `uconvert`, `ustrip`, `unit`, and `dimension` as well as arithmetic with units now support `missing` ([#208](https://github.com/PainterQubits/Unitful.jl/pull/208)). +* ![Feature:](https://img.shields.io/badge/-feature-green) Two-argument `ustrip(unit, x)` and three-argument `ustrip(T, unit, x)` methods are added ([#205](https://github.com/PainterQubits/Unitful.jl/pull/205)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The `AbstractQuantity{T,D,U}` type is defined to support defining quantity types other than `Quantity{T,D,U}` ([#204](https://github.com/PainterQubits/Unitful.jl/pull/204)). +* ![Feature:](https://img.shields.io/badge/-feature-green) The derived dimensions `Molarity` (`𝐍/𝐋^3`) and `Molality` (`𝐍/𝐌`) are added ([#198](https://github.com/PainterQubits/Unitful.jl/pull/198)). +* ![Bugfix:](https://img.shields.io/badge/-bugfix-purple) Multiplying a range by units now works correctly ([#206](https://github.com/PainterQubits/Unitful.jl/pull/206)). + +## Older changes + - v0.14.0 - Support for `digits` kwarg (#196). - Try to support precompilation with `u_str` macro (#201).