diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644
index 743eee76..00000000
--- a/.appveyor.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Documentation: http://www.appveyor.com/docs/appveyor-yml/
-image: Visual Studio 2017
-
-cache: c:\tools\vcpkg\installed\
-
-platform: x64
-
-environment:
- matrix:
- - julia_version: 1.0
- - julia_version: 1.1
- - julia_version: 1.2
- - julia_version: 1.3
- - julia_version: nightly
-
-# # Uncomment the following lines to allow failures on nightly julia
-# # (tests will run but not make your overall status red)
-matrix:
- allow_failures:
- - julia_version: nightly
-
-branches:
- only:
- - master
- - /release-.*/
-
-notifications:
- - provider: Email
- on_build_success: false
- on_build_failure: false
- on_build_status_changed: false
-
-install:
- - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
- - set PATH=%PATH%;c:\tools\vcpkg
- - set PATH=%PATH%;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin\
- - vcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpfr:x64-windows mpir:x64-windows --recurse
- - set PATH=c:\tools\vcpkg\installed\x64-windows\bin;%PATH%
-
-build_script:
- - echo "%JL_BUILD_SCRIPT%"
- - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
-
-test_script:
- - echo "%JL_TEST_SCRIPT%"
- - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
-
-# # Uncomment to support code coverage upload. Should only be enabled for packages
-# # which would have coverage gaps without running on Windows
-# on_success:
-# - echo "%JL_CODECOV_SCRIPT%"
-# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
diff --git a/.github/workflows/CIWindows.yml b/.github/workflows/CIWindows.yml
new file mode 100644
index 00000000..b0657745
--- /dev/null
+++ b/.github/workflows/CIWindows.yml
@@ -0,0 +1,40 @@
+name: CI Windows
+on:
+ - push
+ - pull_request
+jobs:
+ testwindows:
+ name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ version:
+ - '1'
+ os:
+ - windows-latest
+ arch:
+ - x86
+ - x64
+ steps:
+ - uses: actions/checkout@v3
+ - uses: julia-actions/setup-julia@v1
+ with:
+ version: ${{ matrix.version }}
+ arch: ${{ matrix.arch }}
+ show-versioninfo: true
+ - uses: actions/cache@v3
+ env:
+ cache-name: cache-artifacts
+ with:
+ 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 }}-
+ - uses: julia-actions/julia-buildpkg@latest
+ - uses: julia-actions/julia-runtest@latest
+ - uses: julia-actions/julia-processcoverage@v1
+ - uses: codecov/codecov-action@v3
+ with:
+ file: lcov.info
diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml
index 179e7a99..09181610 100644
--- a/.github/workflows/CompatHelper.yml
+++ b/.github/workflows/CompatHelper.yml
@@ -1,25 +1,45 @@
name: CompatHelper
-
on:
schedule:
- - cron: '00 * * * *'
-
+ - cron: 0 0 * * *
+ workflow_dispatch:
+permissions:
+ contents: write
+ pull-requests: write
jobs:
- build:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- julia-version: [1.2.0]
- julia-arch: [x86]
- os: [ubuntu-latest]
+ CompatHelper:
+ runs-on: ubuntu-latest
steps:
- - uses: julia-actions/setup-julia@latest
+ - name: Check if Julia is already available in the PATH
+ id: julia_in_path
+ run: which julia
+ continue-on-error: true
+ - name: Install Julia, but only if it is not already available in the PATH
+ uses: julia-actions/setup-julia@v1
with:
- version: ${{ matrix.julia-version }}
- - name: Install dependencies
- run: julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(name = "CompatHelper", url = "https://github.com/bcbi/CompatHelper.jl.git"))'
- - name: CompatHelper.main
+ version: '1'
+ arch: ${{ runner.arch }}
+ if: steps.julia_in_path.outcome != 'success'
+ - name: "Add the General registry via Git"
+ run: |
+ import Pkg
+ ENV["JULIA_PKG_SERVER"] = ""
+ Pkg.Registry.add("General")
+ shell: julia --color=yes {0}
+ - name: "Install CompatHelper"
+ run: |
+ import Pkg
+ name = "CompatHelper"
+ uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
+ version = "3"
+ Pkg.add(; name, uuid, version)
+ shell: julia --color=yes {0}
+ - name: "Run CompatHelper"
+ run: |
+ import CompatHelper
+ CompatHelper.main()
+ shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- JULIA_DEBUG: CompatHelper
- run: julia -e 'using CompatHelper; CompatHelper.main()'
+ COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
+ # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml
new file mode 100644
index 00000000..f49313b6
--- /dev/null
+++ b/.github/workflows/TagBot.yml
@@ -0,0 +1,15 @@
+name: TagBot
+on:
+ issue_comment:
+ types:
+ - created
+ workflow_dispatch:
+jobs:
+ TagBot:
+ if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: JuliaRegistries/TagBot@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ ssh: ${{ secrets.DOCUMENTER_KEY }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..4991c31d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,47 @@
+name: CI
+on:
+ - push
+ - pull_request
+jobs:
+ test:
+ name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ version:
+ - 'lts'
+ - '1'
+ os:
+ - ubuntu-latest
+# - macOS-latest
+ arch:
+ - x86
+ - x64
+ exclude:
+ - os: macOS-latest
+ arch: x86
+ steps:
+ - uses: actions/checkout@v4
+ - uses: julia-actions/setup-julia@v2
+ with:
+ version: ${{ matrix.version }}
+ arch: ${{ matrix.arch }}
+ show-versioninfo: true
+ - uses: actions/cache@v3
+ env:
+ cache-name: cache-artifacts
+ with:
+ 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 }}-
+ - uses: julia-actions/julia-buildpkg@latest
+ - uses: julia-actions/julia-runtest@latest
+ - uses: julia-actions/julia-processcoverage@v1
+ - uses: codecov/codecov-action@v4
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ file: lcov.info
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 00000000..c4f06471
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,17 @@
+name: Documentation
+on:
+ - push
+ - pull_request
+jobs:
+ docs:
+ name: Documentation
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: julia-actions/setup-julia@v1
+ with:
+ version: '1'
+ - uses: julia-actions/julia-docdeploy@releases/v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml
new file mode 100644
index 00000000..ba2c1dfa
--- /dev/null
+++ b/.github/workflows/downstream.yml
@@ -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
diff --git a/.gitignore b/.gitignore
index 2a0e93eb..0a0d3048 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
docs/build/
-docs/site/
+docs/src/generated
deps/build.log
deps/libfasttransforms.*
.DS_Store
deps/FastTransforms/
+Manifest.toml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index bab47058..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-# Documentation: http://docs.travis-ci.com/user/languages/julia/
-language: julia
-os:
- - linux
- - osx
-julia:
- - 1.0
- - 1.1
- - 1.2
- - 1.3
- - nightly
-matrix:
- allow_failures:
- - julia: nightly
-addons:
- apt:
- packages: ['libquadmath0', 'libgomp1', 'libopenblas-dev', 'libfftw3-dev', 'libmpfr-dev']
- homebrew:
- packages: ['gcc@8', 'fftw', 'mpfr']
- update: true
-
-notifications:
- email: false
-after_success:
- - julia -e 'using Pkg; cd(Pkg.dir("FastTransforms")); Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
- - julia -e 'using Pkg; cd(Pkg.dir("FastTransforms")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
diff --git a/Project.toml b/Project.toml
index 39a2acf6..2959561e 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,27 +1,42 @@
name = "FastTransforms"
uuid = "057dd010-8810-581a-b7be-e3fc3b93f78c"
-version = "0.7.0"
+version = "0.17"
+
[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
-BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
-DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
+ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
+BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
+FastTransforms_jll = "34b6f7d7-08f9-5794-9e10-3819e4c7e49a"
+FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
+GenericFFT = "a8297547-1b15-4a5a-a998-a2ac5f1cef28"
+LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
-Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
+RecurrenceRelationships = "807425ed-42ea-44d6-a357-6771516d7b2c"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
-Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
ToeplitzMatrices = "c751599d-da0a-543b-9d20-d0a503d91d24"
[compat]
-AbstractFFTs = "0.4, 0.5"
-BinaryProvider = "0.5.8"
-DSP = "0.6"
-FFTW = "1"
-FastGaussQuadrature = "0.4"
-Reexport = "0.2"
-SpecialFunctions = "0.8"
-ToeplitzMatrices = "0.6"
-julia = "1"
+AbstractFFTs = "1.0"
+ArrayLayouts = "1.10"
+BandedMatrices = "1.5"
+FFTW = "1.7"
+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"
+LazyArrays = "2.2"
+RecurrenceRelationships = "0.2"
+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"
+
+[targets]
+test = ["Test", "Random"]
diff --git a/README.md b/README.md
index 6ad759d8..d2dfe381 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# FastTransforms.jl
-[](https://travis-ci.org/JuliaApproximation/FastTransforms.jl) [](https://ci.appveyor.com/project/MikaelSlevinsky/fasttransforms-jl/branch/master) [](https://codecov.io/gh/JuliaApproximation/FastTransforms.jl) [](https://JuliaApproximation.github.io/FastTransforms.jl/stable) [](https://JuliaApproximation.github.io/FastTransforms.jl/latest)
+[](https://github.com/JuliaApproximation/FastTransforms.jl/actions?query=workflow%3ACI) [](https://codecov.io/gh/JuliaApproximation/FastTransforms.jl) [](https://JuliaApproximation.github.io/FastTransforms.jl/stable) [](https://JuliaApproximation.github.io/FastTransforms.jl/dev)
+[](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html)
`FastTransforms.jl` allows the user to conveniently work with orthogonal polynomials with degrees well into the millions.
@@ -8,7 +9,7 @@ This package provides a Julia wrapper for the [C library](https://github.com/Mik
## Installation
-The build script, which works on macOS, Linux, and Windows systems, downloads precompiled binaries of the latest version of [FastTransforms](https://github.com/MikaelSlevinsky/FastTransforms) or builds them from source, as governed by the environment variable `FT_BUILD_FROM_SOURCE=true/false`. This library depends on `FFTW`, `MPFR`, and `OpenBLAS` (on Linux and Windows), which must be present for a successful build. With dependencies, installation may be as straightforward as:
+Installation, which uses [BinaryBuilder](https://github.com/JuliaPackaging/BinaryBuilder.jl) for all of Julia's supported platforms (in particular Sandybridge Intel processors and beyond), may be as straightforward as:
```julia
pkg> add FastTransforms
@@ -19,7 +20,7 @@ julia> using FastTransforms, LinearAlgebra
## Fast orthogonal polynomial transforms
-The 26 orthogonal polynomial transforms are listed in `FastTransforms.kind2string.(0:25)`. Univariate transforms may be planned with the standard normalization or with orthonormalization. For multivariate transforms, the standard normalization may be too severe for floating-point computations, so it is omitted. Here are two examples:
+The orthogonal polynomial transforms are listed in `FastTransforms.Transforms` or `FastTransforms.kind2string.(instances(FastTransforms.Transforms))`. Univariate transforms may be planned with the standard normalization or with orthonormalization. For multivariate transforms, the standard normalization may be too severe for floating-point computations, so it is omitted. Here are two examples:
### The Chebyshev--Legendre transform
@@ -95,6 +96,8 @@ julia> norm(F-H)/norm(F)
Due to the structure of the spherical harmonic connection problem, these transforms may also be performed in-place with `lmul!` and `ldiv!`.
+See also [FastSphericalHarmonics.jl](https://github.com/eschnett/FastSphericalHarmonics.jl) for a simpler interface to the spherical harmonic transforms defined in this package.
+
## Nonuniform fast Fourier transforms
The NUFFTs are implemented thanks to [Alex Townsend](https://github.com/ajt60gaibb):
@@ -155,20 +158,16 @@ julia> @time norm(ipaduatransform(paduatransform(v)) - v)/norm(v)
```
-# References:
-
- [1] B. Alpert and V. Rokhlin. A fast algorithm for the evaluation of Legendre expansions, *SIAM J. Sci. Stat. Comput.*, **12**:158—179, 1991.
-
- [2] N. Hale and A. Townsend. A fast, simple, and stable Chebyshev—Legendre transform using an asymptotic formula, *SIAM J. Sci. Comput.*, **36**:A148—A167, 2014.
+# References
- [3] J. Keiner. Computing with expansions in Gegenbauer polynomials, *SIAM J. Sci. Comput.*, **31**:2151—2171, 2009.
+[1] D. Ruiz—Antolín and A. Townsend, [A nonuniform fast Fourier transform based on low rank approximation](https://doi.org/10.1137/17M1134822), *SIAM J. Sci. Comput.*, **40**:A529–A547, 2018.
- [4] D. Ruiz—Antolín and A. Townsend. A nonuniform fast Fourier transform based on low rank approximation, arXiv:1701.04492, 2017.
+[2] K. Gumerov, S. Rigg, and R. M. Slevinsky, [Fast measure modification of orthogonal polynomials via matrices with displacement structure](https://arxiv.org/abs/2412.17663), arXiv:2412.17663, 2024.
- [5] R. M. Slevinsky. On the use of Hahn's asymptotic formula and stabilized recurrence for a fast, simple, and stable Chebyshev—Jacobi transform, *IMA J. Numer. Anal.*, **38**:102—124, 2018.
+[3] T. S. Gutleb, S. Olver and R. M. Slevinsky, [Polynomial and rational measure modifications of orthogonal polynomials via infinite-dimensional banded matrix factorizations](https://arxiv.org/abs/2302.08448), arXiv:2302.08448, 2023.
- [6] R. M. Slevinsky. Fast and backward stable transforms between spherical harmonic expansions and bivariate Fourier series, *Appl. Comput. Harmon. Anal.*, **47**:585—606, 2019.
+[4] S. Olver, R. M. Slevinsky, and A. Townsend, [Fast algorithms using orthogonal polynomials](https://doi.org/10.1017/S0962492920000045), *Acta Numerica*, **29**:573—699, 2020.
- [7] R. M. Slevinsky, Conquering the pre-computation in two-dimensional harmonic polynomial transforms, arXiv:1711.07866, 2017.
+[5] R. M. Slevinsky, [Fast and backward stable transforms between spherical harmonic expansions and bivariate Fourier series](https://doi.org/10.1016/j.acha.2017.11.001), *Appl. Comput. Harmon. Anal.*, **47**:585—606, 2019.
- [8] A. Townsend, M. Webb, and S. Olver. Fast polynomial transforms based on Toeplitz and Hankel matrices, in press at *Math. Comp.*, 2017.
+[6] R. M. Slevinsky, [Conquering the pre-computation in two-dimensional harmonic polynomial transforms](https://arxiv.org/abs/1711.07866), arXiv:1711.07866, 2017.
diff --git a/deps/build.jl b/deps/build.jl
index 7b419f95..76b27a4e 100644
--- a/deps/build.jl
+++ b/deps/build.jl
@@ -1,33 +1,6 @@
-using BinaryProvider
-import Libdl
-
-version = v"0.2.9"
-
-if arch(platform_key_abi()) != :x86_64
- @warn "FastTransforms has only been tested on x86_64 architectures."
-end
-
-const extension = Sys.isapple() ? "dylib" : Sys.islinux() ? "so" : Sys.iswindows() ? "dll" : ""
-
-print_error() = error(
- "FastTransforms could not be properly installed.\n Please check that you have all dependencies installed. " *
- "Sample installation of dependencies:\n" *
- print_platform_error(platform_key_abi())
-)
-
-print_platform_error(p::Platform) = "On $(BinaryProvider.platform_name(p)), please consider opening a pull request to add support.\n"
-print_platform_error(p::MacOS) = "On MacOS\n\tbrew install gcc@8 fftw mpfr\n"
-print_platform_error(p::Linux) = "On Linux\n\tsudo apt-get install gcc-8 libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\n"
-print_platform_error(p::Windows) = "On Windows\n\tvcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpir:x64-windows mpfr:x64-windows\n"
-
-# Rationale is as follows: The build is pretty fast, so on Linux it is typically easiest
-# to just use the gcc of the system to build the library and include it. On MacOS, however,
-# we need to actually install a gcc first, because Apple's OS comes only shipped with clang,
-# so here we download the binary.
-ft_build_from_source = get(ENV, "FT_BUILD_FROM_SOURCE", Sys.isapple() ? "false" : "true")
-if ft_build_from_source == "true"
+if get(ENV, "FT_BUILD_FROM_SOURCE", "false") == "true"
+ extension = Sys.isapple() ? "dylib" : Sys.islinux() ? "so" : Sys.iswindows() ? "dll" : ""
make = Sys.iswindows() ? "mingw32-make" : "make"
- compiler = Sys.isapple() ? "CC=gcc-8" : "CC=gcc"
flags = Sys.isapple() ? "FT_USE_APPLEBLAS=1" : Sys.iswindows() ? "FT_FFTW_WITH_COMBINED_THREADS=1" : ""
script = """
set -e
@@ -35,35 +8,31 @@ if ft_build_from_source == "true"
if [ -d "FastTransforms" ]; then
cd FastTransforms
git fetch
- git checkout v$version
+ git checkout master
+ git pull
cd ..
else
- git clone -b v$version https://github.com/MikaelSlevinsky/FastTransforms.git FastTransforms
+ git clone https://github.com/MikaelSlevinsky/FastTransforms.git FastTransforms
fi
cd FastTransforms
- $make lib $compiler $flags
+ $make assembly
+ $make lib $flags
cd ..
mv -f FastTransforms/libfasttransforms.$extension libfasttransforms.$extension
"""
try
run(`bash -c $(script)`)
catch
- print_error()
+ error(
+ "FastTransforms could not be properly installed.\n Please check that you have all dependencies installed. " *
+ "Sample installation of dependencies:\n" *
+ (Sys.isapple() ? "On MacOS\n\tbrew install libomp fftw mpfr\n" :
+ Sys.islinux() ? "On Linux\n\tsudo apt-get install libomp-dev libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\n" :
+ Sys.iswindows() ? "On Windows\n\tvcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpir:x64-windows mpfr:x64-windows\n" :
+ "On your platform, please consider opening a pull request to add support to build from source.\n")
+ )
end
println("FastTransforms built from source.")
else
- const GCC = BinaryProvider.detect_compiler_abi().gcc_version
- namemap = Dict(:gcc4 => "gcc-4.9", :gcc5 => "gcc-5", :gcc6 => "gcc-6",
- :gcc7 => "gcc-7", :gcc8 => "gcc-8", :gcc9 => "gcc-9")
- if !(GCC in keys(namemap))
- error("Please ensure you have a version of gcc from gcc-4.9 to gcc-9.")
- end
- try
- download("https://github.com/MikaelSlevinsky/FastTransforms/releases/download/" *
- "v$version/libfasttransforms.v$version.$(namemap[GCC]).$extension",
- joinpath(dirname(@__DIR__), "deps", "libfasttransforms.$extension"))
- catch
- print_error()
- end
- println("FastTransforms installed by downloading binaries.")
+ println("FastTransforms using precompiled binaries.")
end
diff --git a/docs/Project.toml b/docs/Project.toml
new file mode 100644
index 00000000..169ffdb7
--- /dev/null
+++ b/docs/Project.toml
@@ -0,0 +1,12 @@
+[deps]
+Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
+FastTransforms = "057dd010-8810-581a-b7be-e3fc3b93f78c"
+LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
+LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
+Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
+PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
+Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
+
+[compat]
+Documenter = "~0.24"
+Literate = "~2.8"
diff --git a/docs/make.jl b/docs/make.jl
index 31eebc8d..dd530e8f 100644
--- a/docs/make.jl
+++ b/docs/make.jl
@@ -1,14 +1,59 @@
-using Documenter, FastTransforms
+using Documenter, FastTransforms, Literate, Plots
+
+plotlyjs()
+
+const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples")
+const OUTPUT_DIR = joinpath(@__DIR__, "src/generated")
+
+examples = [
+ "annulus.jl",
+ "automaticdifferentiation.jl",
+ "chebyshev.jl",
+ "disk.jl",
+ "halfrange.jl",
+ "nonlocaldiffusion.jl",
+ "padua.jl",
+ "sphere.jl",
+ "spinweighted.jl",
+ "subspaceangles.jl",
+ "triangle.jl",
+]
+
+function uncomment_objects(str)
+ str = replace(str, "###```@raw" => "```\n\n```@raw")
+ str = replace(str, "###