Skip to content

Commit

Permalink
Move out forwardrecurrence/clenshaw (#249)
Browse files Browse the repository at this point in the history
* Move out forwardrecurrence/clenshaw

* move tests

* use RecurrenceRelationships.jl

* Create downstream.yml

* Update FastTransforms.jl

* Update FastTransforms.jl

* disable macos tests

* Update ci.yml

* Update ci.yml

* RecurrenceRelationships v0.1
  • Loading branch information
dlfivefifty authored Oct 21, 2024
1 parent b493372 commit edff0d9
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 375 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
fail-fast: false
matrix:
version:
- '1.7'
- 'lts'
- '1'
os:
- ubuntu-latest
- macOS-latest
# - macOS-latest
arch:
- x86
- x64
exclude:
- os: macOS-latest
arch: x86
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
Expand All @@ -41,6 +41,7 @@ jobs:
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: lcov.info
78 changes: 78 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: IntegrationTest
on:
push:
branches: [master]
tags: [v*]
paths-ignore:
- 'LICENSE'
- 'README.md'
- '.github/workflows/TagBot.yml'
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'
- '.github/workflows/TagBot.yml'

concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
test:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: ${{ matrix.package.group }}/${{ matrix.package.repo }}/${{ matrix.julia-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1']
os: [ubuntu-latest]
package:
- {repo: ClassicalOrthogonalPolynomials.jl, group: JuliaApproximation}
- {repo: MultivariateOrthogonalPolynomials.jl, group: JuliaApproximation}
- {repo: ApproxFun.jl, group: JuliaApproximation}

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: x64
- uses: julia-actions/julia-buildpkg@latest
- name: Clone Downstream
uses: actions/checkout@v4
with:
repository: ${{ matrix.package.group }}/${{ matrix.package.repo }}
path: downstream
- name: Load this and run the downstream tests
shell: julia --color=yes --project=downstream {0}
run: |
using Pkg
try
# force it to use this PR's version of the package
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
Pkg.update()
Pkg.test(; coverage = true) # resolver may fail with test time deps
catch err
err isa Pkg.Resolve.ResolverError || rethrow()
# If we can't resolve that means this is incompatible by SemVer and this is fine
# It means we marked this as a breaking change, so we don't need to worry about
# Mistakenly introducing a breaking change, as we have intentionally made one
@info "Not compatible with this release. No problem." exception=err
exit(0) # Exit immediately, as a success
end
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
GenericFFT = "a8297547-1b15-4a5a-a998-a2ac5f1cef28"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
RecurrenceRelationships = "807425ed-42ea-44d6-a357-6771516d7b2c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
ToeplitzMatrices = "c751599d-da0a-543b-9d20-d0a503d91d24"
Expand All @@ -24,12 +25,12 @@ FastGaussQuadrature = "0.4, 0.5, 1"
FastTransforms_jll = "0.6.2"
FillArrays = "0.9, 0.10, 0.11, 0.12, 0.13, 1"
GenericFFT = "0.1"
RecurrenceRelationships = "0.1"
Reexport = "0.2, 1.0"
SpecialFunctions = "0.10, 1, 2"
ToeplitzMatrices = "0.7.1, 0.8"
julia = "1.7"


[extras]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
9 changes: 7 additions & 2 deletions src/FastTransforms.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module FastTransforms

using BandedMatrices, FastGaussQuadrature, FillArrays, LinearAlgebra,
Reexport, SpecialFunctions, ToeplitzMatrices
Reexport, SpecialFunctions, ToeplitzMatrices, RecurrenceRelationships

@reexport using AbstractFFTs
@reexport using FFTW
Expand Down Expand Up @@ -32,6 +32,12 @@ import LinearAlgebra: mul!, lmul!, ldiv!, cholesky

import GenericFFT: interlace # imported in downstream packages

import RecurrenceRelationships: clenshaw!, check_clenshaw_recurrences

const _forwardrecurrence! = RecurrenceRelationships.forwardrecurrence!
const _clenshaw_next = RecurrenceRelationships.clenshaw_next
const _forwardrecurrence_next = RecurrenceRelationships.forwardrecurrence_next

export leg2cheb, cheb2leg, ultra2ultra, jac2jac,
lag2lag, jac2ultra, ultra2jac, jac2cheb,
cheb2jac, ultra2cheb, cheb2ultra, associatedjac2jac,
Expand All @@ -53,7 +59,6 @@ export plan_leg2cheb, plan_cheb2leg, plan_ultra2ultra, plan_jac2jac,
plan_tet2cheb, plan_tet_synthesis, plan_tet_analysis,
plan_spinsph2fourier, plan_spinsph_synthesis, plan_spinsph_analysis

include("clenshaw.jl")

include("libfasttransforms.jl")
include("elliptic.jl")
Expand Down
221 changes: 0 additions & 221 deletions src/clenshaw.jl

This file was deleted.

6 changes: 0 additions & 6 deletions src/libfasttransforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ function horner!(c::StridedVector{Float32}, x::Vector{Float32}, f::Vector{Float3
f
end

function check_clenshaw_recurrences(N, A, B, C)
if length(A) < N || length(B) < N || length(C) < N+1
throw(ArgumentError("A, B must contain at least $N entries and C must contain at least $(N+1) entrie"))
end
end

function check_clenshaw_points(x, ϕ₀, f)
length(x) == length(ϕ₀) == length(f) || throw(ArgumentError("Dimensions must match"))
end
Expand Down
Loading

2 comments on commit edff0d9

@dlfivefifty
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.

Error while trying to register: Version 0.16.5 already exists

Please sign in to comment.