Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EDF.jl 0.8 #104

Merged
merged 11 commits into from
Jan 31, 2025
Merged

Support EDF.jl 0.8 #104

merged 11 commits into from
Jan 31, 2025

Conversation

haberdashPI
Copy link
Member

@haberdashPI haberdashPI commented Jan 28, 2025

This upgrades OndaEDF.jl to EDF.jl 0.8 (c.f. beacon-biosignals/EDF.jl#92).

CI won't pass yet, since I'll need to merge beacon-biosignals/EDF.jl#92 and register the package first.

Copy link
Member

@kleinschmidt kleinschmidt left a comment

Choose a reason for hiding this comment

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

also needs a change in the export code, here:

edf_sample_count_per_record(samples::Samples, seconds_per_record::Float64) = Int16(samples.info.sample_rate * seconds_per_record)

@palday palday requested a review from kleinschmidt January 28, 2025 22:58
@@ -1,7 +1,7 @@
name = "OndaEDFSchemas"
uuid = "9c87d999-769b-4741-85b2-6f554d09e731"
authors = ["Beacon Biosignals, Inc."]
version = "0.2.2"
version = "0.3.0"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is breaking since it's just adding new schemas that use the widened field type rather than changing any existing schemas.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now this only supports EDF 0.8 (not 0.7 and earlier). This means that the returned value of a number of functions is FilePlanV3 / PlanV3 instead of V2.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I see, I somehow missed that this is for OndaEDFSchemas.

@palday palday mentioned this pull request Jan 29, 2025
1 task
@haberdashPI
Copy link
Member Author

Alright, I did another search to make sure I didn't miss any other places where the type needs to be widened from Int16 to Int32.

Comment on lines -34 to +36
new_data = similar(samples.data, 0, Onda.index_from_time(sample_rate, Onda.duration(samples)) - 1)
# sparse CSC but for wide data we have a huge column pointer
# so transposing to get sparse CSR
new_data = spzeros(eltype(samples.data), Onda.index_from_time(sample_rate, Onda.duration(samples)) - 1, channel_count(samples))'
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this change; AFAICT it's not really related to the EDF.jl changes, but maybe I'm missing something?

Copy link
Member Author

Choose a reason for hiding this comment

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

@palday did you mean to push this change here?

Copy link
Member

Choose a reason for hiding this comment

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

tests were failing on 1.6 because whatever Onda version gets resolved there ignored validate=false when using the old 0d array. Sparse matrices avoid that and the allocation of a massive dense array.

Copy link
Member

Choose a reason for hiding this comment

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

we can drop 1.6 support IMO, it's not longer LTS

Copy link
Member

Choose a reason for hiding this comment

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

I'm also fine with that, whether or not you leave the sparse change in.

Copy link
Member Author

Choose a reason for hiding this comment

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

To keep this PR focused I'm inclined to drop the change as @kleinschmidt suggests and bump support to 1.10.

Copy link
Member

Choose a reason for hiding this comment

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

strangely that does not seem to have done it....still getting the same validation error on 1.10. AFAICT the same version of Onda is used in both CI runs (1 and min):

https://github.com/beacon-biosignals/OndaEDF.jl/actions/runs/13054426316/job/36421883057?pr=104#step:7:54

https://github.com/beacon-biosignals/OndaEDF.jl/actions/runs/13054426316/job/36421883520?pr=104#step:7:54

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out this is still a problem in 1.10, so I'm going to keep @palday's change.

Copy link
Member

Choose a reason for hiding this comment

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

I'm so sorry. I really didn't mean to bring this upon you!

Copy link
Member Author

Choose a reason for hiding this comment

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

😆

Copy link
Member

@palday palday left a comment

Choose a reason for hiding this comment

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

Approving to get things unblocked elsewhere: the changes make sense and I don't think we missed anything. If we did, that's what patch releases are for. 😂

@haberdashPI haberdashPI merged commit 02e1117 into master Jan 31, 2025
12 of 16 checks passed
@haberdashPI haberdashPI deleted the dfl/support-edf-0.8 branch January 31, 2025 15:54
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.

4 participants