Skip to content

Started DimensionalDataInterpolationsExt.jl for AbstractDimVectors#1091

Open
kapple19 wants to merge 9 commits into
rafaqz:mainfrom
kapple19:interp
Open

Started DimensionalDataInterpolationsExt.jl for AbstractDimVectors#1091
kapple19 wants to merge 9 commits into
rafaqz:mainfrom
kapple19:interp

Conversation

@kapple19

Copy link
Copy Markdown
Contributor

First pass at interpolation wrappers.

Critiques please 😊

@kapple19
kapple19 force-pushed the interp branch 2 times, most recently from 498e78c to aa5a061 Compare August 24, 2025 06:26
@kapple19

Copy link
Copy Markdown
Contributor Author

I don't know how to stop the other CI runs before my latest force-push 😭

@codecov

codecov Bot commented Aug 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.00%. Comparing base (781074f) to head (b154ec7).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/interpolations.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1091      +/-   ##
==========================================
+ Coverage   86.96%   87.00%   +0.03%     
==========================================
  Files          61       63       +2     
  Lines        5848     5871      +23     
==========================================
+ Hits         5086     5108      +22     
- Misses        762      763       +1     

☔ 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.

Comment thread ext/DimensionalDataInterpolationsExt.jl Outdated

"""
```
(::DataInterpolations.AbstractInterpolation)(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(::DataInterpolations.AbstractInterpolation)(
(::Type{<: DataInterpolations.AbstractInterpolation})(

@asinghvi17 asinghvi17 Aug 24, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would actually document each one separately, if you are running this in an @eval loop.

Comment on lines +49 to +62
function DataInterpolations.QuadraticInterpolation(
data::AbstractDimVector,
mode::Symbol,
args...;
kw...
)
return QuadraticInterpolation(
data |> parent,
dims(data) |> only |> parent |> parent,
mode,
args...;
kw...
)
end

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are all the same, I would recommend defining them in an @eval loop for simplicity and ease of editing

@kapple19 kapple19 Sep 28, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, they're not all the same. Some require or have options for one or more arguments.

Additionally, one of them isa Function and not a struct.

Comment thread Project.toml Outdated
DimensionalDataAlgebraOfGraphicsExt = "AlgebraOfGraphics"
DimensionalDataCategoricalArraysExt = "CategoricalArrays"
DimensionalDataDiskArraysExt = "DiskArrays"
DimensionalDataInterpolationsExt = "DataInterpolations"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DimensionalDataInterpolationsExt = "DataInterpolations"
DimensionalDataDataInterpolationsExt = "DataInterpolations"

Two datas in a row, I know, but this makes it consistent with the rest of the extensions (and I think there was also an Interpolations.jl extension PR)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the discussed solution of brevity where, Julia already displays the base package in addition to the extension, so we should just be naming it DataInterpolationsExt.jl?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to agree with @asinghvi17, just go with the standard. We actually messed it up in the past and I mean to standardise the rest too.

@rafaqz rafaqz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs in tabs are great.

And this is a good, straightforward place to start

Comment thread docs/src/interpolations.md Outdated

# Interpolation of `DimensionalData.jl` Objects

The following functionalities are experimental and under development.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semver and breakage is the key thing to mention here, otherwise it's not clear what this means practically.

)
return Itp(
data |> parent,
dims(data) |> only |> parent |> parent,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should think about Points vs Intervals here, may need to use shiftlocus(Center(), dim) to standardise everything (the lookup values can also be the Start() of the interval)

Also, this line can be an internal function we use for all the constructors.

@kapple19 kapple19 Sep 28, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this line can be an internal function we use for all the constructors.

Not really, different interpolation packages have different interfaces.
Unless I've understood you incorrectly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may need to use shiftlocus

I need an explanation/demonstration for this.

Comment thread docs/src/interpolations.md Outdated
For the following examples, the following `DimArray` is used:

```@ansi Interpolation1D
y = DimArray(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use a name besides y, as it suggests a Y dimension. da is an obvious one, or just A

@kapple19

Copy link
Copy Markdown
Contributor Author

Thanks a tonne guys!
Will dive back into this when I have the time, probably later this week.

@kapple19

kapple19 commented Sep 28, 2025

Copy link
Copy Markdown
Contributor Author

Take 2. Critiques please 😁
Applied all the above suggestions except shiftlocus.

@kapple19

Copy link
Copy Markdown
Contributor Author

Uh, should I rebase it? If so, where?

@rafaqz

rafaqz commented Sep 28, 2025

Copy link
Copy Markdown
Owner

You can rebase main if you want

@rafaqz

rafaqz commented Oct 14, 2025

Copy link
Copy Markdown
Owner

@kapple19 it turns out I need this for work so I'm going to have a go at DimInterpolator objects and stacks of them based on DataInterpolations.jl

@kapple19

Copy link
Copy Markdown
Contributor Author

Sounds good.
I feel like I should have communicated clearer that I was at a stage of needing your input, sorry.

@rafaqz

rafaqz commented Oct 14, 2025

Copy link
Copy Markdown
Owner

No problem, I haven't had much time anyway

@kapple19

kapple19 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

@rafaqz shall I close this PR given: #1126 (comment)?

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.

3 participants