Skip to content

Trim eltype conversions in the operator test helpers - #709

Merged
jishnub merged 1 commit into
JuliaApproximation:masterfrom
jishnub:test-helper-eltypes
Oct 26, 2026
Merged

jishnub merged 1 commit into
JuliaApproximation:masterfrom
jishnub:test-helper-eltypes

Conversation

@jishnub

@jishnub jishnub commented Oct 26, 2026

Copy link
Copy Markdown
Member

testinfoperator and testfunctional run their checks on the operator itself and again on converted copies. Each conversion recompiles the operator algebra for the new eltype. For 2D operators (Kronecker products, block-banded caches), that dominates compile time in the downstream PDE tests.

This PR:

  • drops the Float32 and ComplexF32 conversions
  • tests the conversion to ComplexF64 only for operators on 1D domains
  • in testfunctional, re-tests at Float64 only if the operator isn't already Float64, as testinfoperator already did

Timing for ApproxFunOrthogonalPolynomials/test/PDETest.jl, run alone in a fresh session (Julia 1.13):

Testset Before After
Rectangle Laplace/Poisson 86 s 42 s
Schrodinger 56 s 46 s
Bilaplacian 32 s 16 s
Total 305 s (85% compilation), 3,495 tests 229 s, 1,669 tests

The test count falls because the removed conversions each re-ran the full set of checks.

Tested locally: the ApproxFunBase test suite and the ApproxFunOrthogonalPolynomials test suite both pass against this branch.

🤖 Generated with Claude Code

Each eltype conversion recompiles the operator algebra for the new eltype,
which dominated the compilation time of the PDE tests downstream.
Drop the Float32 and ComplexF32 conversions, and only test the conversion
to ComplexF64 for operators on 1D domains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.41%. Comparing base (023b1a4) to head (f9ea3f2).
⚠️ Report is 57 commits behind head on master.

Files with missing lines Patch % Lines
ext/ApproxFunBaseTestExt.jl 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #709      +/-   ##
==========================================
+ Coverage   75.20%   76.41%   +1.21%     
==========================================
  Files          79       81       +2     
  Lines        8445     8752     +307     
==========================================
+ Hits         6351     6688     +337     
+ Misses       2094     2064      -30     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jishnub
jishnub merged commit 23c00d5 into JuliaApproximation:master Oct 26, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant