Skip to content

Conversation

kapple19
Copy link
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
Contributor Author

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

Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.89%. Comparing base (2fc717e) to head (aa5a061).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1091      +/-   ##
==========================================
+ Coverage   86.86%   86.89%   +0.02%     
==========================================
  Files          54       55       +1     
  Lines        5307     5317      +10     
==========================================
+ Hits         4610     4620      +10     
  Misses        697      697              

☔ View full report in Codecov by Sentry.
📢 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.


"""
```
(::DataInterpolations.AbstractInterpolation)(
Copy link
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})(

Copy link
Collaborator

@asinghvi17 asinghvi17 Aug 24, 2025

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 +70
function DataInterpolations.QuadraticInterpolation(
data::AbstractDimVector,
mode::Symbol,
args...;
kw...
)
return QuadraticInterpolation(
data |> parent,
dims(data) |> only |> parent |> parent,
mode,
args...;
kw...
)
end
Copy link
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

Copy link
Contributor Author

@kapple19 kapple19 Sep 28, 2025

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.

Project.toml Outdated
DimensionalDataAlgebraOfGraphicsExt = "AlgebraOfGraphics"
DimensionalDataCategoricalArraysExt = "CategoricalArrays"
DimensionalDataDiskArraysExt = "DiskArrays"
DimensionalDataInterpolationsExt = "DataInterpolations"
Copy link
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
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
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.

Copy link
Owner

@rafaqz rafaqz left a comment

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


# Interpolation of `DimensionalData.jl` Objects

The following functionalities are experimental and under development.
Copy link
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
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.

Copy link
Contributor Author

@kapple19 kapple19 Sep 28, 2025

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

For the following examples, the following `DimArray` is used:

```@ansi Interpolation1D
y = DimArray(
Copy link
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
Contributor Author

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

@kapple19
Copy link
Contributor Author

kapple19 commented Sep 28, 2025

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

@kapple19
Copy link
Contributor Author

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

@rafaqz
Copy link
Owner

rafaqz commented Sep 28, 2025

You can rebase main if you want

@rafaqz
Copy link
Owner

rafaqz commented Oct 14, 2025

@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
Contributor Author

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

@rafaqz
Copy link
Owner

rafaqz commented Oct 14, 2025

No problem, I haven't had much time anyway

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