Skip to content

[RFC] Backports for v0.8.5 #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
652fac3
Backport partially #189
kimikage Apr 30, 2024
d8ac448
Improve `throw_converterror` (#205)
kimikage Jul 24, 2020
efa40a6
Systemize fixed point types to be tested (#208)
kimikage Aug 6, 2020
c1a642f
Backport partially #207
kimikage Apr 30, 2024
a5e7782
Add workaround for `clamp` with poor promotion
kimikage May 1, 2024
3e5b858
Use sampler-based Random API (#206)
kimikage Aug 8, 2020
40f7177
Backport partially "Improve overflow error message (#214)"
kimikage Aug 15, 2020
83c63cc
Avoid inconsistent behavior of `unsafe_trunc` for `BigFloat` (#212)
kimikage Aug 15, 2020
e3b58a1
Change test targets of `Fixed` (#218)
kimikage Aug 19, 2020
25d4411
Backport partially "Optimize multiplication for Normed (#213)"
kimikage Aug 24, 2020
4bc8cfc
Backport partially "Specialize multiplication for `Fixed` (#220)"
kimikage Aug 25, 2020
400456c
Fix `% Normed{UInt32}` on ARM and Improve `NaN % FixedPoint` (#223)
kimikage Aug 29, 2020
53ca2d8
Backport partially "Commonize test codes (#224)"
kimikage Aug 31, 2020
c845201
Backport partially #222
kimikage Aug 31, 2020
927afc0
Backport partially "Add checked, wrapping and saturating arithmetic f…
kimikage Sep 11, 2020
9e5c68e
add doctest in unittest (#229)
johnnychen94 Sep 19, 2020
b126c1b
Remove old iterator methods (#231)
kimikage Sep 20, 2020
de7faee
Backport partially #235
kimikage Apr 30, 2024
3d371dc
Use GitHub Actions for unit testing on Arm arch. (#238)
kimikage Dec 19, 2020
8bdec42
Improve generation of typealiases (#233)
kimikage Dec 19, 2020
55a7232
Backport partially #243
kimikage May 1, 2024
26e9a34
Avoid selecting pre-release in ARM CI (#244)
kimikage Mar 16, 2021
115b274
Work around rounding errors in nightly test (#248)
kimikage Apr 19, 2021
3149fb6
fix tests on 1.7 (#253)
Aug 2, 2021
8c9770e
Remove assertions in "src/precompile.jl" (#254)
kimikage Aug 3, 2021
a936502
CI: test Julia 1.6 and update TagBot permission (#257)
johnnychen94 Jul 7, 2022
37d724e
CI: rename julia-runtest branch (#263)
timholy Mar 16, 2023
53f2a3a
Merge pull request #270 from JuliaMath/vc/random
oscardssmith Feb 14, 2024
2c564ef
ci: fix codecov (#276)
inkydragon Apr 5, 2024
0af6e82
Fix Arm CI workflow (#279)
kimikage Apr 5, 2024
703ace4
Fix test for exponentially growing `promote_type` (#280)
kimikage Apr 6, 2024
841f8b1
Enable package extension for Statistics (#277)
hyrodium Apr 13, 2024
f1621b8
Use `StableRNG` in tests (#278)
kimikage Apr 13, 2024
e7a6e1e
Add tests with Aqua.jl (#283)
hyrodium Apr 13, 2024
df9dd8a
Avoid multiple `include`s of "test/common.jl." (#286)
kimikage Apr 13, 2024
e9a7a43
Update macOS test targets (#290)
kimikage Apr 28, 2024
14f8f14
Add test for `unsafe_trunc` returning arbitrary values (#289)
kimikage Apr 29, 2024
6e5484d
Fix `_unsafe_trunc` to reduce the likelihood of arbitrary values (#291)
kimikage Apr 30, 2024
cb271e5
Add `workflow-dispatch` trigger to UnitTest.yml (#295)
kimikage Apr 30, 2024
295b8d1
Update workflows
kimikage May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
contents: write
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,59 @@
name: Unit test

on:
create:
tags:
push:
branches:
- master
- release-*
tags: ['*']
pull_request:
schedule:
- cron: '20 00 1 * *'
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1.0', '1', 'nightly']
os: [ubuntu-latest, windows-latest, macOS-latest]
julia-version: ['1.0', '1.6', '1', 'nightly']
os: [ubuntu-latest, windows-latest, macos-13]
julia-arch: [x64]
# only test one 32-bit job
include:
- os: ubuntu-latest
- os: ubuntu-latest # only test one 32-bit job
julia-version: '1'
julia-arch: x86
- os: macos-latest
julia-version: '1'
julia-arch: aarch64
- os: macos-latest
julia-version: 'nightly'
julia-arch: aarch64

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

- name: Cache artifacts
uses: actions/cache@v1
uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: "Unit Test"
uses: julia-actions/julia-runtest@master
uses: julia-actions/julia-runtest@v1

- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
fail_ci_if_error: true
file: lcov.info


76 changes: 76 additions & 0 deletions .github/workflows/UnitTestArm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Unit test for Arm

on:
push:
branches:
- master
- release-*
tags: ['*']
pull_request:
workflow_dispatch:
permissions:
actions: write
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1.0', '1.6', '1', 'nightly']
os: [ubuntu-latest]
distro: [ubuntu_latest]
arch: [aarch64]

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v1
- name: Download Julia Binary
run: >
julia -e '
using Pkg; Pkg.add("JSON"); using JSON;
if "${{ matrix.julia-version }}" == "nightly";
url = "https://julialangnightlies-s3.julialang.org/bin/linux/${{ matrix.arch }}/julia-latest-linux-${{ matrix.arch }}.tar.gz";
else;
path = download("https://julialang-s3.julialang.org/bin/versions.json");
json = JSON.parsefile(path);
try rm(path) catch end;
vspec = Pkg.Types.VersionSpec("${{ matrix.julia-version }}");
a(f) = f["arch"] == "${{ matrix.arch }}" && f["os"] == "linux" && !occursin("musl", f["triplet"]);
m = filter(json) do v; vn = VersionNumber(v[1]); vn in vspec && isempty(vn.prerelease) && any(a, v[2]["files"]); end;
v = sort(VersionNumber.(keys(m)))[end];
url = filter(a, json[string(v)]["files"])[1]["url"];
end;
download(url, "/tmp/julia-aarch64.tar.gz");'

- name: Extract Julia Files
run: |
mkdir -p /home/runner/work/julia/
tar -xf /tmp/julia-aarch64.tar.gz --strip-components=1 -C /home/runner/work/julia/
rm /tmp/julia-aarch64.tar.gz

- uses: uraimo/[email protected]
name: Unit Test
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
dockerRunArgs: |
-v "/home/runner/work/julia:/home/runner/work/julia"
-v "/home/runner/.julia/registries:/root/.julia/registries"
--net=host
install: |
ln -s /home/runner/work/julia/bin/julia /usr/local/bin/julia
echo /home/runner/work/julia/lib > /etc/ld.so.conf.d/julia.conf
mkdir -p /root/.julia/registries/General
run: |
julia --compile=min -O0 -e 'using InteractiveUtils; versioninfo();'
julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
fail_ci_if_error: true
file: lcov.info
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

21 changes: 20 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,32 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.4"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[weakdeps]
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[extensions]
FixedPointNumbersStatisticsExt = "Statistics"

[compat]
Aqua = "0.8"
Documenter = "0.27, 1"
Random = "<0.0.1, 1"
StableRNGs = "1"
# Update this version specifier when Statistics.jl v1.11.2 is released.
# https://github.com/JuliaStats/Statistics.jl/issues/165
Statistics = "< 1.11.2"
Test = "1"
julia = "1"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Aqua", "Documenter", "StableRNGs", "Statistics", "Test"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build Status][action-img]][action-url]
[![Build Status][pkgeval-img]][pkgeval-url]
[![coverage][codecov-img]][codecov-url]
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

This library implements fixed-point number types. A
[fixed-point number] represents a fractional, or
Expand Down
13 changes: 13 additions & 0 deletions ext/FixedPointNumbersStatisticsExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module FixedPointNumbersStatisticsExt

using FixedPointNumbers
import FixedPointNumbers: Treduce
using Statistics

import Statistics
if isdefined(Statistics, :_mean_promote)
# https://github.com/JuliaMath/FixedPointNumbers.jl/pull/183
Statistics._mean_promote(x::Real, y::FixedPoint) = Treduce(y)
end

end
Loading
Loading