Upgrading From Older Versions Of Onda
To v0.15 From v0.14
First, ensure your codebase is fully upgraded to Onda v0.14, including resolving all deprecation warnings.
From there, breaking changes include:
Functionality that was "soft-deprecated" in Onda v0.14 (i.e. code would still work, but warnings would be raised) is now "hard-deprecated" as of Onda v0.15.
Onda is now built atop Legolas v0.5, instead of Legolas v0.4. Users of Onda v0.15 must therefore upgrade their usage of Legolas to Legolas v0.5 (see here for details). One of the most significant implications of this breaking change is that
AnnotationandSignal(formerly, aliases of the oldLegolas.Rowtype) have been replaced withAnnotationV1andSignalV2(subtypes of the newLegolas.AbstractRecordtype). The latter types have slightly different semantics than the former, especially in that the new types do not propagate non-required fields in the same manner as the old types. Even though a comprehensive deprecation path isn't provided, invocations ofAnnotation(...)/Signal(...)will now throw a descriptive error with suggestions on how to upgrade.onda.samples-info@2andonda.signal@2have been introduced, which replaceonda.samples-info@1andonda.signal@1respectively. Onda still declares/provides these first-generation schema versions, so that correspondingLegolas.readinvocations may still work as expected, but all other Onda v0.15 API structures/functions utilize (and/or expect) the second-generation schema versions. Onda v0.15 providesOnda.upgradeto conveniently upgrade first-generation data to the new generation.The functions
Onda.write_signals,Onda.write_annotations, andOnda.validatehave been soft-deprecated, and will thus continue to work - but will raise deprecation warnings - until the next breaking version update.
To v0.14 From v0.13
Potentially breaking changes include:
SamplesInfo'ssample_typefield is now anAbstractString(seesample_typein https://github.com/beacon-biosignals/Onda.jl#columns) as opposed to aDataType. Thesample_typefunction should now be used to retrieve this field as aDataType.Since
SampleInfo/Signal/Annotationare nowLegolas.Rowaliases, any instance of these types may contain additional author-provided fields atop required fields. Thus, code that relies on these types containing a specific number of fields (or similarly, a specific field order) might break in generic usage.
Otherwise, there are no intended breaking changes from v0.13 to v0.14 that do not have a supported deprecation path. These deprecation paths will be maintained for at least one 0.x release cycle. To upgrade your code, simply run your code/tests with Julia's --depwarn=yes flag enabled and make the updates recommended by whatever deprecation warnings arise.
To v0.14 From v0.11 Or Older
Before Onda.jl v0.12, signal and annotation metadata was stored (both in-memory, and serialized) in a nested Dict-like structure wrapped by the Onda.Dataset type. In the Onda.jl v0.12 release, we dropped the Onda.Dataset type and instead switched to storing signal and annotation metadata in separate Arrow tables. See here for the motivations behind this switch.
Tips for upgrading:
Onda.jl v0.13 contains a convenience function,
Onda.upgrade_onda_dataset_to_v0_5!, to automatically upgrade old datasets to the new format. This function has since been removed after several deprecation cycles, but it can still be invoked as needed byPkg.adding/Pkg.pining Onda atversion="0.13". See the function's docstring for more details.The newer tabular format enables consumers/producers to easily impose whatever indexing structure is most convenient for their use case, including the old format's indexing structure. This can be useful for upgrading old code that utilized the old
Onda.Recording/Onda.Datasettypes. Specifically, the Onda Tour shows how tables in the new format can indexed in the same manner as the old format via a few simple commands. This tour is highly recommended for authors that are upgrading old code, as it directly demonstrates how to perform many common Onda operations (e.g. sample data storing/loading) using the latest version of the package.The following changes were made to
Onda.Signal:- Formerly, each signal was stored as the pair
kind::Symbol => metadatawithin a dictionary keyed to a specificrecording::UUID. Now that each signal is a self-contained table row, each signal contains its ownrecording::UUIDandkind::Stringfields. Note that, unlike the old format, the new data model allows the existence of multiple signals of the samekindin the samerecording(see here for guidance on the interpretation of such data). If a primary key is needed to identify individual sample data artifacts, use thefile_pathfield instead of thekindfield. - The
file_extension/file_optionsfields were replaced by thefile_path/file_formatfields. - The
channel_names::Vector{Symbol}field was changed tochannels::Vector{String}. - The
start_nanosecond/stop_nanosecondfields were replaced with a singlespan::TimeSpanfield. - The
sample_unit::Symbolfield was changed tosample_unit::String.
- Formerly, each signal was stored as the pair
The following changes were made to
Onda.Annotation:- Formerly, annotations were stored as a simple list keyed to a specific
recording::UUID. Now that each annotation is a self-contained table row, each annotation contains its ownrecording::UUIDandid::UUIDfields. The latter field serves as a primary key to identify individual annotations. - The
start_nanosecond/stop_nanosecondfields were replaced with a singlespan::TimeSpanfield. - The
valuefield was dropped in favor of allowing annotation authors to provide arbitrary custom columns tailored to their use case.
- Formerly, annotations were stored as a simple list keyed to a specific