(breaking): remove legacy Symbol extrapolation API#40
Conversation
BREAKING CHANGE: All extrap keyword arguments now require AbstractExtrap
type instances (NoExtrap(), ConstExtrap(), ExtendExtrap(), WrapExtrap())
instead of Symbol literals (:none, :constant, :extension, :wrap).
- Remove @_dispatch_extrap macro and _validate_extrap(::Symbol)
- Remove @_dispatch_extrap_nd macro and all ND Symbol dispatch helpers
- Remove _check_domain(x, xi, ::Val{:none}) overloads (use ::NoExtrap)
- Remove 2-arg _resolve_extrap_nd(extrap, Val(N)) Symbol path
- Remove ParabolaFit deprecated alias and its export
- Update all tests, examples, and benchmarks to use AbstractExtrap types
- Fix stale test Dict lookup and Symbol iteration in series interp tests
94 files changed, -798 lines net. Full test suite passes (98% coverage).
…te comments for clarity
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated Symbol-based extrapolation API (e.g., extrap=:none, extrap=:constant) in favor of typed AbstractExtrap subtypes (NoExtrap(), ConstExtrap(), etc.) introduced in PRs #38 and #37. The deprecation warnings have been in place since v0.2.11, making this a clean breaking change for v0.3.0.
Changes:
- Removed all Symbol-based extrapolation infrastructure (~790 lines of deprecated code)
- Removed
ParabolaFitdeprecated alias forQuadraticFit - Updated all tests, docs, examples, and extensions to use typed extrapolation API
Reviewed changes
Copilot reviewed 107 out of 107 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/*.jl (50+ files) | Converted all extrap=:symbol to typed NoExtrap()/ConstExtrap()/ExtendExtrap()/WrapExtrap() |
| src/core/eval_ops.jl | Removed ExtrapVal union, _symbol_to_extrap_mode(), cleaned up docstrings |
| src/core/nd_utils.jl | Removed Symbol-based _resolve_extrap_nd(), _to_extrap_vals(), deprecation constant |
| src/core/bc_types.jl | Removed ParabolaFit deprecated alias |
| src/*/*_types.jl | Updated constructors to accept only AbstractExtrap (removed Union{Symbol,AbstractExtrap}) |
| src/*/*_oneshot.jl | Removed Symbol dispatch logic and deprecation warnings |
| src/*/*_interpolant.jl | Cleaned up type signatures |
| docs/src/*.md | Updated all documentation examples |
| ext/*.jl | Updated extension examples |
| examples/*.jl | Updated example code |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
FastInterpolations.jl Benchmarks
Details
| Benchmark suite | Current: acb6424 | Previous: f9c51d7 | Ratio |
|---|---|---|---|
10_nd_construct/bicubic_2d |
66795 ns |
64061 ns |
1.04 |
10_nd_construct/bilinear_2d |
1785.14 ns |
1776.14 ns |
1.01 |
10_nd_construct/tricubic_3d |
393717 ns |
411573 ns |
0.96 |
10_nd_construct/trilinear_3d |
4565.36 ns |
4404.88 ns |
1.04 |
11_nd_eval/bicubic_2d_batch |
1850.5 ns |
1823.5 ns |
1.01 |
11_nd_eval/bicubic_2d_scalar |
31.96 ns |
33.96 ns |
0.94 |
11_nd_eval/bilinear_2d_scalar |
28.25 ns |
27.86 ns |
1.01 |
11_nd_eval/tricubic_3d_batch |
3718 ns |
3683 ns |
1.01 |
11_nd_eval/tricubic_3d_scalar |
56.51 ns |
58.81 ns |
0.96 |
11_nd_eval/trilinear_3d_scalar |
32.26 ns |
31.96 ns |
1.01 |
1_cubic_oneshot/q00001 |
573.26 ns |
594.12 ns |
0.96 |
1_cubic_oneshot/q10000 |
64450.7 ns |
64179.6 ns |
1.00 |
2_cubic_construct/g0100 |
1495.02 ns |
1508.84 ns |
0.99 |
2_cubic_construct/g1000 |
15120.3 ns |
15173.5 ns |
1.00 |
3_cubic_eval/q00001 |
40.57 ns |
42.28 ns |
0.96 |
3_cubic_eval/q00100 |
511.16 ns |
515.98 ns |
0.99 |
3_cubic_eval/q10000 |
45392.9 ns |
45484.5 ns |
1.00 |
4_linear_oneshot/q00001 |
46.58 ns |
45.18 ns |
1.03 |
4_linear_oneshot/q10000 |
37577.3 ns |
37253 ns |
1.01 |
5_linear_construct/g0100 |
11.62 ns |
14.12 ns |
0.82 |
5_linear_construct/g1000 |
11.62 ns |
14.03 ns |
0.83 |
6_linear_eval/q00001 |
24.05 ns |
23.64 ns |
1.02 |
6_linear_eval/q00100 |
413.96 ns |
408.16 ns |
1.01 |
6_linear_eval/q10000 |
36096.6 ns |
36074.9 ns |
1.00 |
7_cubic_range/scalar_query |
26.05 ns |
26.04 ns |
1.00 |
7_cubic_vec/scalar_query |
16.74 ns |
18.43 ns |
0.91 |
8_cubic_multi/construct_s001_q100 |
1408.64 ns |
1391.62 ns |
1.01 |
8_cubic_multi/construct_s010_q100 |
6550.66 ns |
6597 ns |
0.99 |
8_cubic_multi/construct_s100_q100 |
50615.7 ns |
49887.7 ns |
1.01 |
8_cubic_multi/eval_s001_q100 |
2098.74 ns |
2132.4 ns |
0.98 |
8_cubic_multi/eval_s010_q100 |
3271.12 ns |
3377.34 ns |
0.97 |
8_cubic_multi/eval_s010_q100_scalar_loop |
4068.22 ns |
4062.42 ns |
1.00 |
8_cubic_multi/eval_s100_q100 |
15234.5 ns |
15769.6 ns |
0.97 |
8_cubic_multi/eval_s100_q100_scalar_loop |
5008.4 ns |
5002.3 ns |
1.00 |
9_nd_oneshot/bicubic_2d |
41897.5 ns |
43145.1 ns |
0.97 |
9_nd_oneshot/bilinear_2d |
1696.96 ns |
1686.18 ns |
1.01 |
9_nd_oneshot/tricubic_3d |
367210.7 ns |
374789.3 ns |
0.98 |
9_nd_oneshot/trilinear_3d |
3376.3 ns |
3291.1 ns |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'FastInterpolations.jl Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.
| Benchmark suite | Current: 85da202 | Previous: f9c51d7 | Ratio |
|---|---|---|---|
8_cubic_multi/eval_s100_q100 |
17878.3 ns |
15769.6 ns |
1.13 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40 +/- ##
==========================================
+ Coverage 96.82% 97.84% +1.02%
==========================================
Files 71 71
Lines 6230 5944 -286
==========================================
- Hits 6032 5816 -216
+ Misses 198 128 -70
🚀 New features to boost your workflow:
|
Summary
Remove the deprecated Symbol-based extrapolation API (
extrap=:none,extrap=:constant, etc.) and theParabolaFitalias. All extrapolation is now specified exclusively through typedAbstractExtrapsubtypes introduced in PR #38.This is a breaking change for any code still using Symbol-based
extrapkeywords orParabolaFit.Motivation
PR #38 introduced typed
AbstractExtrapdispatch (NoExtrap(),ConstExtrap(),ExtendExtrap(),WrapExtrap()) for all 1D interpolants, with deprecation warnings on the old Symbol path. PR #37 did the same for ND interpolants. Both have been released since v0.2.11 — the deprecation period is complete.Removing the legacy code path eliminates:
@_dispatch_extrapmacroif-elseifbranching at every call site_validate_extrap(::Symbol)extrap in (:none, :constant, ...))_check_domain(x, xi, ::Val{:none/...})Val{Symbol}_symbol_to_extrap_mode_resolve_extrap_nd(::Symbol, ...)_to_extrap_vals/ExtrapValunionNTuple{N, Val{Symbol}}conversion and type alias_EXTRAP_SYMBOL_DEPWARNconstantParabolaFitfunctionQuadraticFitwith depwarnChanges
93dc120utils.jl,eval_ops.jl,nd_utils.jl,bc_types.jl; removeParabolaFitexport6f6fdc585da202extrap=:symbolreferences across source, tests, docs, examples, and extensions to useNoExtrap()/ConstExtrap()/ExtendExtrap()/WrapExtrap()Migration Guide
Impact
AbstractExtrapsubtypes and typed dispatch remain unchangedextrap=:symbol" references