-
Notifications
You must be signed in to change notification settings - Fork 5
refactor for Onda Format v0.5.0 #59
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
Merged
Changes from 70 commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
bb2b406
wip
jrevels 5278ce4
wip
jrevels 325e7e3
wip
jrevels f38722b
wip
jrevels 829dc59
wip
jrevels ab8c77b
wip
jrevels a823c10
wip
jrevels fd2ac2f
wip
jrevels 2573dbe
wip
jrevels 65ec94c
wip
jrevels 0cf02c1
wip
jrevels 33406c7
wip
jrevels 943f10f
wip
jrevels 2db63b5
wip
jrevels 998ca68
wip
jrevels 6037c65
wip
jrevels fdb93f4
wip
jrevels 70c2ebc
wiip
jrevels 8ffa64a
wip
jrevels fcef5dc
wip
jrevels 915330f
wip
jrevels a8daecc
wip
jrevels 539449c
add Onda.register_lpcm_format! docstring and shameless steal/edit @er…
jrevels aac0f0b
wip
jrevels da529f9
wip
jrevels 908a73f
wip
jrevels e2eeec1
wip
jrevels 041f2fe
wip
jrevels ae4eb8a
wip
jrevels ca864c4
wip
jrevels ba6261b
Update src/Onda.jl
jrevels 3074d77
wip
jrevels 8c1b289
Merge branch 'jr/arrow' of https://github.com/beacon-biosignals/Onda.…
jrevels 8ddf5db
wip
jrevels 0504043
wip
jrevels f0a8f07
wip
jrevels 2990b97
tmp
jrevels 6219baf
wip
jrevels 692d520
wip
jrevels 9fc1da1
wip
jrevels ad0e6d2
wip
jrevels 788c801
remove unused PrettyTables
jrevels f857fbc
wip
jrevels 595f5e9
wip
jrevels bec8f1c
wip
jrevels 9b4a3ad
wip
jrevels 5b5bb09
wip
jrevels 2593a16
wip
jrevels e0128f1
wip
jrevels 0ec26e7
wip
jrevels 561d125
wip
jrevels a132343
wip
jrevels 37523e6
wip
jrevels ca0280b
wip
jrevels 8b13264
wip
jrevels ac53aaa
wip
jrevels a9e3bde
wip
jrevels 2332e97
wip
jrevels 582cb11
wip
jrevels 9162a82
wip
jrevels 24026da
wip
jrevels aa51d7d
wip
jrevels 148f065
wip
jrevels c9afa9e
wip
jrevels cf8e1b6
wip
jrevels dbb7bda
fix docs xref
jrevels 25556af
wip
jrevels 6883215
wip
jrevels 08a69b5
wip
jrevels ac373b1
wip
jrevels ceb33ba
add push_preview=true to deploydocs
jrevels 778048c
Update src/utilities.jl
jrevels 38f6be2
minor doc tweaks
jrevels 07cdc58
test _iterator_for_column fast/slow paths
jrevels a329cf6
remove unnecessary using statement
jrevels 28eb54c
Update src/Onda.jl
jrevels 6190643
Update src/annotations.jl
jrevels 97aaed1
Update src/annotations.jl
jrevels d9286b0
Update src/annotations.jl
jrevels afae06d
attempt to resolve docs ambiguity
jrevels 1d275e3
add comment
jrevels File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,8 +8,8 @@ addons: | |
| packages: | ||
| - flac | ||
| julia: | ||
| - 1.0 | ||
| - 1.3 | ||
| - 1.5 | ||
| - nightly | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is really dumb, but it seems like if I only have a single stage listed here, Travis only performs the |
||
| if: branch = master OR tag IS present OR type = pull_request | ||
| notifications: | ||
| email: false | ||
|
|
@@ -18,12 +18,13 @@ notifications: | |
| # - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | ||
| # - julia -e 'Pkg.clone(pwd()); Pkg.build("Onda"); Pkg.test("Onda"; coverage=true)' | ||
| after_success: | ||
| # push coverage results to Coveralls | ||
| - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' | ||
| jobs: | ||
| allow_failures: | ||
| - julia: nightly | ||
| include: | ||
| - stage: "Documentation" | ||
| julia: 1.0 | ||
| julia: 1.5 | ||
| os: linux | ||
| script: | ||
| - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,33 @@ | ||
| name = "Onda" | ||
| uuid = "e853f5be-6863-11e9-128d-476edb89bfb5" | ||
| authors = ["Beacon Biosignals, Inc."] | ||
| version = "0.11.0" | ||
| version = "0.12.0" | ||
|
|
||
| [deps] | ||
| Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" | ||
| CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" | ||
| ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" | ||
| Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
| MsgPack = "99f44e22-a591-53d1-9472-aa23ef4bd671" | ||
| Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
| Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" | ||
| TimeSpans = "bb34ddd2-327f-4c4a-bfb0-c98fc494ece1" | ||
| TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" | ||
| UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" | ||
|
|
||
| [compat] | ||
| Arrow = "1.2.4" | ||
| CodecZstd = "0.6, 0.7" | ||
| ConstructionBase = "1.0" | ||
| MsgPack = "1.1" | ||
| Tables = "1.2" | ||
| TimeSpans = "0.2.2" | ||
| TranscodingStreams = "0.9" | ||
| julia = "1.0" | ||
| julia = "1.5" | ||
|
|
||
| [extras] | ||
| Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
| DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" | ||
|
|
||
| [targets] | ||
| test = ["Test"] | ||
| test = ["Test", "DataFrames"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,118 +1,94 @@ | ||
| # API Documentation | ||
|
|
||
| Below is the documentation for all functions exported by Onda.jl. For general information regarding the Onda format, please see [beacon-biosignals/OndaFormat](https://github.com/beacon-biosignals/OndaFormat). | ||
| Below is the documentation for Onda.jl; for general information regarding the Onda Format itself, please see [beacon-biosignals/OndaFormat](https://github.com/beacon-biosignals/OndaFormat). | ||
|
|
||
| ```@meta | ||
| CurrentModule = Onda | ||
| ``` | ||
|
|
||
| Note that Onda.jl's API follows a specific philosophy with respect to property access: users are generally expected to access fields via Julia's `object.fieldname` syntax, but should only *mutate* objects via the exposed API methods documented below. | ||
| ## Support For Generic Path-Like Types | ||
|
|
||
| ## `Dataset` API | ||
| Onda.jl attempts to be as agnostic as possible with respect to the storage system | ||
| that sample data, Arrow files, etc. are read from/written to. As such, any path-like | ||
| argument accepted by an Onda.jl API function should generically "work" as long | ||
| as the argument's type supports: | ||
|
|
||
| - `Base.read(path)::Vector{UInt8}` (return the bytes stored at `path`) | ||
| - `Base.write(path, bytes::Vector{UInt8})` (write `bytes` to the location specified by `path`) | ||
|
|
||
| For backends which support direct byte range access (e.g. S3), `Onda.read_byte_range` may | ||
| be overloaded for the backend's corresponding path type to enable further optimizations: | ||
|
|
||
| ```@docs | ||
| Dataset | ||
| load | ||
| load_encoded | ||
| save | ||
| create_recording! | ||
| store! | ||
| delete! | ||
| Onda.validate_on_construction | ||
| Onda.read_byte_range | ||
| ``` | ||
|
|
||
| ## `*.onda.annotations.arrow` | ||
|
|
||
| ```@docs | ||
| Annotation | ||
| read_annotations | ||
| write_annotations | ||
| merge_overlapping_annotations | ||
| ``` | ||
|
|
||
| ## Onda Format Metadata | ||
| ## `*.onda.signals.arrow` | ||
|
|
||
| ```@docs | ||
| Signal | ||
| validate_signal | ||
| signal_from_template | ||
| span | ||
| SamplesInfo | ||
| validate | ||
| read_signals | ||
| write_signals | ||
| channel | ||
| channel_count | ||
| sample_count | ||
jrevels marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sizeof_samples | ||
| Annotation | ||
| Recording | ||
| set_span! | ||
| annotate! | ||
| ``` | ||
|
|
||
| ## `Samples` | ||
|
|
||
| ```@docs | ||
| Samples | ||
| ==(::Samples, ::Samples) | ||
| validate_samples | ||
| channel | ||
| channel_count | ||
| sample_count | ||
| encode | ||
| encode! | ||
| decode | ||
| decode! | ||
| load | ||
| store | ||
| ``` | ||
|
|
||
| ## `AbstractTimeSpan` | ||
|
|
||
| ```@docs | ||
| AbstractTimeSpan | ||
| TimeSpan | ||
| contains | ||
| overlaps | ||
| shortest_timespan_containing | ||
| duration | ||
| time_from_index | ||
| index_from_time | ||
| ``` | ||
|
|
||
| ## Paths API | ||
|
|
||
| Onda's Paths API directly underlies its Dataset API, providing an abstraction | ||
| layer that can be overloaded to support new storage backends for sample data and | ||
| recording metadata. This API's fallback implementation supports any path-like | ||
| type `P` that supports: | ||
|
|
||
| - `Base.read(::P)` | ||
| - `Base.write(::P, bytes::Vector{UInt8})` | ||
| - `Base.rm(::P; force, recursive)` | ||
| - `Base.joinpath(::P, ::AbstractString...)` | ||
| - `Base.mkpath(::P)` (note: this is allowed to be a no-op for storage backends which have no notion of intermediate directories, e.g. object storage systems) | ||
| - `Base.dirname(::P)` | ||
| - `Onda.read_byte_range` (see signatures documented below) | ||
|
|
||
| ```@docs | ||
| read_recordings_file | ||
| write_recordings_file | ||
| samples_path | ||
| read_samples | ||
| write_samples | ||
| read_byte_range | ||
| ``` | ||
|
|
||
| ## Serialization API | ||
| ## LPCM (De)serialization API | ||
|
|
||
| Onda's Serialization API underlies its Paths API, providing a storage-agnostic | ||
| abstraction layer that can be overloaded to support new file/byte formats for | ||
| (de)serializing LPCM-encodeable sample data. This API also facilitates low-level | ||
| streaming sample data (de)serialization and Onda metadata (de)serialization. | ||
| Onda.jl's LPCM (De)serialization API facilitates low-level streaming sample | ||
| data (de)serialization and provides a storage-agnostic abstraction layer | ||
| that can be overloaded to support new file/byte formats for (de)serializing | ||
| LPCM-encodeable sample data. | ||
|
|
||
| ```@docs | ||
| deserialize_recordings_msgpack_zst | ||
| serialize_recordings_msgpack_zst | ||
| AbstractLPCMFormat | ||
| AbstractLPCMStream | ||
| deserializing_lpcm_stream | ||
| serializing_lpcm_stream | ||
| finalize_lpcm_stream | ||
| Onda.format_constructor_for_file_extension | ||
| LPCMFormat | ||
| LPCMZstFormat | ||
| format | ||
| deserialize_lpcm | ||
| deserialize_lpcm_callback | ||
| serialize_lpcm | ||
| LPCM | ||
| LPCMZst | ||
| deserialize_lpcm_callback | ||
| deserializing_lpcm_stream | ||
| serializing_lpcm_stream | ||
| finalize_lpcm_stream | ||
| Onda.register_lpcm_format! | ||
| Onda.file_format_string | ||
| ``` | ||
|
|
||
| ## Upgrading Older Datasets to Newer Datasets | ||
| ## Utilities | ||
|
|
||
| ```@docs | ||
| Onda.upgrade_onda_format_from_v0_2_to_v0_3! | ||
| Onda.gather | ||
| Onda.validate_on_construction | ||
| Onda.upgrade_onda_dataset_to_v0_5! | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.