Skip to content

Commit

Permalink
Define one(::Type{Measurement{T}}) to return one(T) (#135)
Browse files Browse the repository at this point in the history
* Define `one(::Type{Measurement{T}})` to return `one(T)`

* Bring back `Unitful` + `QuadGK` test

* Do not require `@inferred` on operations which can't be inferred anymore

* Tighten back tolerance of QuadGK operations by requesting a specific `atol`

* Update Manifest of benchmarks to get newer QuadGK version

* Update `NEWS.md`
  • Loading branch information
giordano committed Mar 22, 2023
1 parent 4ffcdbf commit d1ac981
Show file tree
Hide file tree
Showing 8 changed files with 307 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '^1.6.0-0'
version: '1.8.5'
- name: Cache artifacts
uses: actions/cache@v2
with:
Expand Down
16 changes: 16 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# History of Measurements.jl

## v2.9.0 (2023-03-22)

### New features

* New methods `value(::Missing)` and `uncertainty(::Missing)`
([#127](https://github.com/JuliaPhysics/Measurements.jl/pull/127),
[#128](https://github.com/JuliaPhysics/Measurements.jl/pull/128)).
* `one(::Measurement{T})` now returns `one(T)`, instead of an instance of
`Measurement{T}`
([#134](https://github.com/JuliaPhysics/Measurements.jl/issues/134),
[#135](https://github.com/JuliaPhysics/Measurements.jl/pull/135)). This
change should not breaking (and hence the major version was not increased),
unless you were relying on the previous incorrect return type of
`one(::Measurement{T})`, which did not follow the precise semantic of the
`one` function.

## v2.8.0 (2022-09-01)

### New features
Expand Down
Loading

2 comments on commit d1ac981

@giordano
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/80111

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.9.0 -m "<description of version>" d1ac9817cbfb8d39603b5b6845e1488ed7743cab
git push origin v2.9.0

Please sign in to comment.