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

refactor to latest Legolas version + onda.signal v2 #133

Merged
merged 14 commits into from
Nov 2, 2022
Merged

Conversation

jrevels
Copy link
Member

@jrevels jrevels commented Oct 31, 2022

Tests pass locally, but will require beacon-biosignals/TimeSpans.jl#51 to pass in CI.

Otherwise, I still have some documentation/deprecation work to do here; will be in draft mode until that's done, but would very much welcome review. It'll be important Beacon-timeline-wise to get this merged/tagged by EOW.

Note that changes that were breakages in Legolas will be hard to deprecate here, but I'll try to provide decent upgrade paths where possible. However, similarly to beacon-biosignals/Legolas.jl#54:

Note that Beaconeers aren't expected to upgrade to v0.15 internally without dedicated support from the relevant team members (if you have a question about this, feel free to ping me in Beacon's internal Slack). So feel free to upgrade "early" if you want to for your use case, but keep in mind that it's not a requirement.

@jrevels jrevels marked this pull request as ready for review November 2, 2022 01:51
@jrevels jrevels requested a review from ericphanson November 2, 2022 01:53
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
docs/src/upgrading.md Show resolved Hide resolved
examples/tour.jl Show resolved Hide resolved
src/annotations.jl Show resolved Hide resolved
src/annotations.jl Show resolved Hide resolved
src/deprecations.jl Show resolved Hide resolved
src/samples.jl Outdated Show resolved Hide resolved
src/samples.jl Show resolved Hide resolved
src/samples.jl Show resolved Hide resolved
jrevels and others added 2 commits November 2, 2022 11:13
Co-authored-by: Eric Hanson <[email protected]>
Co-authored-by: Eric Hanson <[email protected]>
Copy link
Member

@ericphanson ericphanson left a comment

Choose a reason for hiding this comment

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

lgtm!

Comment on lines +86 to +87
Legolas.accepted_field_type(::SamplesInfoV2SchemaVersion, ::Type{String}) = AbstractString
Legolas.accepted_field_type(::SamplesInfoV2SchemaVersion, ::Type{Vector{String}}) = AbstractVector{<:AbstractString}
Copy link
Member

Choose a reason for hiding this comment

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

I should understand this but in the likely case I don't, does this mean:

  1. If a table has been serialized with some other AbstractString for e.g. sample_unit, it can be deserialized OK?
  2. do we need sample_unit::String = string(sample_unit) in the @version invocation? or String(sample_unit)? If not, why not?

Copy link
Member Author

Choose a reason for hiding this comment

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

If a table has been serialized with some other AbstractString for e.g. sample_unit, it can be deserialized OK?

yup

do we need sample_unit::String = string(sample_unit) in the @version invocation? or String(sample_unit)? If not, why not?

Declaring a required field as f::T is Legolas shorthand for f::T = f, which is Julia shorthand for f::T = convert(T, f). This matches the previous behavior on main which had the convert call explicitly (and unnecessarily)

We could add = string(sample_unit) to auto-stringify non-string-convertable inputs, but in this case, I'd rather callers just do that themselves if that's what they want

@jrevels jrevels merged commit 36a7be9 into main Nov 2, 2022
@jrevels jrevels deleted the jr/legolas-bump branch November 2, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants